NAME

hostdiagnostics.pl - Extracts the specified log from the ESX server host or VirtualCenter server host.


SYNOPSIS

 hostdiagnostics.pl [options]


DESCRIPTION

This command displays the log for the ESX server host or VirtualCenter server host and allows users to monitor the log.


OPTIONS

log

Optional. Key of log file being monitored. Default file is hostd.

lines

Optional. Output the last N lines. For example, if you specify 2, a log of the last 2 lines is displayed.

follow

Optional. This is used to monitor log file and append data as it grows.

sleep

Optional. Used with follow sleep for S seconds between iterations.

bundle

Optional. Extract the entire diagnostic bundle as a zip file.

host

Optional. Name of the host. It is required when running via VirtualCenter.


EXAMPLES

Display log of hostd file:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd

Display log details of hostd file's last 2 lines:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd --lines 2

Monitor the hostd's log file and append new data as the file grows, if running via host directly:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd --follow

If running via virtual center, give the host name also:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd --follow --host myhost

Monitor the host's log file and append new data as the file grows. Sleep for 4 seconds between the iterations. If running via host:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd --follow --sleep 4

If running via virtual center:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
  myuser --password mypassword  --log hostd --host myHost

Generate the zip file of the log:

 hostdiagnostics.pl --url https://<ipaddress>:<port>/sdk/vimService --username
 myuser --password mypassword  --log hostd --bundle