[Lcdproc] Patch: Watchdog timer for Crystalfontz Packet
stewartputnam at comcast.net
stewartputnam at comcast.net
Sun Mar 8 23:41:41 UTC 2009
I've never used the watchdog / reboot functionality. Is the link you mentioned the same patch offered on the CrystalFontz forums third party software page? ( http://www.crystalfontz.com/forum/showthread.php?t=5853 )
Lcdproc seems to me to on the whole welcome advanced do-it-yourself port / controller / lcd work to the degree that the option to wire a suitable CrystalFontz product should not be categorically ruled out.
A quick glance at the patch tells me that your reservations are on the mark. I think it is kind of funny that with this patch you might wind up with just the right lcdproc & client setup & machine activity: altering heartbeat behavior to unintentionally / sopradically / randomly / unpredictably reboot your machine every million seconds or so.
To support this feature under lcdproc is problematic. The LCDd core is not designed to have to check for a driver that needs to send a particular packet every so often to avoid rebooting. Replacing drivers_heartbeat with a CFontzPacket_heartbeat that routinely sends the "no-no-don't reboot" packet is one way of getting around this, and I imagine works well enough as long as the LCDd core is routinely sending heartbeats to the module wired to the power button -- but while statistacally / probabalistically functional, maybe proven so gives a particluar install, it is not __gauranteed__. My first attempt at fan management was similarly statistacal / probabalistic by inserting itself in the recurring test_packet() of CFontz633io.c.
And that is only on the sending side of the equation: without tracking a particular packet for receipt / acknowledgement ( could be done similarly to keypress acknowledgement ) how can one be sure that a particular "no-no-don't reboot" packet wasn't dropped?
It is similar to fan management in terms of consequences: fan packet failure -> computer overheating ; watchdog packet failure -> unwanted reboots ( which at least <hoot hoot hoot> should't melt your cpu.) Gaurantee it well or pin a lot of WARNING & explanation on it and offer it, duly tagged, on the side? Put the patch in contrib with cautions & testimonials?
Stewart
P.S.
I'm thinking of this today because I'm trying out my fan / temp driver on 64 bit debian Lenny ...
this table will look mal-aligned, but compare the "98.3%id" to the reported CPU use of my :( "gauranteed" :( fan / temp / datalogging pthreads under top today:
top - 10:13:03 up 1:46, 6 users, load average: 0.05, 0.04, 0.00
Tasks: 7 total, 0 running, 7 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.4%us, 0.3%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2063316k total, 436268k used, 1627048k free, 632k buffers
Swap: 3068372k total, 0k used, 3068372k free, 210716k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4629 nobody 20 0 56324 1524 1092 S 99.9 0.1 0:00.86 LCDd
4632 nobody 20 0 56324 1524 1092 S 8.2 0.1 0:00.26 LCDd
3011 root 20 0 372m 34m 7500 S 2.5 1.7 1:16.01 Xorg
3351 root 20 0 225m 21m 10m S 0.6 1.1 0:18.84 gnome-terminal
4631 nobody 20 0 56324 1524 1092 S 0.0 0.1 0:00.00 LCDd
4633 nobody 20 0 56324 1524 1092 S 0.0 0.1 0:00.00 LCDd
3361 root 20 0 225m 21m 10m S 0.0 1.1 0:00.00 gnome-terminal
----- Original Message -----
From: "Markus Dolze" <bsdfan at nurfuerspam.de>
To: lcdproc at lists.omnipotent.net
Sent: Sunday, March 8, 2009 9:04:22 AM GMT -08:00 US/Canada Pacific
Subject: [Lcdproc] Patch: Watchdog timer for Crystalfontz Packet
Hi,
is anyone interested in having this function?
http://sourceforge.net/tracker2/?func=detail&aid=1989956&group_id=119&atid=300119
If I receive decline or no response within the next 14 days, I will reject that patch, because:
a) The driver directly calls server core functions. I think this should not happen.
b) The patch is potentially dangerous: The driver has no way to request or enforce the heartbeat, instead the heartbeat depends on server, client and screen heartbeat settings. The server would have to be set to enforce the Heartbeat=on, otherwise any client could disable the heartbeat (unintentially) resulting in a system powerdown if the watchdog timeout is less than the screen duration.
To fix a) an API change would be necessary so the heartbeat function does have a return value. The core could then take additional action on depending on the return value much like drivers_icon().
Markus
_______________________________________________
LCDproc mailing list
LCDproc at lists.omnipotent.net
http://lists.omnipotent.net/mailman/listinfo/lcdproc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.omnipotent.net/pipermail/lcdproc/attachments/20090308/2da20dc2/attachment-0001.htm>
More information about the LCDproc
mailing list