X hits on this document

PDF document

February 10, 2006 - page 146 / 238

875 views

0 shares

0 downloads

0 comments

146 / 238

134

CHAPTER 8. SENSORS

Threshold Sensor Events in OpenIPMI

Section 8.6.1 on page 128 shows the general support for events for all sensor types. Threshold sensors have their own special routines for handling the thresholds. Thresholds in a sensor may be settable or fixed and may or may not be able to be read. The function

int ipmi_sensor_get_threshold_access(ipmi_sensor_t *sensor); returns the event threshold access support of the sensor, return values are IPMI THRESHOLD ACCESS SUPPORT NONE - The sensor does not support thresholds.

IPMI THRESHOLD ACCESS SUPPORT READABLE - The sensor supports thresholds and their values may be read with ipmi thresholds get, but cannot be written.

IPMI THRESHOLD ACCESS SUPPORT SETTABLE - The sensor supports thresholds and they may be read and written.

IPMI THRESHOLD ACCESS SUPPORT FIXED - The sensor supports thresholds and they are fixed and may not be read or changed. ipmi get default sensor thresholds should return the fixed values of this sensor.

In addition to this, individual thresholds may be readable or settable individually. To find this, the following functions will return true if a specific threshold is readable or settable, and false if not:

int ipmi sensor threshold settable(ipmi sensor t

_

_

_

_

_

*sensor,

enum ipmi thresh e threshold,

_

_

int int ipmi sensor threshold readable(ipmi sensor t

_

_

_

_

_

*val); *sensor,

e n u m i p m i _ t h r e s h _ e t h r e s h o l d ,

int

*val);

The specific threshold values in the enumeration are: IPMI LOWER NON CRITICAL IPMI LOWER CRITICAL IPMI LOWER NON RECOVERABLE IPMI UPPER NON CRITICAL IPMI UPPER CRITICAL IPMI UPPER NON RECOVERABLE The function

c h a r * i p m i _ g e t _ t h r e s h o l d _ s t r i n g ( e n u m i p m i _ t h r e s h _ e v a l ) ;

converts the value to a string.

To actually get and set the thresholds for a sensor, a threshold data structure is used. This data structure is opaque.

To create or keep your own copy of a threshold data structure, you may allocate and copy one using the following functions:

unsigned int ipmi_threshold_size(void); v o i d i p m i _ c o p y t h r e s h o l d s ( i p m i _ t h r e s h o l d s _ t * d e s t , i p m i _ t h r e s h o l d s _ t * s r c ) ;

Document info
Document views875
Page views875
Page last viewedSat Dec 10 08:54:41 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments