Metrics on Windows XP

John Zinky jzinky at bbn.com
Wed Aug 8 10:48:30 EDT 2007


We have moved the QuO Resource Status Service (QuO RSS) source code  
to cougaar qos/qrs module.

For Cougaar HEAD, the QuO RSS is now in lib/qrs.jar instead of sys/ 
resource-status-service.jar.

The source code allows you to see how the Metric Service works  
internally (without checking out Quality Objects (QuO) project  
(quo.bbn.com)).

When the metric service is loaded into a node, one of the DataFeeds  
is a probe to gather performance statistics from the Node's host. The  
probe use org.cougaar.qos.qrs.sysstat.SysStatHandler to choose which  
probes to load, based on the OS and machine architecture.
1) For example, one of the probes is a mini-benchmark that calculates  
the Java Instructions Per Second (JIPS) of the host configuration.  
JIPS is a normalized metric that is independent of the Ghz, OS, Java  
VM, and memory cache of the host. Running the JIPS-benchmark is one  
of the reasons Cougaar Nodes take a few seconds to start up.
2) Other probes periodically poll (Default 15 seconds) to gather  
other host performance parameters (as displayed in the /metrics/ 
resources servlet)

As part of the QuO RSS move, we revisited the lack of probes for  
Windows. We do NOT want to use DLLs, so a probe has to get the raw  
performance numbers from the JAVA VM, reading from the file system  
(Linux /proc), or by execing a program that is always installed.

We need HELP finding sources of performance data for Window XP, and  
Windows Vista.

LoadAverage:
The metric we really need for Windows is LoadAverage.
For Java 1.6 there is some hope for Java VM supplying Host LoadAverage
java.lang.management.OperatingSystemMXBean getSystemLoadAverage()
  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6336608
But Windows uses the "cpu utilization" metric and not load average,  
so this method may not be implemented for windows.

For Windows XP, we are execing the "typeperf" program.
   http://technet2.microsoft.com/WindowsServer/en/Library/46938289- 
edb5-468a-b03f-4e5985bf8fca1033.mspx?mfr=true
But we have to convert "cpu utilization" into an estimator of Load  
Average.
   typeperf "\Processor(_total)\% Processor Time" -sc 1
The probe code is in org.cougaar.qos.qrs.sysstat.XPSockStat

Total Memory:
typeperf does not seem to have a metric for total physical memory on  
the host.
We see total memory being displayed in the "taskmgr".
Temporarily, we use the "mem" command.

Typeperf:
We have found TCP Sockets and Host Free Memory

HELP:
Outstanding issues, (we could use help from Windows experts)
1) Is typeperf available on Vista and has the API changed?
2) Is there a LoadAverage performance metric available in Windows.
3) How do you get active number of UDP sockets from typeperf
4) How do you get total memory from typeperf
5) How to get the L2 cache for the Host
6) Are Sysinternals useful: http://www.microsoft.com/technet/ 
sysinternals/default.mspx



More information about the Cougaar-developers mailing list