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't already done).<br><br>-- <br>Guillaume Liégard<br><br><div><span class="gmail_quote">2007/7/11, John Zinky <<a href="mailto:jzinky@bbn.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jzinky@bbn.com</a>>:</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 "Data<br>Feed", 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 "uptime"<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. 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's are a configuration nightmare.<br><br>Specifically, we would like to fill in the metrics servlet table<br>"$<NODE1>/metrics/resources"<br>or the Metrics Host Keys<br> <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>> Hello,<br>><br>> I'm a new Cougaar developper.<br>><br>> I want to know if the metric service can bring me informations
<br>> about the computer in general.<br>> For example, I need the CPU usage of the computer in general (not<br>> only the CPU usage of an agent or a node, or the jvm).<br>><br>> Then, the feature must run on Windows XP.
<br>> And I get "WARN [DirectSysStatSupplier] - No handler for CPU on<br>> platform Windows XP", which makes me think it won't work on Windows.<br>><br>> That's why I want to add new metrics, based on native calls.
<br>> So I read the documentation at "<a href="http://cougaar.cougaar.org/software/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cougaar.cougaar.org/software/</a><br>> 12.2/OnlineManual/MetricsService/ ", in particular the section "Add
<br>
> New Metric".<br>> I look at an exemple of sensor plugin :<br>> "org.cougaar.core.thread.AgentLoadSensorPlugin".<br>> But this sensor get it's values suscribing to the metric service,<br>> and there is no metric which can answer my need : Get the global
<br>> CPU usage on Windows plateform.<br>><br>> Finaly, I look at the "Use Cases and Examples", in particular the<br>> "Example Metrics Writer", in order to be able to add my own key.<br>> When I add a new key, like the "Example Metrics Writer" do with the
<br>> "Current_Time_Millis" key ; I can't get the value after, because I<br>> don't know the path.<br>> For example, I manage to modify an existing key, like "Host_[Host<br>> IP]_CPU_Jips", and get my funny value after because I know the path
<br>> is "Host([Host IP]):Jips".<br>> So where can I do the mapping between key and path ? Because the<br>> example shows how can I put a key, but not how can I put the path.<br>><br>> --<br>> Guillaume Liégard
<br>><br>> _______________________________________________<br>> Cougaar-developers mailing list<br>> <a href="mailto:Cougaar-developers@cougaar.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Cougaar-developers@cougaar.org</a><br>> <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>