When messing up my lab environment,I found interesting commands which I was unaware and I’ve went few blogs which has the blogs of the shell commands in ESXi and deprecated ESX version discussed when they wrote the blog.When I started collecting the information about the command,I got knowledge about how this commands helps in the hard times.I have collected the information in such a way that it has reference link,commands discussed by other bloggers,man pages and other open source webs.

Disclaimer :  Any commands which mention in the post should be used unless it doesn’t affect the GSS Support and strongly run in the testing environment before proceeding with production.Blogs link which provided assuming the sharable,If it is not Please let me know I will remove it from the blog post.

I will divide the Commands in two segments A – M and N -Z and all commands took from the ESXi 6.7 GA version.Thanks to fellow blogger and Guru’s who has wonderful blogs.

Here the list of the Commands

BootModuleConfig.sh net-stats
InstallHelper.sh netdbg
VmfsLatencyStats.py netdbg.py
Xorg nfcd
[ nicmgmtd
[[ nohup
amldump nologin
apply-host-profiles nslookup
applyHostProfile ntfscat
applyHostProfileWrapper ntp-keygen
ash ntpd
authd ntpq
auto-backup.sh od
awk openssl
backup.sh openwsmand
basename pam_tally2
bootOption partedUtil
bunzip2 passwd
bzip2 pcscd
cat pgrep
chardevlogger pidof
check_serial pigz
chgrp ping
chkconfig ping6
chmod pkill
chown pktcap-uw
chvt powerOffVms
cim-diagnostic.sh poweroff
cim_host_powerops printf
cksum prop_of_instances
clear ps
cmmds-tool pwqcheck
cp python
cpio python3
crond python3.5
crypto-util python3.5m
cut randomSeed
date readlink
dcbd reboot
dcui remoteDeviceConnect
dcuiweasel reset
dd resize
df rhttpproxy
dhclient-uw rm
diff rmdir
dirname runInRP
dmesg sched-stats
dnsdomainname schedsnapshot
doat scp
dosfsck sdrsInjector
du secpolicytools
echo sed
egrep sensord
eject seq
enum_instances services.sh
env setsid
esxcfg-advcfg
esxcfg-dumppart
esxcfg-fcoe sha1sum
esxcfg-hwiscsi sha256sum
esxcfg-info sha512sum
esxcfg-init sharedStorageHostProfile.sh
esxcfg-ipsec shutdown.sh
esxcfg-module sleep
esxcfg-mpath slpd
esxcfg-nas smartd
esxcfg-nics smbiosDump
esxcfg-rescan snmpd
esxcfg-resgrp sntp
esxcfg-route sort
esxcfg-scsidevs ssh
esxcfg-swiscsi stat
esxcfg-vmknic storageRM
esxcfg-volume strace
esxcfg-vswitch stty
esxcli sum
esxcli.py summarize-dvfilter
esxhpcli sync
esxhpedit tail
esxtop tar
esxupdate taskset
ethtool tcpdump-uw
expr techsupport.sh
FALSE tee
fdisk test
fgrep time
find timeout
firmwareConfig.sh tmpwatch.py
gdbserver touch
generate-certificates tpm2emu
genisoimage tracenet
getty traceroute
gpuvm TRUE
grabCIMData uname
grep uniq
gunzip unlzop
gzip unzip
halt updateProductLockerPolicy
hbrfilterctl uptime
head usleep
hexdump uwstats
host_reboot.sh vdf
host_shutdown.sh vdq
hostd vdu
hostd-probe vi
hostd-probe.sh vim-cmd
hostdCgiServer vm-support
hostname vmdumper
hwclock vmfs-support
imaShim32d vmfsfilelockinfo
indcfg vmkbacktrace
inetd vmkchdev
init vmkdevmgr
init-launcher vmkdump_extract
initterm.sh vmkerrcode
install vmkfstools
irqinfo vmkipcrm
isoinfo vmkipcs
jumpstart vmkiscsi-tool
kdestroy vmkiscsid
kill vmkload_mod
kinit vmkmkdev
klist vmkperf
less vmkping
libvmkdevmgr.so vmkramdisk
lldpnetmap vmkvsitools
ln vmtar
loadESXEnable vmtoolsd
localcli vmware
lockfile vmware-autostart.sh
logchannellogger vmware-toolbox-cmd
logger vmware-usbarbitrator
login vmware-vimdump
ls vmx
lsof vmx-buildtype
lspci vmx-debug
lsusb vmx-stats
lzop voma
lzopcat vprobe
mcopy vscsiStats
md5sum vsi_traverse
memstats vsish
mkdir vvold
mkfifo watch
mknod watchdog.sh
mktemp wc
more wget
mv which
nc who
net-cdp xargs
net-dvs xkbcomp
net-lacp xz
net-lbt zcat

BootModuleConfig.sh

This Script helps to add/modify/delete the module in the boot,so that you can stop enable the module when ESXi gets boots.

Usage Example:
https://cormachogan.com/2014/03/28/adding-bespoke-firewall-rules-to-esxi/

InstallHelper.sh

Esxupdate Installation Helper Script,this will helps to install the tar ball files by extracting and look for the ./install.sh and install the Custom package.Direction to use only to be used by VMware Partner tarball using ESXCLI.

VmfsLatencyStats.py

Collect and format VMFS latency stats using Gunzip to extract it.
VmfsLatencyStats -E
Stats Path: /var/run/log/vmfsLatencyData_180520_061940.csv.gz

Xorg

Xorg (commonly referred as simply X) is the most popular display server among Linux users.

amldump

acpidump utility analyzes ACPI tables in physical memory and can dump them to a file
Refer : https://www.gsp.com/cgi-bin/man.cgi?section=8&topic=acpidump

apply-host-profiles

This will inbuild command for the host profile assignment.

applyHostProfile

Invoke command use to apply the profile and move the host to maintenance mode.

applyHostProfilewrapper

Inbuild function to call the applyhostprofile.

ash

Used in the shell
Reference : https://linux.die.net/man/1/ash

auto-backup.sh

It will take the backup of the bootbank and the save in the path /tmp &/bootbank

awk

awk command searches files for text containing a pattern

backup.sh

Backup of the following information Bootbank configuration,Alternate bootbank,hardware clock,esxconf

basename 

basename prints NAME with any leading directory components removed. If Suffix is specified, it will also remove a trailing SUFFIX.

bootOption

Get the boot option last state or pull from alternate boot bank

bunzip2 ,bzip2 

Utility (or bzip2 -d) decompresses and restores all specified files whose names end in .bz2

Reference: https://www.mkssoftware.com/docs/man1/bzip2.1.asp

cat

to view the text content.

Reference:http://www.linfo.org/cat.html

chardevlogger

Used by vSAN for the collecting the information or logs in the compress format.

check_serial

Pull the some information from serial connectivity status using commonly in most GNU systems.

chgrp  –associate the user in the group

chkconfig  -to start the service while boot

chmod – change the execution policy

chown – change the owner

chvt – change the virutal terminal

cim-diagnostic.sh – Used to pull the CIM inventory information which will used by inbuild function of the esxi

cim_host_powerops – Power operation of the host via cim

cksum – that generates a checksum value for a file or stream of data

cmmds-tool

Utility which is used for Clustering Monitoring, Membership and Directory Services
Refer : https://www.virtuallyghetto.com/2013/11/restoring-vsan-vm-storage-policies.html

cpio –  copies files to and from archives

crond

Schedule a job can be run on the stimulated time.

Reference: https://www.computerhope.com/unix/ucrontab.htm

crypto-util

You can decrypt or re-encrypt an encrypted core dump on your ESXi host by using the crypto-util CLI
Reference :
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.security.doc/GUID-A8D99C90-A092-46F8-B9C2-F62856C3AC90.html

Cut

The cut command cuts sections of each line of input files and writes it on its standard output. It is mostly used for taking out a few columns from the input files
Reference
https://www.softprayog.in/tutorials/cut-command-in-linux

Date – display the date

dcbd

This package contains the Linux user space daemon and configuration tool for Intel Enhanced Ethernet for the Data Center software.

dcui(direct console user interface)

allows you to interact with the host locally using text-based menus.

dcuiweasel

This interface helps to get into the scripted mode in the intial ESXI boot.You can get the screen when your press shift+O to edit boot options.

dd

dd is a Unix-command-line whose primary purpose is to convert and copy files.

Reference : https://www.geeksforgeeks.org/dd-command-linux/

df

Used to display the partition space available,used and mount volume

dhclient-uw

DHCP Client this help to get the IP address when DCHP is set in the interface.

This are the following logs you observe when you run the command
2018-06-13T12:58:06Z dhclient-uw[2099808]: 2018-06-13T12:58:06Z dhclient-uw[2099808]: sending dhcp-client-identifier: if: vmk0, id: 00:0c:29:0d:cb:a9
2018-06-13T12:58:06Z dhclient-uw[2099808]: Sending option dhcp-client-identifier, value 0x3afa17fab91 (7)
2018-06-13T12:58:08Z dhclient-uw[2099808]: DHCPDISCOVER on vmk0 to 255.255.255.255 port 67 interval 8
2018-06-13T12:58:09Z dhclient-uw[2099808]: DHCPOFFER from 192.168.1.1
2018-06-13T12:58:09Z dhclient-uw[2099808]: DHCPREQUEST on vmk0 to 255.255.255.255 port 67
2018-06-13T12:58:09Z dhclient-uw[2099808]: DHCPACK from 192.168.1.1
2018-06-13T12:58:10Z dhclient-uw[2099808]: bound to 192.168.1.6 — renewal in 35856 seconds.

I recommended not to run this command.

dirname

Print NAME with its trailing /component removed; if NAME contains no /’s, output ‘.’ (meaning the current directory)

Reference : https://linux.die.net/man/1/dirname

dmesg

dmesg is a command on most Unix-like operating systems that prints the message buffer of the kernel. The output of this command typically contains the messages produced by the device drivers.

dnsdomainname
to check if your DNS domain name is set correctly use dnsdomainname command and check output of hostname

doat
doat will wait for a specified amount of time before
executing a command. If the component is already waiting,
the existing timeout will simply be extended.

dosfsck
dosfsck verifies the consistency of MS-DOS file systems and optionally tries to repair them.

du – it similar to df,insist of volume it will should the / partition file size.

echo – it is similar to print command in python or C.

egrep
egrep is a program which will search a given set of data and print every line which contains a given pattern. It is an extension of a program called grep.

Reference:
https://ryanstutorials.net/linuxtutorial/grep.php

eject – eject to drive commonly used to eject the cdrom.

ènum_instances
Library file this property helps to function some CIM functions.

env
It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment

esxcfg– Inbuilt command which helps to administer and manage  the ESXi configuration.

Please refer the Pubs which has detail information.
https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.migration.doc_50%2Fcos_upgrade_technote.1.9.html
https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.server_configclassic.doc_41/esx_server_config/esx_technical_support_commands/r_esx_technical_support_commands.html

esxcfg-fcoe
it is used to discovr,enable,disable and VN2VN EN/DE adaptor
use case blog
https://vresolv.wordpress.com/2017/12/04/unable-to-discover-storage-with-miss-configured-fcoe-modes/

Want to know more about the VN2VN connectivity in FCoE,

Refer eric smith blog

http://brasstacksblog.typepad.com/brass-tacks/2011/03/pt2pt-and-vn2vn-directly-connecting-an-fcoe-initiator-to-an-fcoe-target-part-1-overview.html

esxcfg-ipsec
This helps us to configure IPSEC in the esxi host level.
Reference:
https://kb.vmware.com/s/article/1021769

esxcfg-rescan – rescan,add and remove the device

Reference: http://www.yellow-bricks.com/2008/01/25/rescan-all-vmhbas-at-once-with-the-esxcfg-rescan-command/

esxhpcli
serves as a CLI tool to access Host Profiles. The CLI tool is designed to test at various levels in the Host Profiles stack.Based on the operation level chosen, this CLI can invoke host profiles through Hostd via VI API, by invoking the Host Profile Engine directly,or bypassing the Host Profile Engine and invoking profile plug-ins directly.

esxtop
Inbuild tool to monitor and analyse the performance of host objects.

Reference : http://www.yellow-bricks.com/esxtop/

esxupdate
This command will be invoke when running esxcli software variables

ethtool
Display standard information about ethernet device.

Reference: https://www.lifewire.com/ethtool-linux-command-4095412

expr
Unix utility which evaluates an expression and outputs the corresponding value

fdisk
disk is a command-line utility that provides disk partitioning functions.

Reference : https://www.computerhope.com/unix/fdisk.htm

fgrep

fgrep command searches the input files specified by the File parameter (standard input by default) for lines that match a pattern.

Reference: https://www.computerhope.com/unix/ufgrep.htm

firmwareConfig

This helps to update the boot configuration parameter of the ESXi during the abrupt power state of the host.You can backup and restore the ESXi Config in the boot state
Reference KB : https://kb.vmware.com/s/article/2001780

gdbserver

using this tool to debug your application remotely.

Reference : http://man7.org/linux/man-pages/man1/gdbserver.1.html

generate-certificates

to generate new certificates.

VMware Docs : https://docs.vmware.com/en/VMware-vSphere/5.5/com.vmware.vsphere.security.doc/GUID-EA0587C7-5151-40B4-88F0-C341E6B1F8D0.html

genisoimage

genisoimage is a pre-mastering program to generate ISO9660/Joliet/HFS hybrid filesystems.
Source : https://www.unixmen.com/create-iso-image-genisoimage-tool/

Getty  –Manage your terminal session.
Reference : https://wiki.archlinux.org/index.php/Getty

GPUvm – open architecture for hypervisor-level GPU virtualization
Reference : https://www.usenix.org/node/184003

grabCIMData – Remotely query the hardware stats via this internal call.
Reference : https://devops.mentacityventures.com/xymon-vmware-esxi/

grep  – Similar to pulling required keyword or similar to find the word document..

Reference: http://man7.org/linux/man-pages/man1/grep.1.html

gunzip,gzip – compress the files
Reference Usage :
https://www.lifewire.com/example-uses-of-the-gunzip-command-4081346
https://www.tutorialspoint.com/unix_commands/gzip.htm

halt this will shutdown the host,but not the raid controller cache.
Referece KB: https://kb.vmware.com/s/article/1013193

hbrfilterctl

This helps to monitor your SRM replication status.Author William Lam wrote an article about its use case.
Reference : https://www.virtuallyghetto.com/2011/07/hbr-host-based-replication-cli-for-srm.html

Head  – Helpful while analysing the logs in the host level.
Reference : https://shapeshed.com/unix-head/

hexdump – This helps to convert the format from bit,decimal to HEX format.

host_reboot.sh – Invoke host reboot and reboot the ESXi host.

host_shutdown.sh – Invoke host shutdown and shutdown the ESXi host.

Hostd

Hostd helps the vcenter to management the each host connected in inventory.In other words we can call as host agent.

hostd_probe
The hostd-probe process is a process to monitor hostd

hostd_probe.sh
Script will invoke and collect the logs of the hostd and hostd_probe log.

hostdCgiServer
Common gateway interface(CGI) incase the hostd is hungs,this helps to collect via like backdoor.

hostname
Describes your host name of the esxi

hwclock
utility for accessing the hardware clock, also referred to as the Real Time Clock (RTC).
Reference :  http://man7.org/linux/man-pages/man8/hwclock.8.html

imaShim32d
IMA (iSCSI Management API) which helps in discovery,authenticate and path policy for iSCSI storage export.

indcfg
CIM Use the SNMP to exchange the management information about the device.I believe this can be call via the WQL(Windows Management Instrumentation Query Language)

inetd provides Internet services.
Referece: https://en.wikipedia.org/wiki/Inetd

init
Module loads after the OS kernel

As per TLDP,”When init starts, it becomes the parent or grandparent of all of the processes that start up automatically on your Linux system”

Reference:  https://www.tldp.org/LDP/intro-linux/html/sect_04_02.html

init-launcher
Install the plugin and helps to add the module in starting configuration.

initterm.sh
Helps to view the esxi to view via serial connection.

install
this script helps in the handling the installation.

irqinfo
list the interrupt currently running

isoinfo
tility to perform directory like listings of iso9660 images

jumpstart
Helps in loading the plugin available in the host.

kdestroy
utility destroys the user’s active Kerberos authorization tickets by writing zeros to the specified credentials cache.

kill
Helps in terminating the process

kinit
used to obtain and cache Kerberos ticket-granting tickets

klist
list the ticktes available in cache

libvmkdevmgr.so – Some library file.

lldpnetmap
Identifies upstream network switches using LLDP.

Reference:
https://www.virtuallyghetto.com/2014/05/quick-tip-lldpnetmap-a-handy-utility-to-map-pnic-to-pswitch-on-esxi.html

ln
Link file viewer.
Reference:
http://technorians.com/site/mastering-vsphere-6-5-esxi-logs/

loadESXEnable
This helps to enable the quick boot of ESXi and this is new feature provided for faster reboot.
Reference :  https://kb.vmware.com/s/article/52477

localcli
localcli commands are equivalent to ESXCLI commands, but bypass hostd. The localcli commands are only for situations when hostd is unavailable and cannot be restarted. After you run a localcli command, you must restart hostd
Not recommended to use in production.

Reference :
https://www.vcdx200.com/2017/03/esxi-localcli.html

lockfile
a lockfile-like program for ESXi

logchannellogger
This helps you redirect the logs files to specfic directory and remote path.

Reference:
https://blogs.vmware.com/vsphere/2014/10/vmware-virtual-san-performance-testing-part-iii.html

logger

Logger this helps to redirect to standard error(stderr) to device and respective to tags.

Login
Login helps to connect to remote host and preserve the environment authenticate source.Does work like putty.

ls
List the files

lsof
Use to list open files.
Reference:  https://www.tecmint.com/10-lsof-command-examples-in-linux/

lspci
lspci is a utility for displaying information about PCI buses in the system and devices connected to them
Reference:  http://www.tutorialspoint.com/unix_commands/lspci.htm

lsusb
utility for displaying information about USB buses in the system and the devices connected to them
Reference:
https://www.systutorials.com/docs/linux/man/8-lsusb/

lzop
compression tool which implements the LZO algorithm.
Reference:  https://linux.die.net/man/1/lzop

lzopcat
This helps in view of the compress data

mcopy
helps to copy the multiple files in the name directory.
Reference: http://www.dca.fee.unicamp.br/sysadmin/helpstuff/mtools/mcopy.html

md5sum
Helps to verify the checksum of the download files.
Reference:  https://www.tutorialspoint.com/unix_commands/md5sum.htm

memstats
MemStats populates m with memory allocator statistics
Reference : https://kb.vmware.com/s/article/2043413

mkdir
to Create a directory in the specific path and create in the child path.

mkfifo
Helps in creation of FIFO files.
Reference:- http://pubs.opengroup.org/onlinepubs/009604499/functions/mkfifo.html

mknod
Helps in creation of filesystem node.
Reference: http://man7.org/linux/man-pages/man2/mknod.2.html

mktemp
Create a temporary file or directory, safely, and print its name.

more
Use while using grep and list the more content.

mv
Move file from one directory to another directory or file path.

Advertisements