Hello John,<br><br>Thank you for your fast answer.<br><br>I work on finding a good method to get windows metric.<br>Because we need to get global CPU usage, memory usage, and network usage, on Windows XP and Windows Vista.
<br>
<br>Then, we want to add metric in the Metric Service implementation.<br>So, if you open the source, we will
propose to adapt the framework to allows developers to add new metrics
easily (if it isn&#39;t already done).<br><br>-- <br>Guillaume Liégard<br><br><div><span class="gmail_quote">2007/7/11, John Zinky &lt;<a href="mailto:jzinky@bbn.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jzinky@bbn.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Guillaume,<br><br>The Host metrics come from a metric service via the SysStat &quot;Data<br>Feed&quot;, which periodically polls the host OS for system metrics.<br>For linux this is easy using the /proc file interface.<br>

For Solaris and MacOS we can get the load average by executing the<br>program &quot;uptime&quot;<br>For Windows nothing is easy, (at least for us). We attempted using<br>JNI to make Windows system calls, but abandoned that code as unreliable.
<br><br>If you know of a way to get at Windows OS parameters from java,<br>without JNI calls please tell us we can add these calls.&nbsp;&nbsp;I.E. is<br>there a program that we can exec, that is always installed in<br>Windows? If you have working JNI code we might look at, but no
<br>promises. DLL&#39;s are a configuration nightmare.<br><br>Specifically, we would like to fill in the metrics servlet table<br>&quot;$&lt;NODE1&gt;/metrics/resources&quot;<br>or the Metrics Host Keys<br>&nbsp;&nbsp;<a href="http://cougaar.cougaar.org/software/latest/doc/OnlineManual/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://cougaar.cougaar.org/software/latest/doc/OnlineManual/</a><br>MetricsService/keys.html<br><br>The missing metrics are:<br>LoadAverage (this is the key metric, but Windows does not seem to use<br>Load Average (Average number of jobs ready to run).
<br>Cache<br>TcpInUse<br>UdpInUse<br>TotalMemory<br>FreeMemory<br><br>Windows metrics that cougaar currently measures.<br>Count is obtained via Java System calls<br>JIPS (Java Instructions per second) is obtained via a micro benchmark
<br>when the node first starts up.<br><br>BTW: You could not find these metrics in the Cougaar code because,<br>the Metric Service implementation really is the QuO Resource Status<br>Service (<a href="http://quo.bbn.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

quo.bbn.com</a>), so the source code is not available via<br><a href="http://cougaar.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cougaar.org</a>. We are debating on whether to add the QuO RSS source
<br>code to cougaar. Adding Windows support may be a good excuse to do
<br>this branch.<br><br>On Jul 11, 2007, at 11:43 AM, Guillaume Liegard wrote:<br><br>&gt; Hello,<br>&gt;<br>&gt; I&#39;m a new Cougaar developper.<br>&gt;<br>&gt; I want to know if the metric service can bring me informations
<br>&gt; about the computer in general.<br>&gt;&nbsp;&nbsp; For example, I need the CPU usage of the computer in general (not<br>&gt; only the CPU usage of an agent or a node, or the jvm).<br>&gt;<br>&gt; Then, the feature must run on Windows XP.
<br>&gt;&nbsp;&nbsp; And I get &quot;WARN [DirectSysStatSupplier] - No handler for CPU on<br>&gt; platform Windows XP&quot;, which makes me think it won&#39;t work on Windows.<br>&gt;<br>&gt; That&#39;s why I want to add new metrics, based on native calls.
<br>&gt; So I read the documentation at &quot;<a href="http://cougaar.cougaar.org/software/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cougaar.cougaar.org/software/</a><br>&gt; 12.2/OnlineManual/MetricsService/ &quot;, in particular the section &quot;Add
<br>
&gt; New Metric&quot;.<br>&gt; I look at an exemple of sensor plugin :<br>&gt; &quot;org.cougaar.core.thread.AgentLoadSensorPlugin&quot;.<br>&gt; But this sensor get it&#39;s values suscribing to the metric service,<br>&gt; and there is no metric which can answer my need : Get the global
<br>&gt; CPU usage on Windows plateform.<br>&gt;<br>&gt; Finaly, I look at the &quot;Use Cases and Examples&quot;, in particular the<br>&gt; &quot;Example Metrics Writer&quot;, in order to be able to add my own key.<br>&gt; When I add a new key, like the &quot;Example Metrics Writer&quot; do with the
<br>&gt; &quot;Current_Time_Millis&quot; key ; I can&#39;t get the value after, because I<br>&gt; don&#39;t know the path.<br>&gt; For example, I manage to modify an existing key, like &quot;Host_[Host<br>&gt; IP]_CPU_Jips&quot;, and get my funny value after because I know the path
<br>&gt; is &quot;Host([Host IP]):Jips&quot;.<br>&gt; So where can I do the mapping between key and path ? Because the<br>&gt; example shows how can I put a key, but not how can I put the path.<br>&gt;<br>&gt; --<br>&gt; Guillaume Liégard
<br>&gt;<br>&gt; _______________________________________________<br>&gt; Cougaar-developers mailing list<br>&gt; <a href="mailto:Cougaar-developers@cougaar.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Cougaar-developers@cougaar.org</a><br>&gt; <a href="http://cougaar.org/mailman/listinfo/cougaar-developers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://cougaar.org/mailman/listinfo/cougaar-developers</a><br><br></blockquote></div><br>