VMware Cloud Community
mashio
Contributor
Contributor

ESXTOP - pulling VAAI counters into csv file

i'm trying to pull VAAI counters (CLONE_WR/CLONE_RD) from esxtop to csv file but when im searching for those parameters in the file i can't find them.

i'm using esxtop -a which save all counters

any idea how to get the specific counters?

also the file contains hundreds of row since i use -a, is there a way to pull only the required counters?

 

thanks.

Reply
0 Kudos
9 Replies
vbondzio
VMware Employee
VMware Employee

The column names in batch mode are different, CReads and CWrites.

If you want to limit fields and entities, you can define those.

esxtop
u -> Device view
f -> fields

Only select what you need:

Current Field order: AbcdefghijklmnOp

* A: DEVICE = Device Name
B: ID = Path/World/Partition Id
C: NUM = Num of Objects
😧 SHARES = Shares
E: BLKSZ = Block Size (bytes)
F: QSTATS = Queue Stats
G: IOSTATS = I/O Stats
H: RESVSTATS = Reserve Stats
I: LATSTATS/cmd = Overall Latency Stats (ms)
J: LATSTATS/rd = Read Latency Stats (ms)
K: LATSTATS/wr = Write Latency Stats (ms)
L: ERRSTATS/s = Error Stats
M: PAESTATS/s = PAE Stats
N: SPLTSTATS/s = SPLIT Stats
* O: VAAISTATS= VAAI Stats
P: VAAILATSTATS/cmd = VAAI Latency Stats (ms)

Toggle fields with a-p, any other key to return:

Go back to the device view and save the field config (you can also disable fields in other views but we'll be limiting entities later):

W (shift + w) -> write config -> filename

 6:47:13pm up 57 days 2:07, 992 worlds, 1 VMs, 1 vCPUs; CPU load average: 0.01, 0.01, 0.01
Save config file to (Default to : /.esxtop60rc): vaaifoo
DEVICE CLONE_RD CLONE_WR CLONE_F MBC_RD/s MBC_WR/s LCLONE_RD LCLONE_WR LCLONE_F ATS ATSF ZERO ZERO_F MBZERO/s DELETE DELETE_F
naa.5006016088606bdb5006016088606bdb 0 0 0 0.00 0.00 - - - 0 0 0 0 0.00 0 0
naa.644a842015dd65001cd4ba561110037d 0 0 0 0.00 0.00 - - - 0 0 0 0 0.00 0 0


Now export an entity file and mask off anything but the groups, empty lines and whatever matches naa (or set a more precise match for your LUNs).

[root@cs-tse-d93:~] esxtop -export-entity entity-file
[root@cs-tse-d93:~] sed -i '/^\(SchedGroup\|Adapter\|Device\|NetPort\|InterruptVector\|InterruptCookie\|^$\|naa.*\)/!s/^/#/' entity-file


Now run that and check what we have, note that I don't want -a as I have specified just what I need:

[root@cs-tse-d93:~] esxtop -import-entity entity-file -c vaaifoo -n 1 -b > foo.csv
[root@cs-tse-d93:~] sed -e $'s/,/\\\n/g' foo.csv | grep naa
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\CReads"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\CWrites"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\CFailed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\MBytes CReads/sec"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\MBytes CWrites/sec"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\LCReads"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\LCWrites"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\LCFailed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ATS"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ATS Failed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\Zeros"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\Zeros Failed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\MBytes Zeroed/sec"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\Delete"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\Deletes Failed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\MBytes Deletes/sec"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ResSpace"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ResSpace Failed"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ExtStats"
"\\cs-tse-d93.csl.vmware.com\Physical Disk SCSI Device(naa.5006016088606bdb5006016088606bdb)\ExtStats Failed"
(...)

 

Reply
0 Kudos
vbondzio
VMware Employee
VMware Employee

edit: can't delete, emptying to remove duplicate post

Reply
0 Kudos
mashio
Contributor
Contributor

thanks so much for the detailed answer!!

i'll try that

Reply
0 Kudos
mashio
Contributor
Contributor

i was able to export to csv with the required VAAI fields but for some reason, I'm getting only "0" under CREADS and CWRITES.

if i use -a for all counters, i can see the values.

any idea?

were you able to catch the values on your side?

Reply
0 Kudos
vbondzio
VMware Employee
VMware Employee

I don't have VAAI in the lab I was on. Maybe you found a bug, maybe there is another entity required. Did you use the -a with the entity file? Can you see values in live esxtop without -b?

Reply
0 Kudos
mashio
Contributor
Contributor

yes i could see the VAAI values when using live esxtop. bus csv file was 0

i use -a without entity file, i can try to use it and see the difference. will it export only the VAAI fields also when using -a?

Reply
0 Kudos
vbondzio
VMware Employee
VMware Employee

I'd need a more precise answer ... did you run the _same_ command, just without the -b and you could see non-zero values for the fields in question?

e.g.

esxtop -import-entity entity-file -c vaaifoo

instead of:

esxtop -import-entity entity-file -c vaaifoo -b > foo.csv

Reply
0 Kudos
mashio
Contributor
Contributor

i run:

esxtop -b -a -d 5 -n 5> foo.csv  >> i was able to see the counters although i collect all metrics which is not ideal 

i havent run this: esxtop -import-entity entity-file -c vaaifoo  >> how can i get the csv from it?

Tags (1)
Reply
0 Kudos
vbondzio
VMware Employee
VMware Employee


@mashio wrote:
(...)

i havent run this: esxtop -import-entity entity-file -c vaaifoo  >> how can i get the csv from it?


Uhm, as per my initial reply. Right now I'm just trying to figure out which step is causing the values to be 0. You can specify an entity and config file without using batch mode. Maybe you want to re-read what I wrote and then let me know the exact commands you use / what you see live / batch with and without entity file / and or config file.

Reply
0 Kudos