Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: loading new envstat properties reboots system



On Thu, 16 Dec 2010, Nicolas Joly wrote:

Does not seems amdtemp related. I can reproduce it using swsensor.

njoly@lanfeust [~]# modstat -n swsensor
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
root@lanfeust [~]# modload -i type=0 swsensor
root@lanfeust [~]# modstat -n swsensor
NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
swsensor         driver     filesys    0     1805     -

root@lanfeust [~]# envstat -d swsensor
         Current  CritMax  WarnMax  WarnMin  CritMin Unit
sensor:
root@lanfeust [~]# cat swsensor.conf
swsensor {
 sensor0 { critical-min = 85C; critical-max = 92C; }
}
root@lanfeust [~]# envstat -c swsensor.conf
root@lanfeust [~]# envstat -d swsensor
         Current  CritMax  WarnMax  WarnMin  CritMin Unit
sensor:  92.000                     85.000

I'm assuming you missed an "envstat -S" here?

root@lanfeust [~]# envstat -d swsensor
         Current  CritMax  WarnMax  WarnMin  CritMin Unit
sensor:         -273.117

Comparing `envstat -x' output from a freshly loaded sensor, and after
cleanup show that some limits remains :

root@lanfeust [NetBSD/envstat]# diff init.xml clean.xml
3a4,5
                        <key>critical-min</key>
                        <integer>0</integer>
15a18,19
                        <key>warning-max</key>
                        <integer>32640</integer>

Hmm ... Where does the WarnMax limit comes from ? It should not
exists.

Interesting. Running in my test environment (qemu) with a -current from an hour ago, I get the following results - all as expected:

        # cat > sws.conf
        swsensor { sensor0 { critical-min = 10C; critical-max = 90C; } }
        # envstat
        envstat: no drivers registered
        # modload -i type=0 swsensor
        swsensor: initialized
        # envstat
                    Current  CritMax  WarnMax  WarnMin  CritMin Unit
        [swsensor]
          sensor:
        # sysctl -w hw.swsensor.cur_value=1000000
        hw.swsensor.cur_value: 0 -> 1000000
        # envstat
                    Current  CritMax  WarnMax  WarnMin  CritMin Unit
        [swsensor]
          sensor:  -272.150                                     degC
        # envstat -c sws.conf
        # envstat
                    Current  CritMax  WarnMax  WarnMin  CritMin Unit
        [swsensor]
          sensor:  -272.150   90.000                     10.000 degC
        # envstat -S
        # envstat
                    Current  CritMax  WarnMax  WarnMin  CritMin Unit
        [swsensor]
          sensor:  -272.150                                     degC
        # envstat -c sws.conf
        # envstat
                    Current  CritMax  WarnMax  WarnMin  CritMin Unit
        [swsensor]
          sensor:  -272.150   90.000                     10.000 degC
        #




NB: envstat output looks bad when Temp value is 0uK, correct
otherwise.

NB2: What about adding ability to set an inital value when loading the
module; something like `modload -i type=0 -i value=273150000 swsensor' ?

--
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

!DSPAM:4d09f6e32361343926699!




-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index