ESXi Shell : ESXi Shell is a VMware vSphere command-line interface (CLI) for troubleshooting.. ESXi Shell, which was formerly known as Tech Support Mode (TSM), is disabled by default. Only the root user and system administrators can execute system commands using the ESXi Shell.
1) find/cat/grep :-
These commands are use when you are going to find particular files or text within a file. The find command will locate a particular or specific file, based on either a filename or a pattern. Cat command is used to display the contents of a file, while grep can be used to search for specific text within a single or group of files.
find /path/to/vm/folder –iname “*delta*” – list all delta disks of a VM.
delta disk : A delta disk has two files, including a descriptor file that is small and contains information about the virtual disk, such as geometry and child-parent relationship information, and a corresponding file that contains the raw data. The files that make up the delta disk are referred to as child disks or redo logs
cat hostd.log | grep error – search occurrences of “error” within the hostd.log
2) head/tail :- Both commands are use to viewing the contents of a file. While the ‘cat’ command is good to display the all contents of a file, head and tail are used to displaying only the beginning or end part of the file, skipping the contents in the middle. tail can be extremely useful in times of troubleshooting .
tail -f /var/log/vmkernel.log – watch vmkernel log in real time.
3) less :– It will becomes useful when you are showing the contents of very large files. By using piping (‘|’) your cat output to less and you are able to have the system page output, also allow us to scroll up and down through the output .
cat /var/log/vpxa.log | less – output vpxa.log to the screen .
4) df/vdf : – It will use to displaying info about free space within file systems. df command, displaying the VMFS data stores size also used available space within file system and our data stores. To view the usage of the different ramdisks within an ESXi host, you need to use the vdf .
5) ps/kill :– IT will discovering and forcefully terminating services which are running inside the ESXi host. The ps command contains so many commands switches, but commonly it use to retrieve the running world ID of a process in order to send to the kill command. The kill command terminates that process.
6) vi :– IT is use for text editing or modify the contents of file .
Thanks hope you like it.
Rajiv Pandey.