hostdiagnostics.pl - Extracts the specified log from the host of the virtual center
hostdiagnostics.pl[options]
This VI Perl command-line utility displays the log from the host or VC and allows user to monitor the log
Optional. Key of log file being monitored. Default file is hostd
Optional.Output the last N lines. if e.g. 2 is given log of last 2 lines is displayed
Optional. This is used to monitor log file and append data as it grows
Optional. Used with follow sleep for S seconds between iterations.
Optional.Extract the entire diagnostic bundle as a zip file
Display log of hostd file:
hostdiagnostics.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --log hostd
Display log details of hostd file's last 2 lines:
hostdiagnostics.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --log hostd --lines 2
Monitoring the log of hostd file and append the data as it grows using follow:
hostdiagnostics.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --log hostd --follow
Monitoring the log of hostd file and append the data as it grows using follow and sleep for 4 seconds between the iterations:
hostdiagnostics.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --log hostd --follow --sleep 4
Generate the zip file of the log:
hostdiagnostics.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --log hostd --bundle
All operations work with VMware VirtualCenter 2.0.1 or later.
All operations work with VMware ESX server 3.0.1 or later.