X hits on this document

PDF document

February 10, 2006 - page 207 / 238

938 views

0 shares

0 downloads

0 comments

207 / 238

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

*sensor,

int err, i p m i _ t h r e s h o l d s _ t * t h ,

void

* c b _ d a t a )

{

sdata t

_

* s d a t a = c b _ d a t a ;

e n u m i p m i _ t h r e s h _ e t h r e s h ;

int

rv;

if (err) { printf("Error 0x%x getting events for sensor %s\n", err, sdata->name); goto out_err;

}

printf("Sensor %s threshold settings:\n", sdata->name); for (thresh=IPMI_LOWER_NON_CRITICAL;

thresh<=IPMI_UPPER_NON_RECOVERABLE; thresh++)

{

int val; double dval;

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 a b l e ( s e n s o r , t h r e s h , & v a l ) if (rv || !val) ;

/* Threshold not available. */ continue;

r v = i p m i _ t h r e s h o l d _ g e t ( t h , t h r e s h , & d v a l ) ;

if (rv) { printf("

threshold %s could not be fetched due to error 0x%x\n",

i p m i _ g e t _ t h r e s h o l d _ s t r i n g ( t h r e s h ) , r v ) ;

} else { printf("

threshold %s is %lf\n",

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

}

}

rv = ipmi_get_default_sensor_thresholds(sensor, sdata->th); if (rv) { printf("Error 0x%x getting def thresholds for sensor %s\n", rv, sdata->name); goto out_err;

}

r v = i p m i _ s e n s o r _ s e t _ t h r e s h o l d s ( s e n s o r , s d a t a - > t h , t h r e s h o l d s _ s e t , s d a if (rv) { t a ) ;

195

Document info
Document views938
Page views938
Page last viewedSun Dec 11 06:20:03 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments