The osinfo command displays information about the operating system running on either the local or a designated host system. osinfo is a CIM Client application and requires a CIM Server to be running on the target system.
If a property value is unavailable, the value "UNKNOWN" will be displayed.
By default, information about the operating system running on the local system is displayed.
osinfo recognizes the following options:
-s |
Enable the use of the SSL protocol between osinfo and the CIM server. The -s option should be specified if the CIM Server on the specified hostname/portnumber expects clients to connect using HTTPS. This option is ignored if neither hostname nor portnumber is specified. |
-h hostname |
Connect to the CIM Server on the specified hostname. If this option is not specified, osinfo connects to the local host. |
-p portnumber |
Connect to the CIM Server on the specified portnumber. If this option is not specified, osinfo connects to the default port for the wbem-http service, or if the -s option is specified, to the default port of the wbem-https service. |
-u username |
Connect as the specified username. If username is not specified, the current logged in user is used for authentication. This option is ignored if neither hostname nor portnumber is specified. |
-w password |
Authenticate the connection using the specified password. If the password is not specified, the user is prompted for a password. This option is ignored if neither hostname nor portnumber is specified. |
-t timeout |
Defines the number of milliseconds to wait for a response before "timing out" the operation. The default timeout value is 2000. The timeout value must be an integer value greater than 0. |
-c |
Use the CIM formats for DateTime and SystemUpTime values (not the formatting done by default). As specified by the DMTF, the CIMDateTime format is yyyymmddhhmmss.mmmmmmsutc, where yyyy is a 4-digit year, mm is the month, dd is the day, hh is the hour on a 24-hour clock, mm is the minute, ss is the second, mmmmmm is the number of microseconds, s is a "+" or "-" indicating the sign of the UTC (Universal Time Code) correction field (since the DateTime is returned in the local time zone of the system), and utc is the offset from UTC in minutes. |
When an error occurs, an error message is written to stderr and an appropriate value is returned. The following values are returned:
0 | Success |
1 | Error |
osinfo error: Cannot connect to: <hostname >: <portnumber >
Run the default osinfo command on bryce.
From bryce, display information about the operating system running on bodie.
From bryce, display information about the operating system running on bodie, but this time specify a ridiculously short timeout value.
osinfo uses the WBEM (Web-Based Enterprise Management) and CIM (Common Information Model) standards specified by the DMTF (Distributed Management Task Force).
osinfo was developed by the Hewlett-Packard Company.