VMware Flash Read Cache CLI commands

List individual vflash caches.
esxcli storage vflash cache list

Get vflash cache statistics.
esxcli storage vflash cache stats get -c vfc-2091622189-testvm_1

Reset vflash cache statistics.
esxcli storage vflash cache stats reset-c vfc-2091622189-testvm_1

List vflash SSD devices.
esxcli storage vflash device list

Script to get all the cache stats from VMs running on host

#!/bin/bash
# Set the field seperator
IFS=,
hostname=`hostname`
outputfile=”/vmfs/volumes/ServiceLUN/vFRC/”$hostname”.txt”
echo `date` > $outputfile

#Loop through the caches
for cache in `esxcli storage vflash cache list`;do
  vm=`echo $cache | sed ‘s/^ *//’`
  echo “Cache:” $vm >> $outputfile
  esxcli storage vflash cache stats get -c $vm >> $outputfile
done

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s