Solaris WBEM Services Administrator's Guide

The Solaris_Core1.0.mof File

The Solaris_Core1.0.mof file is the first of the Solaris Schema files to be compiled after the Solaris_Schema1.0.mof file. This file provides the definition of the Solaris_ComputerSystem class of the Solaris Provider, and also the Solaris_LogRecord, Solaris_LogService, Solaris_LogServiceProperties, and Solaris_LogServiceSetting classes.

Solaris_ComputerSystem Class

The first section of Solaris_Core1.0.mof sets the definition of Solaris_ComputerSystem as an extension of the CIM_UnitaryComputerSystem class.

[Provider("com.sun.wbem.solarisprovider.computersystem.Solaris_ComputerSystem")]class Solaris_ComputerSystem:CIM_UnitaryComputerSystem{}; 

Logging Definitions

The Solaris_LogRecord defines the types of data that can be written to WBEM system logs.

  
	[Provider ("com.sun.wbem.solarisprovider.logsvc.Solaris_LogRecord")]
class Solaris_LogRecord 
{

WBEM system logs fall into three general categories: application logs, system logs, and security logs. Log records may be assigned different severities, including informational, warning, and error logs. For information about using the Solaris_LogRecord call to enable logging in your applications, see "Using the APIs to Enable Logging" in Chapter 5, System Logging.

All log records use a standard format that is defined in the Solaris_LogRecord class. The properties of Solaris_LogRecord indicate the types of data that are passed from an application into a log record. Some of the data passed is required by the CIM Object Manager and CIM Repository to identify the recorded data. These properties are flagged with a [read,key] qualifier to show that they are read-only. You can view the data but not change the values of these properties. You can change the values of properties assigned [read,write] qualifiers. The following list shows the properties as they are assigned to Solaris_LogRecord in Solaris_Core1.0.mof.

{
	[read, key]
	sint64 RecordID;
 [read, key]
	sint32 RecordHashCode;
	[read, key]
	string Filename;
	[read]
	datetime RecordDate;
	[read, write]
	sint32 category;
	[read, write]
	sint32 severity;
	[read, write]
	string AppName;
	[read, write]
	string UserName;
	[read, write]
	string ClientMachineName;
	[read, write]
	string ServerMachineName;
	[read, write]
	string SummaryMessage;
	[read, write]
	string DetailedMessage;
	[read, write]
	string data;
	[read, write]
	boolean SyslogFlag;
};

After properties are defined for Solaris_LogRecord, the Solaris_LogService class is defined as an extension of CIM_Service. This class controls the operation of the logging service.

	[Provider ("com.sun.wbem.solarisprovider.logsvc.Solaris_LogService")]
class Solaris_LogService:CIM_Service
{

Each of the functions specified by the Solaris_LogService class defines how data is handled in a log file. For example, the clearLog() method specifies that all data is deleted from the log file and the log file is refreshed to accept new data.

{
	sint32 clearLog([IN] string fileName);
 
	sint64 getNumRecords([IN] string fileName, [OUT] sint64 numRec);
 
	sint32 listLogFiles([OUT]string logFiles[]);
 
	sint32 getCurrentLogFileName([OUT] string fileName);
 
	sint32 getNumLogFiles([OUT] sint32 numFiles);
 
	sint64 getLogFileSize([OUT] sint64 fileSize);
 
	sint32 getSyslogSwitch([OUT] string switch); 
 
	sint32 getLogStorageName([OUT] string fileName); 
 
	sint32 getLogFileDir([OUT] string dirName); 
};

The Solaris_LogServiceProperties class is defined as an extension of CIM_Setting:

	[Provider ("com.sun.wbem.solarisprovider.logsvc.Solaris_LogServiceProperties")]
class Solaris_LogServiceProperties:CIM_Setting
{

The properties of this class control the following characteristics of a log file: