~ubuntu-branches/debian/lenny/net-snmp/lenny

« back to all changes in this revision

Viewing changes to agent/mibgroup/ucd-snmp/lmSensors.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-05-10 22:20:23 UTC
  • Revision ID: james.westby@ubuntu.com-20070510222023-3fr07xb9i17xvq32
Tags: upstream-5.3.1
ImportĀ upstreamĀ versionĀ 5.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 * information.  Later platforms, such as the V880 use the picld
22
22
 * daemon to control system resources and report sensor information.
23
23
 * Picld is supported only on Solaris 2.8 and later.
24
 
 * 
25
 
 * KSTAT
26
 
 *
27
 
 * The code initializes the kstat variables, then does a specific inquiry
28
 
 * for what we're looking for.
29
 
 *
30
 
 * PICLD
31
 
 *
32
 
 * If picld is available on the platform, it tries to initialize picld.
33
 
 * If that works, it points itself to the top of the picld btree
34
 
 * and walks it way down recursively looking for sensors and child leafs.
35
 
 * If it finds a child, it goes in and works it way down recursively.
36
 
 * If it finds a sensor, it deals with it.
37
24
 *
38
25
 * Both these methodologies are implemented in a "read only" manner.
39
26
 * You cannot use this code to change anything eg. fan speeds.
91
78
    #ifdef HAVE_PICL_H 
92
79
        #include <picl.h> /* accesses the picld daemon */
93
80
    #endif 
94
 
    #include </usr/platform/sun4u/include/sys/envctrl.h> /*should this be more generic? */
 
81
    #include </usr/platform/sun4u/include/sys/envctrl.h>
95
82
#else
96
83
    #include <sensors/sensors.h>
97
84
    #define CONFIG_FILE_NAME "/etc/sensors.conf"
383
370
                 sensor_array[typ].n++;
384
371
                 } /*end if ec2*/
385
372
             else
386
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
373
                 DEBUGMSG(("ucd-snmp/lmSensors", 
387
374
                     "sensor value read error code->%d\n",ec2));
388
375
            } /* end if */
389
376
        else
390
 
            DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
377
            DEBUGMSG(("ucd-snmp/lmSensors", 
391
378
                "sensor lookup failed  error code->%d\n",error_code));
392
379
        }
393
380
} /*process individual fan*/
421
408
                 sensor_array[typ].n++;
422
409
                 } /*end if ec2*/
423
410
             else
424
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
411
                 DEBUGMSG(("ucd-snmp/lmSensors", 
425
412
                               "sensor value read error code->%d\n",ec2));
426
413
            } /* end if */
427
414
        else
428
 
            DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
415
            DEBUGMSG(("ucd-snmp/lmSensors", 
429
416
                "sensor lookup failed  error code->%d\n",error_code));
430
417
        }
431
418
}  /* process temperature sensor */
459
446
                 sensor_array[typ].n++;
460
447
                 }
461
448
             else
462
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
449
                 DEBUGMSG(("ucd-snmp/lmSensors", 
463
450
                   "sensor value read error code->%d\n",ec2));
464
451
            } /* end if */
465
452
        else
466
 
            DEBUGMSGTL(("ucd-snmp/lmSensors", 
 
453
            DEBUGMSG(("ucd-snmp/lmSensors", 
467
454
              "sensor lookup failed  error code->%d\n",error_code));
468
455
        }
469
456
}  /* process digital sensor */
513
500
                 sensor_array[typ].n++;
514
501
                 } /*end if ec2*/
515
502
             else
516
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors",
 
503
                 DEBUGMSG(("ucd-snmp/lmSensors",
517
504
                     "sensor value read error code->%d\n",ec2));
518
505
            } /* end if */
519
506
        else
520
 
            DEBUGMSGTL(("ucd-snmp/lmSensors",
 
507
            DEBUGMSG(("ucd-snmp/lmSensors",
521
508
                "sensor lookup failed  error code->%d\n",error_code));
522
509
        }
523
510
} /*process switch*/
566
553
                 sensor_array[typ].n++;
567
554
                 }
568
555
             else
569
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors",
 
556
                 DEBUGMSG(("ucd-snmp/lmSensors",
570
557
                     "sensor value read error code->%d\n",ec2));
571
558
            } 
572
559
        else
573
 
            DEBUGMSGTL(("ucd-snmp/lmSensors",
 
560
            DEBUGMSG(("ucd-snmp/lmSensors",
574
561
                "sensor lookup failed  error code->%d\n",error_code));
575
562
       }
576
563
599
586
        error_code = (picl_get_propinfo_by_name(childh,
600
587
                         "State",&sensor_info,&sensorh));
601
588
        if (error_code == PICL_SUCCESS) {
602
 
             DEBUGMSGTL(("ucd-snmp/lmSensors","Found i2c record size %d\n",sensor_info.size));
603
589
             ec2 = picl_get_propval(sensorh,&state,sensor_info.size);
604
590
             if (ec2 == PICL_SUCCESS){
605
591
                 for (st_cnt=0;st_cnt < max_i2c_posns;st_cnt++){
620
606
                 sensor_array[typ].n++;
621
607
                 } 
622
608
             else
623
 
                 DEBUGMSGTL(("ucd-snmp/lmSensors",
 
609
                 DEBUGMSG(("ucd-snmp/lmSensors",
624
610
                     "sensor value read error code->%d\n",ec2));
625
611
            }
626
612
        else
627
 
            DEBUGMSGTL(("ucd-snmp/lmSensors",
 
613
            DEBUGMSG(("ucd-snmp/lmSensors",
628
614
                "sensor lookup failed  error code->%d\n",error_code));
629
615
        }
630
616
}
631
617
 
632
618
static int
633
 
process_sensors(int level, picl_nodehdl_t nodeh)
 
619
process_sensors(picl_nodehdl_t nodeh)
634
620
{
635
621
    picl_nodehdl_t  childh;
636
 
 
637
 
    char                propname[PICL_PROPNAMELEN_MAX];
638
 
    char                propclass[PICL_CLASSNAMELEN_MAX];
639
 
    picl_errno_t        error_code;
640
 
    picl_prophdl_t      prop_handle;
641
 
    picl_propinfo_t     prop_info;
642
 
 
643
 
 
644
 
    level++;
645
 
/*
646
 
    DEBUGMSGTL(("ucd-snmp/lmSensors","Processing sensors level %d\n",level));
647
 
*/
648
 
 
649
 
    error_code = picl_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, propclass,
650
 
                                        (PICL_PROPNAMELEN_MAX-1));
 
622
    picl_nodehdl_t  nexth;
 
623
 
 
624
    char            propname[PICL_PROPNAMELEN_MAX];
 
625
    char            propclass[PICL_CLASSNAMELEN_MAX];
 
626
    picl_errno_t    error_code;
 
627
 
 
628
    /* look up first child node */
 
629
    error_code = picl_get_propval_by_name(nodeh, PICL_PROP_CHILD, &childh,
 
630
                                        sizeof (picl_nodehdl_t));
651
631
    if (error_code != PICL_SUCCESS) {
652
 
        DEBUGMSG(("ucd-snmp/lmSensors","Couldn't get propclass\n"));
653
632
                return (error_code);
654
633
    }
655
634
 
656
 
    error_code = picl_get_prop_by_name(nodeh, PICL_PROP_NAME, &prop_handle);
657
 
 
658
 
    if (error_code != PICL_SUCCESS) {
659
 
        DEBUGMSGTL(("ucd-snmp/lmSensors","Couldn't get prop_handle\n"));
660
 
        return (error_code);
661
 
 
662
 
    }
663
 
 
664
 
    error_code = picl_get_propinfo(prop_handle, &prop_info);
665
 
 
666
 
    if (error_code != PICL_SUCCESS) {
667
 
        DEBUGMSGTL(("ucd-snmp/lmSensors","Couldn't get prop information\n"));
668
 
        return (error_code);
669
 
 
670
 
    }
671
 
 
672
 
    error_code=picl_get_propval(prop_handle, propname, (PICL_PROPNAMELEN_MAX-1));
673
 
 
674
 
    DEBUGMSGTL(("ucd-snmp/lmSensors","found propname %s of class %s\n",propname, propclass));
675
 
 
676
 
    if (error_code != PICL_SUCCESS) {
677
 
        DEBUGMSGTL(("ucd-snmp/lmSensors","Couldn't get prop handle by name\n"));
678
 
        return (error_code);
679
 
 
680
 
    }
681
 
 
682
 
    if (strstr(propclass,"flashprom"))
683
 
       DEBUGMSGTL(("ucd-snmp/lmSensors","found a flashprom\n"));
684
 
    if (strstr(propclass,"fan-tachometer"))
685
 
        process_individual_fan(nodeh,propname);
686
 
    if (strstr(propclass,"temperature-sensor"))
687
 
        process_temperature_sensor(nodeh,propname);
688
 
    if (strstr(propclass,"digital-sensor"))
689
 
        process_digital_sensor(nodeh,propname);
690
 
    if (strstr(propclass,"switch"))
691
 
        process_switch(nodeh,propname);
692
 
    if (strstr(propclass,"led"))
693
 
        process_led(nodeh,propname);
694
 
    if (strstr(propclass,"i2c"))
695
 
        process_i2c(nodeh,propname);
 
635
    /* step through child nodes, get the name first */
 
636
    while (error_code == PICL_SUCCESS) {
 
637
        error_code = picl_get_propval_by_name(childh, PICL_PROP_NAME,
 
638
                                               propname, (PICL_PROPNAMELEN_MAX - 1));
 
639
        if (error_code != PICL_SUCCESS) {  /*we found a node with no name.  Impossible.! */
 
640
            return (error_code);
 
641
        }
 
642
 
 
643
        if (strcmp(propname,PICL_NODE_PLATFORM)==0){ /*end of the chain*/
 
644
                return (255);
 
645
        }
 
646
 
 
647
        error_code = picl_get_propval_by_name(childh, PICL_PROP_CLASSNAME,
 
648
                                                propclass, sizeof (propclass));
 
649
        if (error_code != PICL_SUCCESS) {  /*we found a node with no class.  Impossible.! */
 
650
            return (error_code);
 
651
        }
 
652
 
 
653
/*        DEBUGMSGTL(("ucd-snmp/lmSensors","found %s of class %s\n",propname,propclass)); */
 
654
 
 
655
        if (strstr(propclass,"fan-tachometer"))
 
656
            process_individual_fan(childh,propname);
 
657
        if (strstr(propclass,"temperature-sensor"))
 
658
            process_temperature_sensor(childh,propname);
 
659
        if (strstr(propclass,"digital-sensor"))
 
660
            process_digital_sensor(childh,propname);
 
661
        if (strstr(propclass,"switch"))
 
662
            process_switch(childh,propname);
 
663
        if (strstr(propclass,"led"))
 
664
            process_led(childh,propname);
 
665
        if (strstr(propclass,"i2c"))
 
666
            process_i2c(childh,propname);
696
667
/*
697
668
        if (strstr(propclass,"gpio"))
698
 
            process_gpio(prop_handle,propname); 
 
669
            process_gpio(childh,propname); 
699
670
*/
700
 
    for (error_code = picl_get_propval_by_name(nodeh, PICL_PROP_CHILD,
701
 
          &childh, sizeof (picl_nodehdl_t)); 
702
 
          error_code != PICL_PROPNOTFOUND;
703
 
          error_code = picl_get_propval_by_name(childh, PICL_PROP_PEER,
704
 
           &childh, sizeof (picl_nodehdl_t))) {
705
 
       if (error_code != PICL_SUCCESS) {
 
671
 
 
672
 
 
673
           /* look for children of children (note, this is recursive) */
 
674
 
 
675
        if (process_sensors(childh) == PICL_SUCCESS) {
 
676
            return (PICL_SUCCESS);
 
677
        }
 
678
 
 
679
          /* get next child node at this level*/
 
680
        error_code = picl_get_propval_by_name(childh, PICL_PROP_PEER,
 
681
                                        &nexth, sizeof (picl_nodehdl_t));
 
682
        if (error_code != PICL_SUCCESS) {/* no more children - buh bye*/
706
683
            return (error_code);
707
 
          }
708
 
 
709
 
       /* call itself recursively */
710
 
 
711
 
       error_code = process_sensors(level,childh);
712
 
 
713
 
       if (error_code != PICL_SUCCESS)
714
 
           return (error_code);
715
 
 
716
 
       } /* end for */
717
 
 
718
 
    return (PICL_SUCCESS);
719
 
 
720
 
 
 
684
        }
 
685
 
 
686
        childh = nexth;
 
687
 
 
688
    } /* while */
 
689
    return (error_code);
721
690
} /* process sensors */
722
691
 
 
692
static int
 
693
get_child(picl_nodehdl_t nodeh, char *cname, picl_nodehdl_t *resulth)
 
694
{
 
695
    picl_nodehdl_t  childh;
 
696
    picl_nodehdl_t  nexth;
 
697
 
 
698
    char            pname[PICL_PROPNAMELEN_MAX];
 
699
    picl_errno_t    error_code;
 
700
 
 
701
    /* look up first child node */
 
702
    error_code = picl_get_propval_by_name(nodeh, PICL_PROP_CHILD, &childh,
 
703
                                        sizeof (picl_nodehdl_t));
 
704
    if (error_code != PICL_SUCCESS) {
 
705
            return (error_code);
 
706
    }
 
707
 
 
708
    /* step through child nodes, get the name first */
 
709
    while (error_code == PICL_SUCCESS) {
 
710
        error_code = picl_get_propval_by_name(childh, PICL_PROP_NAME,
 
711
                                              pname, (PICL_PROPNAMELEN_MAX - 1));
 
712
        if (error_code != PICL_SUCCESS) {  /*we found a node with no name.  Impossible.! */
 
713
            return (error_code);
 
714
        }
 
715
 
 
716
        if (strncmp(pname, cname,PICL_PROPNAMELEN_MAX) == 0){
 
717
            *resulth = childh;
 
718
            return (PICL_SUCCESS);
 
719
        }
 
720
 
 
721
 
 
722
        /* look for children of children (note, this is recursive) */
 
723
 
 
724
        if (get_child(childh,cname,resulth) == PICL_SUCCESS) {
 
725
             return (PICL_SUCCESS);
 
726
        }
 
727
 
 
728
        /* get next child node at this level*/
 
729
            
 
730
        error_code = picl_get_propval_by_name(childh, PICL_PROP_PEER,
 
731
                                        &nexth, sizeof (picl_nodehdl_t));
 
732
        if (error_code != PICL_SUCCESS) {/* no more children - buh bye*/
 
733
            return (error_code);
 
734
        }
 
735
 
 
736
        childh = nexth;
 
737
 
 
738
    } /* while */
 
739
    return (error_code);
 
740
} /* get child */
 
741
 
723
742
#endif
724
743
/* ******** end of picld sensor procedures * */
725
744
 
743
762
#ifdef HAVE_PICL_H
744
763
    int er_code;
745
764
    picl_errno_t     error_code;
746
 
    int level=0;
747
 
    picl_nodehdl_t  rooth;
 
765
    picl_nodehdl_t  rooth,plath;
 
766
    char sname[PICL_PROPNAMELEN_MAX] = "SYSTEM";
748
767
#endif 
749
768
 
750
 
 DEBUGMSGTL(("ucd-snmp/lmSensors", "Reading the sensors\n")); 
 
769
/* DEBUGMSG(("ucd-snmp/lmSensors", "Reading the sensors\n")); */
751
770
 
752
771
/* initialize the array */
753
772
    for (i = 0; i < N_TYPES; i++){
758
777
             }
759
778
        } /*end for i*/
760
779
 
761
 
/* try picld (if supported), then try kstat */
 
780
/* try picld (if supported), if that doesn't work, try kstat */
762
781
#ifdef HAVE_PICL_H 
763
782
 
764
 
DEBUGMSGTL(("ucd-snmp/lmSensors","trying picld first\n"));
765
 
 
766
783
er_code = picl_initialize();
767
784
 
768
785
if (er_code == PICL_SUCCESS) {
769
786
 
770
 
    DEBUGMSGTL(("ucd-snmp/lmSensors","Got into picld\n"));
771
 
 
772
787
    error_code = picl_get_root(&rooth);
773
788
 
774
789
    if (error_code != PICL_SUCCESS) {
775
 
        DEBUGMSGTL(("ucd-snmp/lmSensors", "picld couldn't get root error code->%d\n",error_code));
 
790
        DEBUGMSG(("ucd-snmp/lmSensors", "picld couldn't get root error code->%d\n",error_code));
776
791
        }
777
792
    else{
778
 
        DEBUGMSGTL(("ucd-snmp/lmSensors", "found root\n"));
779
 
        error_code = process_sensors(level, rooth);
780
 
       } /* end else */
 
793
        error_code = get_child(rooth,sname,&plath);
 
794
 
 
795
        if (error_code == PICL_SUCCESS){
 
796
            error_code = process_sensors(plath);
 
797
 
 
798
            if (error_code != 255) 
 
799
                if (error_code != 7)
 
800
                    DEBUGMSG(("ucd-snmp/lmSensors", "picld had an internal problem error code->%d\n",error_code));
 
801
            } /* endif error_code */
 
802
        else{
 
803
            DEBUGMSG(("ucd-snmp/lmSensors", "picld couldn't get system tree error code->%d\n",error_code));
 
804
            } /* end else error_code */
 
805
        } /* end else */
781
806
 
782
807
    picl_shutdown();
783
808
 
784
809
}  /* end if err_code for picl_initialize */
785
 
else {
786
 
    DEBUGMSGTL(("ucd-snmp/lmSensors","No picld available\n"));
787
 
 
788
 
} /*end else picl_initialize */
 
810
 
 
811
else{  /* try kstat instead */
 
812
 
 
813
    DEBUGMSG(("ucd-snmp/lmSensors", "picld couldn't initialize picld because error code->%d\n",er_code));
789
814
 
790
815
#endif  /* end of picld section */
791
816
/* initialize kstat */
792
817
 
793
818
kc = kstat_open();
794
819
if (kc == 0) {
795
 
    DEBUGMSGTL(("ucd-snmp/lmSensors", "couldn't open kstat\n"));
 
820
    DEBUGMSG(("ucd-snmp/lmSensors", "couldn't open kstat"));
796
821
    } /* endif kc */
797
822
else{
798
 
    DEBUGMSGTL(("ucd-snmp/lmSensors", "Opened kstat - looking for sensors\n"));
799
823
    kp = kstat_lookup(kc, ENVCTRL_MODULE_NAME, 0, ENVCTRL_KSTAT_FANSTAT);
800
824
    if (kp == 0) {
801
825
        DEBUGMSGTL(("ucd-snmp/lmSensors", "couldn't lookup fan kstat\n"));
802
826
        } /* endif lookup fans */
803
827
    else{
804
828
        if (kstat_read(kc, kp, 0) == -1) {
805
 
            DEBUGMSGTL(("ucd-snmp/lmSensors", "couldn't read fan kstat\n"));
 
829
            DEBUGMSGTL(("ucd-snmp/lmSensors", "couldn't read fan kstat"));
806
830
            } /* endif kstatread fan */
807
831
        else{
808
832
            typ = 1;
809
833
            fan_info = (envctrl_fan_t *) kp->ks_data;
810
834
            sensor_array[typ].n = kp->ks_ndata;
811
835
            for (i=0; i < kp->ks_ndata; i++){
812
 
                DEBUGMSGTL(("ucd-snmp/lmSensors", "found instance %d fan type %d speed %d OK %d bustedfan %d\n",
 
836
                DEBUGMSG(("ucd-snmp/lmSensors", "found instance %d fan type %d speed %d OK %d bustedfan %d\n",
813
837
                    fan_info->instance, fan_info->type,fan_info->fanspeed,fan_info->fans_ok,fan_info->fanflt_num));
814
838
                sensor_array[typ].sensor[i].value = fan_info->fanspeed;
815
839
                snprintf(sensor_array[typ].sensor[i].name,(MAX_NAME - 1),
834
858
            power_info = (envctrl_ps_t *) kp->ks_data;
835
859
            sensor_array[typ].n = kp->ks_ndata;
836
860
            for (i=0; i < kp->ks_ndata; i++){
837
 
                DEBUGMSGTL(("ucd-snmp/lmSensors", "found instance %d psupply temp %d %dW OK %d share %d limit %d\n",
 
861
                DEBUGMSG(("ucd-snmp/lmSensors", "found instance %d psupply temp %d %dW OK %d share %d limit %d\n",
838
862
                    power_info->instance, power_info->ps_tempr,power_info->ps_rating,
839
863
                    power_info->ps_ok,power_info->curr_share_ok,power_info->limit_ok));
840
864
                sensor_array[typ].sensor[i].value = power_info->ps_tempr;
861
885
            for (i=0; i < kp->ks_ndata; i++){
862
886
               switch (enc_info->type){
863
887
               case ENVCTRL_ENCL_FSP:
864
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "front panel value %d\n",enc_info->value));
 
888
                   DEBUGMSG(("ucd-snmp/lmSensors", "front panel value %d\n",enc_info->value));
865
889
                   typ = 3; /* misc */
866
890
                   sensor_array[typ].sensor[other].value = enc_info->value;
867
891
                   strncpy(sensor_array[typ].sensor[other].name,"FSP",MAX_NAME-1);
869
893
                   other++;
870
894
                   break;
871
895
               case ENVCTRL_ENCL_AMBTEMPR:
872
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "ambient temp %d\n",enc_info->value));
 
896
                   DEBUGMSG(("ucd-snmp/lmSensors", "ambient temp %d\n",enc_info->value));
873
897
                   typ = 0; /* temperature sensor */
874
898
                   sensor_array[typ].sensor[temp].value = enc_info->value;
875
899
                   strncpy(sensor_array[typ].sensor[temp].name,"Ambient",MAX_NAME-1);
877
901
                   temp++;
878
902
                   break;
879
903
               case ENVCTRL_ENCL_BACKPLANE4:
880
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "There is a backplane4\n"));
 
904
                   DEBUGMSG(("ucd-snmp/lmSensors", "There is a backplane4\n"));
881
905
                   typ = 3; /* misc */
882
906
                   sensor_array[typ].sensor[other].value = enc_info->value;
883
907
                   strncpy(sensor_array[typ].sensor[other].name,"Backplane4",MAX_NAME-1);
885
909
                   other++;
886
910
                   break;
887
911
               case ENVCTRL_ENCL_BACKPLANE8:
888
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "There is a backplane8\n"));
 
912
                   DEBUGMSG(("ucd-snmp/lmSensors", "There is a backplane8\n"));
889
913
                   typ = 3; /* misc */
890
914
                   sensor_array[typ].sensor[other].value = enc_info->value;
891
915
                   strncpy(sensor_array[typ].sensor[other].name,"Backplane8",MAX_NAME-1);
893
917
                   other++;
894
918
                   break;
895
919
               case ENVCTRL_ENCL_CPUTEMPR:
896
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "CPU%d temperature %d\n",enc_info->instance,enc_info->value));
 
920
                   DEBUGMSG(("ucd-snmp/lmSensors", "CPU%d temperature %d\n",enc_info->instance,enc_info->value));
897
921
                   typ = 0; /* temperature sensor */
898
922
                   sensor_array[typ].sensor[temp].value = enc_info->value;
899
923
                   snprintf(sensor_array[typ].sensor[temp].name,MAX_NAME,"CPU%d",enc_info->instance);
901
925
                   temp++;
902
926
                   break;
903
927
               default:
904
 
                   DEBUGMSGTL(("ucd-snmp/lmSensors", "unknown element instance &d type &d value %d\n",
 
928
                   DEBUGMSG(("ucd-snmp/lmSensors", "unknown element instance &d type &d value %d\n",
905
929
                       enc_info->instance, enc_info->type, enc_info->value));
906
930
                   break;
907
931
               } /* end switch */
914
938
 
915
939
    kstat_close(kc);
916
940
 
 
941
#ifdef HAVE_PICL_H
 
942
    } /* end else kc not needed if no picld*/
 
943
#endif
917
944
 
918
945
} /* end else kstat */
919
946
#else /* end solaris2 */
966
993
                }
967
994
                strncpy(array->sensor[array->n].name, label, MAX_NAME);
968
995
                array->sensor[array->n].value = (int) (val * mul);
969
 
                DEBUGMSGTL(("ucd-snmp/lmSensors","sensor %d, value %d\n",
 
996
                DEBUGMSGTL(("sensors","sensor %d, value %d\n",
970
997
                            array->sensor[array->n].name,
971
998
                            array->sensor[array->n].value));
972
999
                array->n++;
980
1007
#endif /*else solaris2 */
981
1008
    timestamp = t;
982
1009
}
 
1010