[HACK] heartbeat client (mini, tech demo only) in ksh
![]()
Hi people!
I've been used to run an older version of the heartbeat client and didn't
bother to update since "a certain new technology" is approaching, but I'm
still OK with the heartbeat technology.
Then, I updated the OS on my router, but the new version's got a 64 bit
time_t... don't ask me how much breakage we already encountered, but since
AI-thingie is approaching, I didn't start to code a heartbeat clieant (and
server) myself like I originally planned.
Instead, I hacked together this small proof-of-concept heartbeat client
for korn shell (http://wiki.mirbsd.de/MirbsdKsh to be exact); it parses
the ifconfig(8) output so if you're not running MirOS (http://mirbsd.de/)
or OpenBSD (http://www.openbsd.org/), you'll have to patch it.
Same goes for the ifconfig directives.
Anyway, happy hacking; tell me if you like it.
XXX the grep could probably be done in shell, saving us a fork(2), but
XXX I don't think it's worth it; I've tested the script for a while now.
https://mirbsd.bsdadvocacy.org:8890/cvs.cgi/contrib/samples/codesnippets/hbclient
if that doesn't work:
http://mirbsd.bsdadvocacy.org/cvs.cgi/contrib/samples/codesnippets/hbclient
[HACK] heartbeat client (mini, tech demo only) in ksh
Neat, testing was actually performed in a similar manner, one indeed doesn't need much more. You can also set the MYIPV4 variable to 'sender' then you don't need to figure out the local IP and it would also work from behind a NAT as the server then uses the senders IP as the source. Of course mentioned in the draft.
Also good to see another implementation and it is apparently interoperable ;)
But what problems are there with a 64bit time_t? Afaik AICCU will then have the same problem.
[HACK] heartbeat client (mini, tech demo only) in ksh
![]()
Yes, I saw that with "sender", but I wanted to do it "right" (we've got to
also reconfigure the giftunnel anyway).
As for the problem - I don't know; I just know it happens on snapshot
20040822 and not on snapshot 20040510; the most known-to-break-stuff
thing was the time_t switch, so I suspect that.
We don't have gdb yet though.
Expect me to send in diffs to staff when AICCU is completed and I'm
doing a port for it.
bye
[HACK] heartbeat client (mini, tech demo only) in ksh
![]()
1) it's moved a bit, look at
http://mirbsd.bsdadvocacy.org/cvs.cgi/contrib/code/heartbeat/hbclient
for the more current versions.
2) I've added hints for different modes of operation.
3) Now it's modularised and more easy to modify for other OSses.
hf
|