Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

is there anyway to limit the output from esxtop in batch mode? I tried running it in batch mode and got 16,000 columns! I could filter this out post collection but at that kind of data volumn it seems like I'd be wasting resources. The interactive output from esxtop is fairly customizable. Here is a pretty good discussion of esxtop http://www.yellow-bricks.com/esxtop/ If the batch mode is not, then I will probably see about parsing the interactive output progamatically. Another option would be using the SKD from VMware but I haven't found any practical examples. I'm doing the collection from opensolaris. There is a perl SDK for LINUX and Windows but I'd rather do everything from opensolaris if possible.

share|improve this question
    
current ideas is to use ssh and expect and capture the 4 basic esxtop interactive modes direct to a local file and parse that file - seems a bit hacky but seems like the most efficacious considering I see no controls for the esxtop batch mode and trying to search for info on the SDK/api is like entering some alice and wonderland rabbit hole –  Kyle Hailey Aug 21 '11 at 21:31
    
another option looks to be using ssh and vsish - investigating –  Kyle Hailey Aug 23 '11 at 1:42

1 Answer 1

up vote 0 down vote accepted

just found this

http://www.r71.nl/kb/technical/290-resxtop-how-to-reduce-output

It doesn't have all the control I'd want, but it's a definite step in the right direction:

  1. Enter ESXTOP in interactive mode on the Service Console by simply typing esxtop at the # prompt
  2. Switch to a component you are NOT interested in capturing statistics on by pressing the corresponding menu option (c: ESX cpu, m: ESX memory, d: ESX disk adapter, u: ESX disk device, v: ESX disk VM).
  3. Press f when viewing the component you do not want to capture. A list of fields will be displayed. You can toggle the fields on and off by pressing the letter corresponding to each field. An * indicates that the field is on. You want to turn off all of the fields you don’t want to collect.
  4. Repeat steps 2 & 3 for the remaining components, leaving only what you want to capture
  5. Switch to the component you want to capture in batch mode and repeat step #3, except you will now enable what you want to capture.
  6. Press W (capital W – case sensitive) to write out the ESXTOP configuration file. You can accept the default or create new configuration files. You may want to create a CPU-only config file, memory-only, and so forth.
  7. Press CTRL+C to stop ESXTOP.
  8. Now, invoke ESXTOP in batch mode, calling your updated or new configuration file you created in step #6 using the -c switch. Here’s an example:# esxtop -b -d 30 -n 480 -c .esxtopcpustats > /tmp/esxtop_cpu_stats.csv where .esxtopcpustats is an ESXTOP config file with only CPU stats. -d sets your capture interval to 30 seconds, and -n sets the number of samples to 480 (or 4 hours with a delay of 30 seconds).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.