Note: this is regarding ESX 3.x<br><br>I was running into a similar issue with trying to get the usage data from the ESX host.  The problem I was seeing though was that a system I *knew* to be extremely heavily utilized as evidenced by MUI/VC usage data, was reporting back only ~5% utilization.  The problem was that the console OS is almost like a VM itself and the tools were only showing usage data as used by the console OS.
<br><br>Here's how I was able to get around it, with mad props to those who have helped me in the past to get the custom graphing working:<br><h1>On hobbit client:</h1>
<ul><li>Ensure hobbit client is already installed first.</li><li>visudo (or vi /etc/sudoers) (needs root access to run esxtop)<br></li><ul><li>hobbit  ALL = NOPASSWD: /usr/bin/esxtop</li></ul><li>service firewall stop, chkconfig firewall off (for my environment a FW was not necessary, YMMV)
<br></li><li> su hobbit</li><li>In /apps/hobbit/client/ext/pcpu paste the script below, then chmod +x</li></ul><br><pre>#!/bin/sh<br># Dynamically detects the number of CPU's on the machine and grabs the data from the appropriate field.
<br><br>tmp=`cat /proc/vmware/cpuinfo | grep pcpu | wc -w | sed 's/^[ \t]*//;s/[ \t]*$//'`<br>tmp=`expr $tmp - 1`<br>cpuCount=`expr $tmp / 2`<br>targetField=`expr 8 + $cpuCount`<br>targetField="\$$targetField"
<br><br>strPre="sudo esxtop -bn 2 | awk 'BEGIN {FS=\",\"};"<br>strTemp="{print \"pcpuIdle : \"(100-(substr($targetField, 2, length($targetField)-2)))}'"<br>strPost=" | tail -1 | sed 's/\\\"//g' > /tmp/pcpu.txt"
<br><br>strCommand="$strPre $strTemp $strPost"<br><br>eval "$strCommand"<br><br>$BB $BBDISP "data $MACHINE.pcpuIdle<br>`cat /tmp/pcpu.txt`<br>"<br>exit 0</pre><br><ul><li>In /apps/hobbit/client/etc/clientlaunch.cfg
</li></ul><hr><pre>[pcpu]<br>        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg<br>        CMD $HOBBITCLIENTHOME/ext/pcpu<br>        INTERVAL 5m<br></pre><hr><ul><li>Restart client</li></ul><br><h1>On hobbit host:</h1>
<ul><li>In hobbitgraph.cfg:</li></ul><hr><pre>[pcpuIdle]<br>        TITLE ESX CPU Utilitization<br>        YAXIS % Used<br>        -u 100<br>        -r<br>        DEF:cpu_idle=pcpuIdle.rrd:pcpuIdle:AVERAGE<br>        CDEF:pbusy=100,cpu_idle,-
<br>        AREA:pbusy#FF0000:Busy<br>        GPRINT:pbusy:LAST: \: %5.1lf (cur)<br>        GPRINT:pbusy:MAX: \: %5.1lf (max)<br>        GPRINT:pbusy:MIN: \: %5.1lf (min)<br>        GPRINT:pbusy:AVERAGE: \: %5.1lf (avg)\n
<br>        STACK:cpu_idle#00FF00:Idle<br>        GPRINT:cpu_idle:LAST: \: %5.1lf (cur)<br>        GPRINT:cpu_idle:MAX: \: %5.1lf (max)<br>        GPRINT:cpu_idle:MIN: \: %5.1lf (min)<br>        GPRINT:cpu_idle:AVERAGE: \: %5.1lf (avg)\n
<br></pre><hr><ul><li>In hobbitserver.cfg:</li></ul><hr><pre>TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,files,procs=processes,ports,clock,lines,pcpuIdle=ncv"
<br><br>GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,clock,lines,pcpuIdle"
<br><br>NCV_pcpuIdle="pcpuIdle:GAUGE"<br></pre><div><span class="gmail_quote"><br>Hope that helps.<br><br>On 1/26/07, <b class="gmail_sendername">Rich Smrcina</b> <<a href="mailto:rsmrcina@wi.rr.com">rsmrcina@wi.rr.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">VMware ESX provides SNMP support, so it is likely that devmon can be<br>
used to query the data and report it to Hobbit.  I dabbled with some<br>shell scripts to capture the info, but didn't get too far... :(<br><br>Jon Dustin wrote:<br>> Greetings -<br>><br>> I have been using Hobbit since summer 2006 (and Big Brother for about
<br>> 10 years prior). GREAT system, my appreciation to Henrik and the<br>> community.<br>><br>> I am evaluating how to monitor our VMWare ESX boxes with Hobbit. I<br>> would like to have ESX report the "standard" set of data (cpu, disk,
<br>> memory, msgs, procs, trends) and have Hobbit graph the data<br>> appropriately. As some of you may know, ESX is its "own" OS, with<br>> slightly different management tools for reporting on the VM GUEST
<br>> sessions. There are appropriate analogies for top, ps, df, etc.<br>><br>> It seems this might best be handled by sending a "client data" report<br>> to Hobbit, and masquerading ESX to "look" similar to a Linux box.
<br>><br>> Is this feasible? Any potential problems? I have looked for some<br>> documentation on the client report, to no avail. Or should I just look<br>> at the Hobbit CLIENT source?<br>><br>> Thanks for any tips/tricks/traps.
<br>><br>><br>><br>> To unsubscribe from the hobbit list, send an e-mail to<br>> <a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br>><br>><br><br>--<br>Rich Smrcina<br>VM Assist, Inc.
<br>Phone: 414-491-6001<br>Ans Service:  360-715-2467<br>rich.smrcina at <a href="http://vmassist.com">vmassist.com</a><br><br>Catch the WAVV!  <a href="http://www.wavv.org">http://www.wavv.org</a><br>WAVV 2007 - Green Bay, WI - May 18-22, 2007
<br><br>To unsubscribe from the hobbit list, send an e-mail to<br><a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br><br><br></blockquote></div><br>