# WBEM Provider Data Sheet

# Operating System Provider

This data sheet provides information about the Operating System WBEM provider (implemented using the Pegasus C++ API).

This provider supports the CIM_OperatingSystem class, as well as a PG_OperatingSystem subclass that adds the properties SystemUpTime and OperatingSystemCapability. The intended audience of this document is software professionals who will design, implement, enhance, and/or support client applications that will use this provider.

This data sheet is maintained in open source and is updated frequently. This version was last updated 17-May-2002. See the Pegasus open source site (http://cvs.opengroup.org/cgi-bin/cvsweb.cgi/pegasus/), location pegasus/src/Providers/ManagedSystem/OperatingSystem/doc/OSProvider.htm, for the most recent version.

Keywords: (Pegasus C++ API, Operating System, Linux, HP-UX, Debian, Managed System Identity, CIM_OperatingSystem, PG_OperatingSystem)

Table Of Contents

1. Provider Overview ( Description, Requirements, Release History, Supported Managed Resources, Special Requirements & Dependencies )

2. Setting Up This Provider ( Installing, Configuring )

3. Using This Provider ( Schema Supported, Indications Generated, Associations Provided )

4. Links To More Information ( Additional Provider Documentation, WBEM Information, Managed Resource Information, Client Information, Support Contacts, Migration and Co-existence Information, Possible Provider Enhancements )

5. Limitations, Known Defects, and Performance Considerations

### 1. Provider Overview

· Description
This provider is for use by clients as part of a basic understanding of the identity of the Managed System on which this provider is running (typically a server or appliance). This Operating System provider implements a CIM_OperatingSystem and a PG_OperatingSystem subclass of CIM_OperatingSystem (adding the properties of SystemUpTime and OperatingSystemCapability). SystemUpTime is a convenience property. It provides direct access to this value, versus having clients/providers calculate the value from LastBootUpTime and the LocalDateTime. OperatingSystemCapability exposes if the OS itself is 32-bit or 64-bit capable.

· Requirements
The Operating System Provider is implemented and tested on HP-UX, Debian Linux, and Windows (although with varying property implementations for each). The Linux mechanism for getting maximum number of processes will only work on Linux kernels 2.4.* or later. The HP-UX mechanism for determining the capability of the OS will work on versions 11.0 and 11.11.

· Release History
22-Apr-2002 - Added Linux-specific code paths from Linux_OperatingSystem provider. Added support for additional properties for HP-UX and Windows, including Caption, Description, Status for both and LicensedUsers for HP-UX.
19-Mar-2002 - submittal of generic OS provider with HP-UX specific code paths and - Windows paths to return OS version, type, bootup time, time, timezone, and memory information.
26-Feb-2002 - initial release of provider for Linux_OperatingSystem, submitted to Pegasus open source community.

· Supported Managed Resources
Managed systems (servers, appliances, desktops) running HP-UX 11.0 and 11.11, Linux, and Windows.

· Special Requirements & Dependencies
The Linux mechanism for getting maximum number of processes will only work on Linux kernels 2.4.* or later.

### 2. Setting Up This Provider

· Installing This Provider

This generic Operating System provider is available from the Pegasus open source site(http://cvs.opengroup.org/cgi-bin/cvsweb.cgi/pegasus/) with the following CVS tree locations:

o Makefile, headers, and source: pegasus/src/Providers/ManagedSystem/OperatingSystem/

o Schema MOF file: pegasus/Schemas/pegasus/ManagedSystem/VER20/PG_OperatingSystem20.mof

o Provider registration MOF file: pegasus/Schemas/pegasus/ManagedSystem/VER20/PG_OperatingSystem20R.mof

· The provider executable is "libOSProvider.sl", called "OSProvider" in the registration MOF (to differentiate it from the Pegasus OS provider in the Generic directory, else provider registration results in confusion). Provider is registered to support the /root/cimv2 namespace as an instance provider and method provider. There are no special installation instructions; will be installed by default in most Pegasus-based product releases. The OS security mechanisms will be used to authorize invocation of methods such as shutdown and reboot (must be root) when they are enabled.

· Configuring This Provider
This provider does not accept specific configuration adjustments (beyond standard WBEM support).

### 3. Using This Provider

Schema supported by this provider
This provider supports the CIM_OperatingSystem and PG_OperatingSystem classes. Tables 1 through 4 describe the properties and methods supported by the provider.

Table 1 describes the properties of the CIM_OperatingSystem class. It has three columns. The first is the property name (including type and units), the second is the property inheritance (indicating which class or superclass defines the property), and the third is the property’s value and data source. Each row describes a property.

Table 1: CIM_OperatingSystem Properties

Property Name | Property Inheritance | Property Value (& data source)
string Caption | Inherited from CIM_ManagedElement | HP-UX, Linux, Windows: Returns "The current Operating System"
string Description | Inherited from CIM_ManagedElement | HP-UX, Linux, Windows: Returns "This instance reflects the Operating System on which the CIMOM is executing (as distinguished from instances of other installed operating systems that could be run)."
datetime InstallDate | Inherited from CIM_ManagedSystemElement | HP-UX, Linux, Windows: Not implemented
string Status | Inherited from CIM_ManagedSystemElement | HP-UX, Linux, Windows: Returns "Unknown" (although if the OS is running enough for CIMOM to function, may consider "OK", but would need to distinguish it from "Degraded" or "Stopping")
string CSCreationClassName [Key] | Local to CIM_OperatingSystem | HP-UX, Linux, Windows: Returns “CIM_UnitaryComputerSystem”
string CSName [Key] | Local to CIM_OperatingSystem | HP-UX, Linux: Returns the system name (fully qualified if possible). Gets the fully qualified system name from the gethostbyname() system call, or if that fails, uses the hostname obtained from the gethostname() system call. Windows: Not implemented
string CreationClassName [Key] | Local to CIM_OperatingSystem | HP-UX, Linux, Windows: Returns “CIM_OperatingSystem” (even for PG_OS, since actually the same instance, thus the same keys, just additional properties)
string Name [Key] | Inherited from CIM_ManagedSystemElement (and made one of 4 keys of CIM_OperatingSystem) | HP-UX, Linux: the name of this system, from the sysname field of the uname() system call. Windows: Not implemented.
uint16 OSType | Local to CIM_OperatingSystem | HP-UX: 8 Linux: 36 Windows: appropriate value for Windows OS type.
string OtherTypeDescription | Local to CIM_OperatingSystem | HP-UX, Windows: Not implemented Linux: the LINUX vendor name and release (from /etc/ files)
string Version | Local to CIM_OperatingSystem | HP-UX: the release info from the uname() system call (for example, B.11.20) Linux: the release and version info from the uname() system call Windows: major and minor version and build number
datetime LastBootUpTime | Local to CIM_OperatingSystem | HP-UX: boot_time field from pstat() system call (local time with GMT offset) Linux: info from /proc/uptime file Windows: Not implemented
datetime LocalDateTime | Local to CIM_OperatingSystem | HP-UX, Linux: info from time() system call (local time with GMT offset) Windows: GetLocalTime system call NOTE: could change all to use CIMOM local time call
sint16 CurrentTimeZone | Local to CIM_OperatingSystem | HP-UX, Linux: Info from time() system call gmtoff Windows: GetTimeZoneInformation system call
uint32 NumberOfLicensedUsers | Local to CIM_OperatingSystem | HP-UX: number of licensed users from interpreting the version string of the uname() system call (0 if unlimited or 128 or 256) Linux: Return 0 (since unlimited) Windows: Not implemented
uint32 NumberOfUsers | Local to CIM_OperatingSystem | HP-UX, Linux: The number of ut_users from getutent calls Windows: Not implemented
uint32 NumberOfProcesses | Local to CIM_OperatingSystem | HP-UX: The number of active processes from the pstat() system call. Linux: The number of process entries in the /proc directory (tell by entry name characters) Windows: Not implemented
uint32 MaxNumberOfProcesses | Local to CIM_OperatingSystem | HP-UX: max_proc from the pstat() system call Linux: info from the /proc/sys/kernel/threads-max file (which only works on kernels 2.4.* or later) Windows: Not implemented
uint64 TotalSwapSpaceSize (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: The sum of KB available across all swap from the swapinfo -q command Linux: Returns 0 (Linux has no swap space, only paging space) Windows: Not implemented
uint64 TotalVirtualMemorySize (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: The sum of KB available across all swap from the swapinfo -q command (same as SwapSize) Linux: Info from the /proc/meminfo file (SwapTotal) Windows: GlobalMemoryStatus system call
uint64 FreeVirtualMemory (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: The sum of KB free across all swap from the swapinfo -at command Linux: Info from the /proc/meminfo file (SwapFree) Windows: Info from the GlobalMemoryStatus system call
uint64 FreePhysicalMemory (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: Info from the pstat() system call (psd_free) Linux: Info from the /proc/meminfo file (MemFree) Windows: Info from the GlobalMemoryStatus system call
uint64 TotalVisibleMemorySize (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: Info from the pstat() system call; physical memory adjusted for page size Linux: Not implemented Windows: Info from the GlobalMemoryStatus system call
uint64 SizeStoredInPagingFiles (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: Returns 0 (no paging files) Linux: Not implemented Windows: Info from the GlobalMemoryStatus system call
uint64 FreeSpaceInPagingFiles (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: Returns 0 (no paging files) Linux: Not implemented Windows: Info from the GlobalMemoryStatus system call
uint64 MaxProcessMemorySize (in KiloBytes) | Local to CIM_OperatingSystem | HP-UX: The sum of the data, text, and stack sizes retrieved via the kmtune command Linux: Info from the /proc/sys/vm/overcommit_memoryt file Windows: Info from the GetSystemInfo system call
boolean Distributed | Local to CIM_OperatingSystem | HP-UX, Linux: Returns FALSE Windows: Not implemented
uint32 MaxProcessesPerUser | Local to CIM_OperatingSystem | HP-UX, Linux: Returns _SC_CHILD_MAX value from sysconf() system call Windows: Not implemented

Table 2 describes the properties of the PG_OperatingSystem class. It has three columns. The first is the property name (including type and units), the second is the property inheritance (indicating which class or superclass defines the property), and the third is the property’s value or data source. Each row describes a property.

Table 2: PG_OperatingSystem Properties

Property Name | Property Inheritance | Property Value (& data source)
The PG_OperatingSystem class inherits properties of superclass CIM_OperatingSystem (as described in Table 1 and not repeated here).
uint64 SystemUpTime (in seconds) | Local to PG_OperatingSystem | HP-UX: Calculated from current time and BootUpTime. Windows: Not implemented.
string OperatingSystemCapability | Local to PG_OperatingSystem Defined as a String (vs. enum) for maximum flexibility across OS capability representations. | HP-UX: Returns "32 bit" or "64 bit" (number of bits used by the kernel for pointers). Windows: Not implemented.

Tables 3 and 4 describe the intrinsic methods and extrinsic methods for CIM_OperatingSystem and inherited by PG_OperatingSystem; there are no local methods within PG_OperatingSystem. The GetInstance operation is supported on both classes (returning only CIM_ properties for CIM_OperatingSystem). Enumerate operations only return instances on the PG_ subclass (as the CIMOM will invoke subclass providers on enumerations). The Provider currently registers as an Instance Provider and a Method Provider.

Table 3 describes the intrinsic methods supported by this provider. It has three columns. The first is the method name, the second is a description of the provider’s actions based on invoking that method, and the third is a list of any exceptions that could result from invoking the method. Each row describes a method.

Table 3: Intrinsic Methods for CIM_OperatingSystem and PG_OperatingSystem

Method Name | Description | Exceptions Thrown
EnumerateInstances | Returns all instances of class (expect one unless include installed OSs) with all properties | None
EnumerateInstanceNames | Returns all instances of class (expect one unless include installed OSs) with key properties | None
GetInstance | Returns the requested instance (with all properties). | CIM_ERR_INVALID_PARAMETER (if wrong class, wrong number of keys, or wrong keys) CIM_ERR_NOT_FOUND (from CIMOM) if no instance
ModifyInstance | Returns Not Supported | CIM_ERR_NOT_SUPPORTED
DeleteInstance | Returns Not Supported | CIM_ERR_NOT_SUPPORTED
Initialize | Does nothing | None
Terminate | Does nothing | None
CreateInstance | Returns Not Supported | CIM_ERR_NOT_SUPPORTED

Table 4 describes the extrinsic methods supported by this provider. It has three columns. The first is the method name, the second is a description of the provider’s actions based on invoking that method, and the third is a list of any exceptions that could result from invoking the method. Each row describes a method.

Table 4: Extrinsic Methods for CIM_OperatingSystem

Method Name | Description | Exceptions thrown
Reboot | HP-UX and Linux: invokes OS reboot command from /sbin, /usr/sbin, or /usr/local/sbin Could add more cleanup before actual command execution. | HP-UX, Linux: currently disabled (NotSupported) Windows: Not implemented
Shutdown | HP-UX: invokes shutdown command from /sbin, /usr/sbin, or /usr/local/sbin Linux: invokes OS poweroff command from /sbin, /usr/sbin, or /usr/local/sbin Could add more cleanup before actual command execution. | HP-UX, Linux: currently disabled (NotSupported) Windows: Not implemented

· Indications generated by this provider
This provider does not currently generate any indications.

· Associations provided by this provider
This provider does not currently support any associations (but logical extensions would be the RunningOS and InstalledOS associations to a ComputerSystem).

### 4. Links To More Information

· Additional Provider Documentation
There is currently no additional documentation for this provider beyond this information and that in the Pegasus source tree (listed in Installing This Provider).

See also the man pages for information on the various commands and system calls noted in the descriptions above.

· WBEM information
For a CIM tutorial, go to http://dmtf.org/education/cimtutorial.php.
For information about the Pegasus WBEM infrastructure, see http://www.opengroup.org/pegasus .
For information about WBEMsource, see http://www.wbemsource.org.

· Managed Resource Documentation
Information regarding each operating system can be found in the man pages and manuals of that operating system.

· Client Information
None.

· Support Contacts
None.

· Migration and Co-existence Information
None.

· Possible provider enhancements
There are a number of enhancements that could be made to this provider.
(1) All properties are currently read-only. Could add support to change appropriate values (probably via modifyInstance). Support for createInstance and deleteInstance seems undesirable for running OS instance (but may be helpful for installed OSs).
(2) Need to enable shutdown and reboot operations when have appropriate security support, and perhaps some additional cleanup before executing the commands.
(3) The provider currently doesn’t check Flags when invoked by CIMOM.
(4) The provider currently doesn’t check Property List when invoked by CIMOM. Some properties are more expensive to gather (for example, number of users) and could be skipped if not requested.
(5) Support for RunningOS and InstalledOS associations would be good (although RunningOS is implicit with the first instance implemented).
(6) OS Status is currently always returned as Unknown. If the OS is running enough for the WBEM infrastructure to function, a state of “OK” might be appropriate, but “Degraded” and “Stopping” could also apply and would need to be identified and distinguished.

### 5. Limitations, Known Defects, and Performance Considerations

Linux-specific mechanism for getting maximum number of processes will only work on Linux kernels 2.4.* or later.

The Reboot and Shutdown methods have been disabled for HP-UX and Linux; can be enabled in the future.

Top of Page