X hits on this document

PDF document

February 10, 2006 - page 148 / 238

947 views

0 shares

0 downloads

0 comments

148 / 238

136

CHAPTER 8. SENSORS

The value dir parameter specifies if the “going low” or “going high” events are being queried. Value for this are:

IPMI GOING LOW IPMI GOING HIGH The dir parameter specifies if the “assertion” or “deassertion” events are being queried. Value for this are:

IPMI ASSERTION IPMI DEASSERTION Using these, all the thresholds and directions may be iterated through to find out what the sensor supports. The functions

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

converts the value dir and dir values to strings. To actually enable or disable individual events for a sensor, an event state structure must be created. An event state structure is passed in when the event state of a sensor is queried. To set or clear individual

events in one of these structures, use the following:

_ enum ipmi_thresh e

threshold,

_ _ _ _ _ enum ipmi event value dir e value dir,

_ _ _ enum ipmi event dir e

dir);

Threshold Sensor Units in OpenIPMI

In IPMI, the SDR gives quite a bit of information about what the converted value means. The units are specified, unit modifiers and rates, and whether the measurement is a percentage.

Unit come in three types, the normal unit, the rate unit (which give a “per time” modifiers) and a modifier unit (which gives whether the measurement has a modifier unit, and whether it is a division or a multiplication.

The units on a sensor are specified as a base unit, and optional modifier unit and how that is used, and a rate unit. The modifier unit is specified in the same type as a base unit. A boolean specifying whether the value is a percentage is also available.

This may sound somewhat complicated, but it is not as bad as it sounds. In most cases only the base unit is used, the modifier unit use is none (thus the modifier is turned off), the rate unit is none, and it is not a percentage. But you can use all of these. For instance, if a sensor measures percent of newton×meters per second, that would use all of these. The base unit would be newtons, the modifier unit use would be

_ _ _ _ _ void ipmi threshold event clear(ipmi event_state t

*events,

_ enum ipmi_thresh e

threshold,

_ _ _ _ _ void ipmi threshold event set(ipmi event_state t

*events,

_ enum ipmi_thresh e

threshold,

i n t i p m i _ i s _ t h r e s h o l d _ e v e n t _ s e t ( i p m i _ e v e n t _ s t a t e _ t

*events,

To see if a specific event is set, use:

e n u m i p m i _ e v e n t _ v a l u e _ d i r _ e v a l u e _ d i r , e n dir); u m i p m i _ e v e n t _ d i r _ e

e n u m i p m i _ e v e n t _ v a l u e _ d i r _ e v a l u e _ d i r , e n u m i p m i _ e v e n t _ d i r _ dir); e

Document info
Document views947
Page views947
Page last viewedSun Dec 11 10:24:50 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments