From: Renier M. <re...@us...> - 2007-04-13 15:31:32
|
ope...@li... wrote on 04/13/2007 04:53:37=20 AM: > Hi, >=20 > For several days, i play with OpenHPI 2.8.1 to try to figure out how it > works. Since the online documentation is not very helpful when you go to > the details (i know that a documentation update is expected for the > 2.9.0), i hope to get missing informations thanks to this mailing-list. >=20 > I have slightly modified the simulator plugin to change a fan sensor > value (which actually is hard coded) to try to force OpenHPI to generate > an event when the sensor value exceed a warning threshold. In reality, the hardware is what generates the event ideally and the=20 plugin catches the event an generates an HPI event in OpenHPI. So the=20 plugin needs to generate it, not the top infrastructure, whether because=20 it saw the hardware event or because it saw the right conditions to do so. >=20 > For that, i have modified the oh=5Fget=5Fsensor=5Freading() equivalent > function to change the value previously hard-coded (in fact, i read a > file which contains the value i want to display). But when the sensor > value exceed the up critical threshold, nothing happen (i modified the > sim=5Ffan=5Fsensors structure). You need to add code in the simulator plugin instead, to check the sensor=20 value whenever get=5Fevent is called, and generate the sensor event if it=20 detected a change. >=20 > And whereas i expected that the reading of all sensors value was > automatic, i needed to call a client by hand ("hpitree" for instance) to A better one to use is hpisensor. > force OpenHPI to reread all values. Except oh=5Fget=5Fevent() which is > called regularly, OpenHPI don't seems to try to reread all sensor values > in a regular manner ; so it's unclear for me how OpenHPI can generate > alone (without the interaction of a client) an event when a sensor value > (or what you want) exceed a threshold. The reading of sensors is not automatic, but the events coming from the=20 plugins are automatic. >=20 > Am i wrong ? Maybe OpenHPI consider that a client need to check values > regularly to be able to generate events ? And why no event is generate ? >=20 > thanks in advance, > Lionel Tricon >=20 >=20 ---------------------------------------------------------------------------= --- > C-S DIGINEXT > 45, impasse de la Draille > Parc d'Activit=E9s La Duranne > 13857 AIX-EN-PROVENCE CEDEX 3 > T=E9l. : 04 42 90 45 84 > Fax : 04 42 90 82 80 > Mail : lio...@di... >=20 >=20 |