[ Date Index ][
Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
hi, I wrote my first ever bit of perl, to monitor my ntp server. http://www.morgad.no-ip.info/cgi-bin/ntp-stat.cgi It seems to do the right thing, but I get an sort: -: write error: Broken pipe error in my logs every time I run it. Any ideas what could be improved to stop this? ----start---- #!/usr/bin/perl -w use strict; use CGI qw(:standard); print header; print start_html('current ntp server status'); print "<pre>\n"; print "<b>heaviest users of my ntp server</b>\n"; system('ntpdc -n -c mon | head -n 2'); system('ntpdc -n -c mon | sort -n -r -k 4 | head'); print "\n"; print "<b>current ntp peers</b>\n"; system('ntpq -n -c peer'); print "\n"; print "<b>current associations</b>\n"; system('ntpq -c as'); print "\n"; system('ntpq -c rl'); print "\n"; print "<b>system stats</b>\n"; system('ntpdc -c sysstats'); print "</pre>\n"; print end_html; ----stop----- best regards Dave -- http://www.morgad.no-ip.info/index.html gpg:0x64B5E037 Distributed Proofreaders: http://www.pgdp.net The NTP server pool http://www.ntp.pool.org -- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.