ls_sensors, fscscy.o & watchdog
Quoted 2 lines
Hi,
Hi A'rpi, nice to see you there :)
Quoted 6 lines
I've spent few hours experiencing with the watchdog feature of the Fujitsu Siemens server board (don't ask the model name, what i know is that it uses serverworks CSB5 chipset) using
lm_sensors2.7.0's fscscy driver.(I needed it because i have random hangup (once a week, so hard to debug...) on a server).
Quoted 8 lines
Ok, so there is
/proc/sys/dev/sensors/fscscy-i2c-0-73/wdog, containing 3 0..255 values for the 3 watchdog registers.The first one is the time counter, it counts backwards (seems write-only, at least you can't read the current counter back). It's in 2 seconds base, so writting 30 there means 60 seconds delay. It seems whole 0..255 range is supported, so up to 510 seconds. writting 0 means immediate hardware reset.
According to the docs, this is read and write. I'll check the code and update if required.
Quoted 2 lines
The second number is unknown to me, it
doesn't matter what value i put there.
According to the docs again, it is supposed to be a "state" register, so it's probably meant to be read from, not written to (also the same docs say it's read and write).
Quoted 4 lines
The third is the control
register, with flags 16, 32 and 128. If i write only 16 or 144 (128+16), it means system reset when the counter reaches 0. If i OR 32, it has no effect.
Do you mean that the 6th bit has no effect, or that setting it to 1 disables the watchdog?
Quoted 7 lines
So, the world's simples watchdog using this mainboard:
while true ; do
echo 30 0 16 >/proc/sys/dev/sensors/fscscy-i2c-0-73/wdogsleep 10
done
Quoted 7 lines
it does hardware reset after 1 minutes, if this script is killed or system hangup occurs.
Also note, that BIOS has a strange setting, named OS Boot Retry Count, set to 0 by default, it changes watchdog behaviour to power off instead of reset.(0=poweroff 1..7=reset). It took me a while to find this...
Thanks for reporting your experience (and success). Never used a watchdog myself, but I know how it works and your explanations make sense.
Quoted 2 lines
Please add the above to the documentation (doc/chips/fscscy), so i can save a few hours of resetting for other people :)
It will be done :)
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
original recipent's server bounced it back :(
--------- Forwarded message ---------
From: Arpi <[email protected]>
To: [email protected]
Subject: ls_sensors, fscscy.o & watchdog
Hi,
I've spent few hours experiencing with the watchdog feature of the Fujitsu Siemens server board (don't ask the model name, what i know is that it uses serverworks CSB5 chipset) using lm_sensors 2.7.0's fscscy driver. (I needed it because i have random hangup (once a week, so hard to debug...) on a server).
Ok, so there is /proc/sys/dev/sensors/fscscy-i2c-0-73/wdog, containing 3 0..255 values for the 3 watchdog registers.
The first one is the time counter, it counts backwards (seems write-only, at least you can't read the current counter back). It's in 2 seconds base, so writting 30 there means 60 seconds delay. It seems whole 0..255 range is supported, so up to 510 seconds. writting 0 means immediate hardware reset. The second number is unknown to me, it doesn't matter what value i put there. The third is the control register, with flags 16, 32 and 128.
If i write only 16 or 144 (128+16), it means system reset when the counter reaches 0. If i OR 32, it has no effect.
So, the world's simples watchdog using this mainboard:
while true ; do
echo 30 0 16 > /proc/sys/dev/sensors/fscscy-i2c-0-73/wdog sleep 10
done
it does hardware reset after 1 minutes, if this script is killed or system hangup occurs.
Also note, that BIOS has a strange setting, named OS Boot Retry Count, set to 0 by default, it changes watchdog behaviour to power off instead of reset. (0=poweroff 1..7=reset). It took me a while to find this...
Please add the above to the documentation (doc/chips/fscscy), so i can save a few hours of resetting for other people :)
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
Hi,
Quoted 1 line
Hi A'rpi, nice to see you there :)
:)
Quoted 9 lines
Quoted 9 lines
I've spent few hours experiencing with the watchdog feature of the Fujitsu Siemens server board (don't ask the model name, what i know is that it uses serverworks CSB5 chipset) using
lm_sensors2.7.0's fscscy driver.(I needed it because i have random hangup (once a week, so hard to debug...) on a server).Ok, so there is
/proc/sys/dev/sensors/fscscy-i2c-0-73/wdog, containing 3 0..255 values for the 3 watchdog registers.
Quoted 8 lines
Quoted 5 lines
The first one is the time counter, it counts backwards (seems write-only, at least you can't read the current counter back). It's in 2 seconds base, so writting 30 there means 60 seconds delay. It seems whole 0..255 range is supported, so up to 510 seconds. writting 0 means immediate hardware reset.
According to the docs, this is read and write. I'll check the code and update if required.
Yes, in viewpoint of code (and you :)) it's R/W. But the value you can read back is the same as you wrote there, not the current value of the counter (as I expected).
Quoted 6 lines
Quoted 2 lines
The second number is unknown to me, it
doesn't matter what value i put there.According to the docs again, it is supposed to be a "state" register, so it's probably meant to be read from, not written to (also the same docs say it's read and write).
It's always 0. Even if i write there something, i got 0 back. Maybe it's non-zero at the monment of reset :)))
Quoted 7 lines
Quoted 4 lines
The third is the control
register, with flags 16, 32 and 128. If i write only 16 or 144 (128+16), it means system reset when the counter reaches 0. If i OR 32, it has no effect.Do you mean that the 6th bit has no effect, or that setting it to 1 disables the watchdog?
5th, not 6th
Seems it disables the watchdog, at least when i set it, bit 4 has no effect. So only 'working' values for me were 16 and 144 (8+16), for other values it does nothing when the counter reach 0.
(at least i see nothing happening)
Quoted 6 lines
Quoted 6 lines
So, the world's simples watchdog using this mainboard:
while true ; do
echo 30 0 16 >/proc/sys/dev/sensors/fscscy-i2c-0-73/wdogsleep 10
done
^^^ this is the main point, to get it working :)
actually i'm not interested (and i have no time) to do more experimenting with wdog, with the above 4-liner it works as expected form a watchdog.
Quoted 11 lines
Quoted 7 lines
it does hardware reset after 1 minutes, if this script is killed or system hangup occurs.
Also note, that BIOS has a strange setting, named OS Boot Retry Count, set to 0 by default, it changes watchdog behaviour to power off instead of reset.(0=poweroff 1..7=reset). It took me a while to find this...
Thanks for reporting your experience (and success). Never used a watchdog myself, but I know how it works and your explanations make sense.
Same here, I've never used such thing, and I always hoped i will never have to use such thing, but this bastard mainboard keeps crashing and doing unpredictable hangup (tried various stresstests etc) so i had to do sth :)
Quoted 4 lines
Quoted 2 lines
Please add the above to the documentation (doc/chips/fscscy), so i can save a few hours of resetting for other people :)
It will be done :)
thanks :)
i hope it helps somebody... before i started to experiment on a live production server i searched through the net for this info but found nothing :(
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
Quoted 8 lines · Jean Delvare
Quoted 3 lines
Quoted 2 lines
Do you mean that the 6th bit has no effect, or that setting it to 1 disables the watchdog?
5th, not 6th
6th, I insist. Bit number 5 is the 6th bit. You usually start numbering with 0, but the "zeroth bit" makes no sense to me (although the word do exist). Or maybe is it just me? Let's call it the bit accounting for 32 :)
A pedantic note: this is still ambiguous, depending on convention. E.g. Motorola's MPC500 RCPU manual labels the MSb as 0, instead of the more common LSb 0 (of Intel, and even other Motorola like 68k). I think I've heard MSb 0 called "IBM ordering".
Also, this difference is unrelated to endianness. To change bit-numbering schemes has no effect on the code you write... it only affects the comments. It's more likely to screw up hardware designers though. :)
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Quoted 7 lines
Quoted 3 lines
According to the docs, this is read and write. I'll check the code and update if required.
Yes, in viewpoint of code (and you :)) it's R/W. But the value you can read back is the same as you wrote there, not the current value of the counter(as I expected).
Well, it's a hardware design issue. And it's not necessarily bad, although I believe both values could be interesting.
Quoted 6 lines
Quoted 3 lines
According to the docs again, it is supposed to be a "state" register, so it's probably meant to be read from, not written to (also the same docs say it's read and write).
It's always 0. Even if i write there something, i got 0 back. Maybe it's non-zero at the monment of reset :)))
Possible. This makes it pretty useless for the user.
Quoted 3 lines
Quoted 2 lines
Do you mean that the 6th bit has no effect, or that setting it to 1 disables the watchdog?
5th, not 6th
6th, I insist. Bit number 5 is the 6th bit. You usually start numbering with 0, but the "zeroth bit" makes no sense to me (although the word do exist). Or maybe is it just me? Let's call it the bit accounting for 32 :)
Quoted 4 lines
Seems it disables the watchdog, at least when i set it, bit 4 has no effect. So only 'working' values for me were 16 and 144 (8+16), for other values it does nothing when the counter reach 0. (at least i see nothing happening)
Any idea what the 5 other bits are meant for?
Quoted 4 lines
^^^ this is the main point, to get it working :)
actually i'm not interested (and i have no time) to do more experimenting with wdog, with the above 4-liner it works as expected form a watchdog.
You're definitely right. Do not fear, I won't forget this part :)
Quoted 3 lines
i hope it helps somebody... before i started to experiment on a live production server i searched through the net for this info but found nothing :(
How does it feel to be a pioneer? ;)
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Hi,
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Do you mean that the 6th bit has no effect, or that setting it to 1 disables the watchdog?
5th, not 6th
6th, I insist. Bit number 5 is the 6th bit. You usually start numbering with 0, but the "zeroth bit" makes no sense to me (although the word do exist). Or maybe is it just me? Let's call it the bit accounting for 32 :)
lol
Quoted 6 lines
Quoted 4 lines
Seems it disables the watchdog, at least when i set it, bit 4 has no effect. So only 'working' values for me were 16 and 144 (8+16), for other values it does nothing when the counter reach 0. (at least i see nothing happening)
Any idea what the 5 other bits are meant for?
nope
actually the question is what are the other 7 bits for... the only we know is the one with value 16 (0x10), the rest is mistic...
Quoted 5 lines
Quoted 3 lines
i hope it helps somebody... before i started to experiment on a live production server i searched through the net for this info but found nothing :(
How does it feel to be a pioneer? ;)
Ask that ~700 users asking me 'what the hell is with our server now? i can't read my emails!' while i'm keep resetting the system :) (probably i should have answer them: i'm reverse engineering a watch-dog, please be patient :))
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu