1osinfo(1) osinfo(1)
2
3
4
6 osinfo - gather information regarding the running operating system
7
9 osinfo [ -s ] [ -h hostname ] [ -p portnumber ]
10 [ -u username ] [ -w password ] [ -t timeout ]
11 [ -c ] [ --help ] [ --version ]
12
14 The osinfo command displays information regarding the operating system,
15 gathered via WBEM using the PG_OperatingSystem class supported by the
16 OperatingSystem Provider (bundled with OpenPegasus). osinfo requires
17 the CIM Server to be installed and running.
18
19 By default, the information is formatted for display, converting CIM‐
20 DateTime strings into a more user-readable format (see Examples), and
21 converting the total number of seconds of uptime into the appropriate
22 number of days, hours, minutes, and seconds.
23
24 If a property value is unavailable, it will be shown as "Unknown"
25
26 Options
27 osinfo recognizes the following options:
28
29 -c Use the CIM formats for DateTime and SystemUpTime
30 values (not the formatting done by default). As
31 specified by the DMTF, the CIMDateTime format is
32 yyyymmddhhmmss.mmmmmmsutc, where yyyy is a
33 4-digit year, mm is the month, dd is the day, hh
34 is the hour on a 24-hour clock, mm is the minute,
35 ss is the second, mmmmmm is the number of
36 microseconds, s is a "+" or "-" indicating the
37 sign of the UTC (Universal Time Code) correction
38 field (since the DateTime is returned in the
39 local time zone of the system), and utc is the
40 offset from UTC in minutes.
41
42 -h hostname Connect to the CIM Server on the specified host.
43 If this option is not specified, osinfo connects
44 to the localhost.
45
46 --help Display command usage information.
47
48 -p portnumber Connect to the CIM Server on the specified port
49 number. If this option is not specified, osinfo
50 connects to the default port for the wbem-http
51 service, or if the -s option is specified, to the
52 default port for the wbem-https service.
53
54 -s Enable the use of the SSL protocol between osinfo
55 and the CIM server. The -s option should be
56 specified if the CIM Server on the specified
57 hostname/portnumber expects clients to connect
58 using HTTPS.
59
60 -t timeout Wait the specified number of milliseconds on
61 sending a request, before timing out if no
62 response has been received. The timeout value
63 must be an integer value greater than 0.
64
65 -u username Connect as the specified R username . If user‐
66 name is not specified, the current logged in user
67 is used for authentication. This option is
68 ignored if neither hostname nor portnumber is
69 specified.
70
71 --version Display CIM Server version.
72
73 -w password Authenticate the connection using the specified
74 password . This option is ignored if neither
75 hostname nor portnumber is specified. WARNING: A
76 password should not be specified on the command
77 line on a multi-user system, since command-line
78 options are typically world-readable for a short
79 window of time. If the remote host requests
80 authentication and this option is not specified,
81 osinfo will prompt for the password.
82
84 When an error occurs, an error message is written to stderr and an
85 appropriate value is returned. The following values are returned:
86
87 0 Success
88 1 Error
89
91 The osinfo command requires that the CIM Server is running.
92
94 osinfo error: Cannot connect
95
96 The CIMOM is not running. Start the CIMOM with the cimserver
97 command and re-run osinfo .
98
100 Run the default osinfo command.
101
102
103 OperatingSystem Information
104 Host: myserver.hp.com
105 Name: HP-UX
106 Version: B.11.00
107 UserLicense: Unlimited user license
108 OSCapability: 32 bit
109 LastBootTime: Sep 24, 2001 9:16:18 (-0700)
110 LocalDateTime: May 23, 2002 10:55:54 (-0700)
111 SystemUpTime: 20828377 seconds = 241 days, 1 hr, 39 mins, 37
112 secs
113
114 The system myserver.hp.com is running version B.11.00 of HP-UX,
115 has an unlimited user license, and is 32-bit capable. The Oper‐
116 ating System was last booted on Sept 24, 2001 and the local date
117 and time are given. All time values are offset from GMT by -7
118 hours.
119
120 Run osinfo , with the values displayed in their CIM format
121
122 osinfo -c
123
124 OperatingSystem Information
125 Host: rushmore.cup.hp.com
126 Name: HP-UX
127 Version: B.11.00
128 UserLicense: Unlimited user license
129 OSCapability: 32 bit
130 LastBootTime: 20010924091618.000000-420
131 LocalDateTime: 20020523105801.000000-420
132 SystemUpTime: 20828504
133
134 The same rushmore.cup.hp.com system is displayed, but in this
135 output the LastBootTime and LocalDateTime values are in the CIM
136 format. The SystemUpTime value is in total seconds (as speci‐
137 fied by CIM). Other fields do not change, as their CIM specifi‐
138 cation is the strings themselves.
139
141 cimserver(1).
142
144 osinfo : DMTF WBEM (Web-Based Enterprise Management) and CIM
145 (Common Information Model)
146
147
148
149 osinfo(1)