hostinfo.pl - Display the Processor, Network and Memory attributes of the hosts.
hostinfo.pl [options]
This command provides a query tool that lists various hosts and attributes for a host or set of hosts.
Optional. Name of the datacenter. When datacenter is specified, the hosts will be searched in this specified datacenter also.
Optional. An xml filename or path of an xml filename to which the output will be written to. If fileoutput not used, the output will be displayed.
Optional. Name of a folder. When folder is specified, only hosts in the specified folder are listed.
Optional. Filters host based on maintenancemode. The flag to indicate whether or not the host is in maintenance mode.
Optional. Filters host based on VMotion enabled or disabled. The flag to indicate whether or not VMotion is enabled on this host.
Optional. Refer to FIELD OPTIONS for details
Optional. Display hostname property.
Optional. Display portnumber property, which lists the port number.
Optional. Display bootTime property, which displays the time when the host was booted in dateTime format.
Optional Display cpumodel property which, It provides the cpu model identification.
Optional. Display cpuspeed property. The product of the speed of cpu cores and number of processors contained by a CPU package is approximately equal to the sum of the MHz for all the individual cores on the host. This product forms the cpuspeed.
Optional. Display cpuusage property, which specifies the aggregated CPU usage across all cores on the host in MHz.
Optional. Display filesystem property, which describes the file system volume information for the host, listing the supported file system volume types.
Optional. Display host_status property, which gives the overall alarm status of the host.
Optional. Display maintenancemode propery, which indicates whether or not the host is in maintenance mode. It is set when the host has entered the maintenance mode.
Optional. Display memorysize propery, which provides the physical memory size in bytes.
Optional. Display memoryusage property, which gives the physical memory usage on the host in MB.
Optional. Display the networkadapters property, which gives the number of network adapters.
Optional. Display the reebootrequired.propery, which indicates whether or not the host requires a reboot due to a configuration change.
Optional. Display the software property, which gives the complete product name, including the version information
Optional. Display the VMotion property, which indicates whether VMotion is enabled or disabled for the host.
List all hosts and all properties of the hosts that are part of ha datacenter.
hostinfo.pl --username administrator --password mypassword --url https://<ipaddress>:<port>/sdk/webService --datacenter ha
List all hosts that are part of ha datacenter and selected properties of the hosts, as specified in the fields
hostinfo.pl --username administrator --password mypassword --url https://<ipaddress>:<port>/sdk/webService --fields hostname,portnumber,boottime,cpumodel,cpuspeed, cpuusage,filesystem,host_status,maintenancemode, memorysize,memoryusage,networkadapters, rebootrequired,software,vmotion --datacenter ha
List all hosts and all the properties of the hosts. The results are displayed in the file mentioned in fileoutput.
hostinfo.pl --username administrator --password mypassword --url https://<ipaddress>:<port>/sdk/webService --fileoutput D:\Output\result.xml
Lists the properties of all the hosts having their maintenance mode and vmotion property as specified in maintenancemode and vmotion respectively.
hostinfo.pl --username administrator --password mypassword --url https://<ipaddress>:<port>/sdk/webService --maintenancemode 0 --vmotion 1
Lists the properties of all the hosts part of the folder as specified in folder.
hostinfo.pl --username administrator --password mypassword --url https://<ipaddress>:<port>/sdk/webService --folder myfolder