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"
(...)