Wednesday, January 12, 2011

Getting info with the vsish command (esxi only)

The vsish command is used to gather information from an esxi host. It is an extremely powerful utility.

Once the command is typed, the ls command shows the contents of a working directory and the cat
command can be used to see the contents of a file. Finally, the cd command can be used to change
directories.

The first example shows how to get the maximum transfer unit for a particular vmnic.

/bin # vsish
/> cd net
/net/> cd pNics
/net/pNics/> ls
vmnic0/
vmnic1/
vmnic2/
vmnic3/
/net/pNics/> cd vmnic1
/net/pNics/vmnic1/> cat mtu
MTU {
   mtu:1500
}
/net/pNics/vmnic1/> q

The second example shows how to gather cpu related information for a host.

/bin # vsish
/> cd hardware
/hardware/> cd cpu
/hardware/cpu/> ls
packageList/
cpuList/
cpuModelName
cacheInfo
cpuInfo
/hardware/cpu/> cat cpuInfo
CPU global information {
   Hyperthreading state:Hyperthreading state: 3 -> enabled
   HV state:HV state: 3 -> HV Enabled
   Number of packages:2
   Number of cores:8
   Number of CPUs (threads):16
   HV Replay capable:1
   Reason replay is disabled on Host:Reason replay is disabled on Host: 0 -> HV Replay is supported
}
/hardware/cpu/> q

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.