Metrics on Windows XP
Guillaume Liegard
guillaume.liegard at gmail.com
Mon Aug 13 12:37:54 EDT 2007
Hi John,
Thank you very much for sharing your source code with the community.
About metrics, we have been working on getting counters from windows XP, but
actually not the ones you need. I have just checked if it was easy to get
the CPU load average, but as you mentionned, it is all based on %, not on an
average number of idle or waiting processes.
As we start to work on Vista, I will have a look at it and tell you if I see
an easy way of getting some extra info.
About the new code you shared, I've compiled the quo, qrs and qos module,
then the util module, but I still have a runtime problem integrating it by
hand with my 12.2 stable version. Is there any special configuration to make
to solve this
"Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
"?
Cheers,
Guillaume
Caught an exception at the highest try block. Exception is:
org.cougaar.core.component.ComponentRuntimeException: failed while calling
lo
() for org.cougaar.core.node.Node at 1ef7de4
org.cougaar.core.component.ComponentRuntimeException: failed while calling
load() for org.cougaar.core.node.Node at 1ef7de4
at org.cougaar.core.component.BindingUtility.call0(
BindingUtility.java:243)
at org.cougaar.core.component.BindingUtility.load(
BindingUtility.java:223)
at org.cougaar.core.component.BindingUtility.activate(
BindingUtility.java:45)
at org.cougaar.core.node.Node.launch(Node.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.cougaar.bootstrap.Bootstrapper.launchMain(Bootstrapper.java
:444)
at org.cougaar.bootstrap.Bootstrapper.launchApplication(
Bootstrapper.java:378)
at org.cougaar.bootstrap.Bootstrapper.launch(Bootstrapper.java:348)
at org.cougaar.bootstrap.Bootstrapper.launch(Bootstrapper.java:333)
at org.cougaar.bootstrap.Bootstrapper.main(Bootstrapper.java:321)
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
at org.cougaar.bootstrap.XURLClassLoader.defineClass(
XURLClassLoader.java:249)
at org.cougaar.bootstrap.XURLClassLoader$1.run(XURLClassLoader.java
:195)
at java.security.AccessController.doPrivileged(Native Method)
at org.cougaar.bootstrap.XURLClassLoader.findClass(
XURLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.cougaar.core.wp.resolver.SelectManager$SelectManagerConfig
.<init>(SelectManager.java:826)
at org.cougaar.core.wp.resolver.SelectManager.configure(
SelectManager.java:160)
at org.cougaar.core.wp.resolver.SelectManager.load(
SelectManager.java:170)
at org.cougaar.core.component.BinderSupport.load(BinderSupport.java
:132)
at org.cougaar.core.component.ContainerSupport.addComponent(
ContainerSupport.java:689)
at org.cougaar.core.component.ContainerSupport.add(
ContainerSupport.java:497)
at
org.cougaar.core.component.ContainerSupport.loadSubComponentsByPriority(
ContainerSupport.java:1029)
at
org.cougaar.core.component.ContainerSupport.loadHighPriorityComponents(
ContainerSupport.java:983)
at org.cougaar.core.component.ContainerSupport.load(
ContainerSupport.java:881)
at org.cougaar.core.component.BinderSupport.load(BinderSupport.java
:132)
at org.cougaar.core.component.ContainerSupport.addComponent(
ContainerSupport.java:689)
at org.cougaar.core.component.ContainerSupport.add(
ContainerSupport.java:497)
at org.cougaar.core.agent.Agent.add(Agent.java:49)
at org.cougaar.core.agent.AgentImpl.load(AgentImpl.java:134)
at org.cougaar.core.component.BinderSupport.load(BinderSupport.java
:132)
at org.cougaar.core.component.ContainerSupport.addComponent(
ContainerSupport.java:689)
at org.cougaar.core.component.ContainerSupport.add(
ContainerSupport.java:497)
at org.cougaar.core.agent.AgentManager.add(AgentManager.java:155)
at org.cougaar.core.agent.AgentManager.load(AgentManager.java:115)
at org.cougaar.core.component.BinderSupport.load(BinderSupport.java
:132)
at org.cougaar.core.component.ContainerSupport.addComponent(
ContainerSupport.java:689)
at org.cougaar.core.component.ContainerSupport.add(
ContainerSupport.java:497)
at org.cougaar.core.node.Node.load(Node.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.cougaar.core.component.BindingUtility.call0(
BindingUtility.java:239)
... 12 more
2007/8/8, John Zinky <jzinky at bbn.com>:
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cougaar.org/pipermail/cougaar-developers/attachments/20070813/d4428c63/attachment-0001.html
More information about the Cougaar-developers
mailing list