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, Dec 16, 2010 at 05:02:12AM -0800, Paul Goyette wrote:
> 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?

Yes, user copy&paste error.

> >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:

Just recompiled from scratch a new kernel, and started from a cold
boot ... same problem.

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

I'll try a qemu test next ...

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index