## osinfo

### NAME

osinfo - returns infomation about the operating system running on a host system.

### SYNOPSIS

osinfo [-s] [-h hostname] [-p portnumber] [-u username] [-w password] [-t timeout] [-c]

### DESCRIPTION

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.

### OPTIONS

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.

### EXIT STATUS

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

### DIAGNOSTICS

osinfo error: Cannot connect to: <hostname >: <portnumber >

There was a failure attempting to connect to the CIM Server running on the target host system.

### EXAMPLES

Run the default osinfo command on bryce.

osinfo
OperatingSystem Information
Host: bryce.cup.hp.com
Name: HP-UX
Version: B.11.00
UserLicense: Unlimited user license
Number of Users: 4 users
Number of Processes: 71 processes
OSCapability: 32 bit
LastBootTime: Sep 24, 2001 9:16:6 (-0700)
LocalDateTime: Feb 9, 2003 18:59:43 (-0700)
SystemUpTime: 43497817 seconds = 503 days, 10 hrs, 43 mins, 37 secs

From bryce, display information about the operating system running on bodie.

osinfo -s -h bodie -u guest -w guest
OperatingSystem Information
Host: bodie.cup.hp.com
Name: HP-UX
Version: B.11.00
UserLicense: Unlimited user license
Number of Users: 0 users
Number of Processes: 67 processes
OSCapability: 32 bit
LastBootTime: May 28, 2002 11:10:25 (-0700)
LocalDateTime: Feb 10, 2003 18:18:5 (-0700)
SystemUpTime: 22320460 seconds = 258 days, 8 hrs, 7 mins, 40 secs
Host: bryce.cup.hp.com

From bryce, display information about the operating system running on bodie, but this time specify a ridiculously short timeout value.

osinfo -s -h bodie -u guest -w guest -t1
osinfo error: connection timed out

### Standards Conformance

osinfo uses the WBEM (Web-Based Enterprise Management) and CIM (Common Information Model) standards specified by the DMTF (Distributed Management Task Force).

### Author

osinfo was developed by the Hewlett-Packard Company.