From: Michael R. <re...@eu...> - 2005-01-26 21:07:56
|
Hi there, > I can do better than that... :) I can post a partly-done script showing > what I mean... > # Network Status: > ping 192.168.0.1 -w 5 -c 1 >/dev/null && s1="ok" || s1="error" > ping 192.168.0.2 -w 5 -c 1 >/dev/null && s2="ok" || s2="error" > ping 192.168.0.3 -w 5 -c 1 >/dev/null && s3="ok" || s3="error" > ping 192.168.0.4 -w 5 -c 1 >/dev/null && s4="ok" || s4="error" > ping 192.168.0.5 -w 5 -c 1 >/dev/null && s5="ok" || s5="error" > ping 192.168.0.8 -w 5 -c 1 >/dev/null && s8="ok" || s8="error" > > if [ "$s1" = "error" ]; then > sys="Zuul offline" > elif [ "$s2" = "error" ]; then > sys="Toadstool offline" > elif [ "$s3" = "error" ]; then > sys="Bessie offline" > elif [ "$s4" = "error" ]; then > sys="GayMer offline" > elif [ "$s8" = "error" ]; then > sys="Mavus offline" > else > sys="Ok" > fi > echo "Systems: $sys" I think you can achieve this with the current lcd4linux and the exec plugin. write a little shell script: system_status.sh #! /bin/bash ping $1 -w 5 -c 1 >/dev/null && echo "ok" || echo "error" and use the exec plugin: exec('/home/me/system_status.sh 192.168.0.1', 10000) WARNING: this is untested! bye, Michael -- Michael Reinelt <re...@eu...> http://members.eunet.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |