NAME

hostinfo.pl - Display the Processor, Network and Memory attributes of the hosts.


SYNOPSIS

 hostinfo.pl [options]


DESCRIPTION

This command provides a query tool that lists various hosts and attributes for a host or set of hosts.


OPTIONS

datacenter

Optional. Name of the datacenter. When datacenter is specified, the hosts will be searched in this specified datacenter also.

fileoutput

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.

folder

Optional. Name of a folder. When folder is specified, only hosts in the specified folder are listed.

maintenancemode

Optional. Filters host based on maintenancemode. The flag to indicate whether or not the host is in maintenance mode.

vmotion

Optional. Filters host based on VMotion enabled or disabled. The flag to indicate whether or not VMotion is enabled on this host.

fields

Optional. Refer to FIELD OPTIONS for details

FIELD OPTIONS

hostname

Optional. Display hostname property.

portnumber

Optional. Display portnumber property, which lists the port number.

boottime

Optional. Display bootTime property, which displays the time when the host was booted in dateTime format.

cpumodel

Optional Display cpumodel property which, It provides the cpu model identification.

cpuspeed

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.

cpuusage

Optional. Display cpuusage property, which specifies the aggregated CPU usage across all cores on the host in MHz.

filesystem

Optional. Display filesystem property, which describes the file system volume information for the host, listing the supported file system volume types.

host_status

Optional. Display host_status property, which gives the overall alarm status of the host.

maintenancemode

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.

memorysize

Optional. Display memorysize propery, which provides the physical memory size in bytes.

memoryusage

Optional. Display memoryusage property, which gives the physical memory usage on the host in MB.

networkadapters

Optional. Display the networkadapters property, which gives the number of network adapters.

rebootrequired

Optional. Display the reebootrequired.propery, which indicates whether or not the host requires a reboot due to a configuration change.

software

Optional. Display the software property, which gives the complete product name, including the version information

vmotion

Optional. Display the VMotion property, which indicates whether VMotion is enabled or disabled for the host.


EXAMPLES

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


SUPPORTED PLATFORMS

This script works with VMware VirtualCenter 2.0 or later.

This script works with VMware ESX 3.0 or later.