In the current *Nix Add-On v 5.2.2, in vmstat.sh, this is how I've edited the command for Solaris:
CMD='eval /usr/sbin/prtconf 2>/dev/null | grep Memory ; /usr/sbin/swap -s ; vmstat -q 1 2|tail -1 ; vmstat -s ; prstat -n 1 1 1; echo CPU_COUNT `psrinfo | grep -c "on-line"`; sar -gp 1 2'
Basically, anywhere in the TA that uses 'vmstat' or any other command which returns the average stats since boot for the first iteration, run 2 iterations of the stats and pipe to tail -1. The Linux command does not use 'vmstat' to get the memory statistics which is why my example is for Solaris.
I say basically, because it depends on how the output is parsed with the 'awk' script. Most of the time, the 2 iterations and pipe to tail -1 is correct, but some of the awk parsers are built to grab the data differently.
One final bit of advice. If you do edit any of the scripts, you probably want to copy the entire TA to a newly named TA and push your custom TA and stop pushing the original *Nix TA. Do this for the same reason you edit files in the local directory, and not the default directory.
... View more