h a l f b a k e r y
There's no money in it.
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
or get an account
Perl script that figures uptime, posts on webpage, and pipes output to lcd screen.
Say a perl script that pings five servers (redundency), and prints a 0 in a txt file if none of them respond, or a 1 if atleast one of them responds. The scipt then adds the numbers together, and devides the number it just got by the total amount of numbers. This will get you a network uptime percentage.
Figure the percentage out to six decimal points, and have the script post it to your index. This would be great for a web hosting corperation, as you could proudly display your uptime on your site,
We have %99.672538 uptime!
The files would have to be trimmed so it wouldn't do anything horrible to stability and/or proformance. It would also be neat if it piped its output to a lcd screen on your computer, just glance down and see your uptime. Maybe add a uptime timer too.
HostingScene Web Site [Xymbiant, Oct 04 2004]
Xurion Free Hpstomg [dirkjandijkstra, Jan 22 2007]
||Up-time is a simpler calculation than that. Just post the time your servers are online (i.e., not down for maintenance).
||Whether your server can ping other servers, or other servers can ping it, depends on all sorts of network availability. It is a useful statistic, and an indicator of problems, but more so for real time data than for site accessibility.
||This is what I do for a living--write software that does this stuff. And jutta is right, its not quite as trivial as it seems at first glance, if you really want to do it right.
||Aren't you really going to have to do something a little more than just ping the server? You'll have to process some kind of request, like a GET to actually find out of the server is indeed "up" for serving a website or just pingable.