On 1/12/2009 at 10:38 PM, in message <496C491C.0B6 : 45 : 32950>, "Everett, Vernon" <Vernon.Everett at woodside.com.au> wrote: Hi all
Has anybody had any success monitoring ESX hosts yet? In particular, I am looking for HBA and disk stats, CPU, memory, etc. The usual suspects.
I decided to use a "standard" Hobbit client running on the service console, then add my own customizations:
use vdf for disk space monitoring instead of df (picks up VMDK volumes)
use esxtop to get CPU usage for entire ESX box
Here is a snippet I wrote for parsing ESXTOP output:
my $esxtop = "sudo /usr/bin/esxtop -b -d $interval"; open(CMD,"$esxtop |") || die "error - could not open $esxtop $!\n"; my $count = 0; while( <CMD> ) { chomp; s/\"//g; my (@row) = split/\,/; $count++; if ( $count <= 2 ) { next; } # skip 1st few results, just titles and 100% values my $util = int($row[9]); # round to INT, because RRD does not like floating-point &SendHobbit($util); if ( $verbose ) { print "util = $util\n"; } }
I hope this helps, please don't flame my crappy code... Enjoy!
--
Jon Dustin - Network Specialist University of Southern Maine Portland, ME 207-780-4152
This may or may not help...
Re: VMWare ESX: msg#00464 http://osdir.com/ml/monitoring.hobbit/2007/msg00464.html
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Jan 13, 2009 at 11:36 AM, Jon Dustin <jdustin at usm.maine.edu> wrote:
On 1/12/2009 at 10:38 PM, in message <496C491C.0B6 : 45 : 32950>, "Everett, Vernon" <Vernon.Everett at woodside.com.au> wrote: Hi all
Has anybody had any success monitoring ESX hosts yet? In particular, I am looking for HBA and disk stats, CPU, memory, etc. The usual suspects.
I decided to use a "standard" Hobbit client running on the service console, then add my own customizations:
use vdf for disk space monitoring instead of df (picks up VMDK volumes)
use esxtop to get CPU usage for entire ESX box
Here is a snippet I wrote for parsing ESXTOP output:
my $esxtop = "sudo /usr/bin/esxtop -b -d $interval"; open(CMD,"$esxtop |") || die "error - could not open $esxtop $!\n"; my $count = 0; while( <CMD> ) { chomp; s/\"//g; my (@row) = split/\,/; $count++; if ( $count <= 2 ) { next; } # skip 1st few results, just titles and 100% values my $util = int($row[9]); # round to INT, because RRD does not like floating-point &SendHobbit($util); if ( $verbose ) { print "util = $util\n"; } }
I hope this helps, please don't flame my crappy code... Enjoy!
--
Jon Dustin - Network Specialist University of Southern Maine Portland, ME 207-780-4152
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
participants (2)
-
jdustin@usm.maine.edu
-
josh@imaginenetworksllc.com