419 |
|
|
420 |
|
uptime = GetTickCount \ 1000 |
421 |
|
|
422 |
+ |
CUpTime.Capture |
423 |
+ |
cpu_time = CUpTime.CPUTime |
424 |
+ |
percent_idle = CUpTime.PercentIdle |
425 |
+ |
|
426 |
|
' build the contents of the XML packet |
427 |
|
xml = "<packet seq_no=""" & seqNo & """ machine_name=""" & machineName & """ date=""" & packetDate & """ type=""data"" ip=""" & LocalIP & """>" & _ |
428 |
|
"<os>" & _ |
434 |
|
"<processor>" & processorType & "</processor>" & _ |
435 |
|
"<uptime>" & uptime & "</uptime>" & _ |
436 |
|
"</os>" & _ |
437 |
+ |
"<cpu><idle>" & percent_idle & "</idle><user>" & cpu_time & "</user></cpu>" & _ |
438 |
|
"<memory><total>" & memTotal & "</total><free>" & memFree & "</free></memory>" & _ |
439 |
|
"<swap><total>" & swapTotal & "</total><free>" & swapFree & "</free></swap>" & _ |
440 |
|
"</packet>" |