X hits on this document

PDF document

February 10, 2006 - page 202 / 238

573 views

0 shares

0 downloads

0 comments

202 / 238

190

APPENDIX I. SAMPLE PROGRAM SHOWING EVENT SETUP

break; case IPMI_MODIFIER_UNIT_BASE_DIV_MOD: mod_use = "/"; m o d i f i e r = i p m i _ s e n s o r _ g e t _ m o d i f i e r _ u n i t _ s t r i n g ( s e n s o r break; case IPMI_MODIFIER_UNIT_BASE_MULT_MOD: mod_use = "*"; ) ; m o d i f i e r = i p m i _ s e n s o r _ g e t _ m o d i f i e r _ u n i t _ s t r i n g ( s e break; } n s o r ) ; r a t e = i p m i _ s e n s o r _ g e t _ r a t e _ u n i t _ s t r i n g ( s e n s o r ) ;

printf(" value: base, mod

_

%lf%s %s%s%s%s\n", val, use, modifier, rate);

percent,

} /* FALLTHROUGH */ case IPMI_RAW_VALUE_PRESENT:

printf("

raw

value:

0x%2.2x\n",

raw

_

value);

}

i f ( s d a t a - > t h r e s h _ s u p = = I P M I _ T H R E S H O L D _ A C C E S S _ S U P P O R T _ goto out; N O N E )

for (thresh=IPMI_LOWER_NON_CRITICAL; thresh<=IPMI_UPPER_NON_RECOVERABLE; thresh++)

{

int val, rv;

r v = i p m i _ s e n s o r _ t h r e s h o l d _ r e a d i n g _ s u p p o r t e d ( s e n s o r , t h r e s h , & v a l if (rv || !val) continue; ) ;

_

out of range\n", string(thresh));

_

in range\n", string(thresh));

i f ( i p m i _ i s _ t h r e s h o l d _ o u t _ o f _ r a n g e ( s t a t e s , t h r e s h ) )

printf("

Threshold %s is

i p m i _ g e t _ t h r e s h o l d

else

printf("

Threshold %s is

i p m i _ g e t _ t h r e s h o l d

}

r out: e l e a s e _ s d a t a ( s d a t a ) ;

}

static void

Document info
Document views573
Page views573
Page last viewedMon Dec 05 09:21:11 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments