Changeset 837

Show
Ignore:
Timestamp:
07/07/00 23:23:43 (14 years ago)
Author:
merlin
Message:

Added support in sensors prog for `ignore' settings on alarms so you
can flag chassis intrusion detection to be ignored, etc. Updated
CHANGES to reflect this and updates to sensord.
-- merlin

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r834 r837  
    1818  Program sensors-detect: more robustness in case of unknown i2c adapters 
    1919  Module w83781d: W83783S no longer crashes on unloading 
     20  Program sensord: more flexility, support for alarm scanning etc. 
     21  Program sensors: support for ignore setting on sensor alarms. 
    2022 
    21232.5.1 (20000618) 
  • lm-sensors/trunk/doc/progs

    r661 r837  
    5353  you run it, as you may need to set some variables first. 
    5454* prog/sensord/sensord (written in C, installed by `make install-prog-sensord') 
    55   This daemon logs sensor information every 5 minutes to the log file 
    56   /var/log/sensors, in a similar format to sensors (below). This is a bit 
    57   more lightweight than executing sensors every 5 minutes, depending on how 
    58   you look at things. Automatically picks up configuration updates and 
    59   responds to SIGHUP. 
     55  This daemon can be used to periodically log sensor readings from 
     56  the sensors hardware to syslog, and to alert (using syslog level ALERT) 
     57  when a sensor alarm is signalled; for example, if a fan fails, a temperature 
     58  limit is exceeded, etc. 
    6059* prog/sensors/sensors (written in C, installed by `make install') 
    6160  This pretty-prints the information provided by the modules. It is a normal 
  • lm-sensors/trunk/prog/sensors/chips.c

    r817 r837  
    416416  free_the_label(&label); 
    417417 
    418   if (!sensors_get_label(*name,SENSORS_SIS5595_ALARMS,&label)) { 
     418  if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_ALARMS,&label,&valid) 
     419      && valid) { 
    419420    print_label(label,10); 
    420421    printf("Board temperature input (usually LM75 chips) %s\n", 
     
    721722  free_the_label(&label); 
    722723     
    723   if (!sensors_get_label(*name,SENSORS_LM78_ALARMS,&label)) { 
     724  if (!sensors_get_label_and_valid(*name,SENSORS_LM78_ALARMS,&label,&valid) 
     725      && valid) { 
    724726    print_label(label,10); 
    725727    printf("Board temperature input (usually LM75 chips) %s\n", 
     
    905907  free_the_label(&label); 
    906908 
    907   if (!sensors_get_label(*name,SENSORS_GL518_BEEP_ENABLE,&label) && 
    908       !sensors_get_feature(*name,SENSORS_GL518_BEEP_ENABLE,&cur)) { 
    909     print_label(label,10); 
    910     if (cur < 0.5)  
    911       printf("Sound alarm disabled\n"); 
    912     else 
    913       printf("Sound alarm enabled\n"); 
    914   } else 
    915     printf("ERROR: Can't get BEEP data!\n"); 
     909  if (!sensors_get_label_and_valid(*name,SENSORS_GL518_BEEP_ENABLE,&label,&valid) 
     910      && valid) { 
     911    if (!sensors_get_feature(*name,SENSORS_GL518_BEEP_ENABLE,&cur)) { 
     912      print_label(label,10); 
     913      if (cur < 0.5)  
     914        printf("Sound alarm disabled\n"); 
     915      else 
     916        printf("Sound alarm enabled\n"); 
     917    } else 
     918      printf("ERROR: Can't get BEEP data!\n"); 
     919  } 
    916920  free_the_label(&label); 
    917921} 
     
    11581162  free_the_label(&label); 
    11591163 
    1160   if (!sensors_get_label(*name,SENSORS_LM80_ALARMS,&label)) { 
     1164  if (!sensors_get_label_and_valid(*name,SENSORS_LM80_ALARMS,&label,&valid) 
     1165      && valid) { 
    11611166    if (alarms & LM80_ALARM_BTI) { 
    11621167      print_label(label,10); 
     
    14601465  free_the_label(&label); 
    14611466     
    1462   if (!sensors_get_label(*name,SENSORS_W83781D_ALARMS,&label)) { 
     1467  if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_ALARMS,&label,&valid) 
     1468      && valid) { 
    14631469    print_label(label,10); 
    14641470    printf("Chassis intrusion detection                      %s  %s\n", 
     
    14681474  free_the_label(&label); 
    14691475 
    1470   if (!sensors_get_label(*name,SENSORS_W83781D_BEEP_ENABLE,&label) && 
    1471       !sensors_get_feature(*name,SENSORS_W83781D_BEEP_ENABLE,&cur)) { 
    1472     print_label(label,10); 
    1473     if (cur < 0.5)  
    1474       printf("Sound alarm disabled\n"); 
    1475     else 
    1476       printf("Sound alarm enabled\n"); 
    1477   } else 
    1478     printf("ERROR: Can't get BEEP data!\n"); 
     1476  if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_BEEP_ENABLE,&label,&valid) 
     1477      && valid) { 
     1478    if (!sensors_get_feature(*name,SENSORS_W83781D_BEEP_ENABLE,&cur)) { 
     1479      print_label(label,10); 
     1480      if (cur < 0.5)  
     1481        printf("Sound alarm disabled\n"); 
     1482      else 
     1483        printf("Sound alarm enabled\n"); 
     1484    } else 
     1485      printf("ERROR: Can't get BEEP data!\n"); 
     1486  } 
    14791487  free_the_label(&label); 
    14801488}