Recent Posts
None | 38 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Ruby | 1 min ago
None | 2 min ago
Bash | 3 min ago
None | 3 min ago
None | 3 min ago
None | 5 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 9th of Feb 2010 07:53:23 PM
Download |
Raw |
Embed |
Report
#!/usr/bin/perl
#processes to monitor
%procs = (
"urbanterror","start_server_ut",
"bloodfrontier","bfserver_linux",
"assaultcube","start_server_acube",
"teeworlds","teeworlds_srv",
"smokinguns","start_server_sg",
"worldofpadman","start_server_wop"
);
$status = "lxgc.shackhost.net status:";
#Check monitored processes
{
$counter++;
$proc_list = `ps ax`; #Not getting this each loop will cause $proc_list to get mangled by the regex
if ($proc_list =~ m/.*$procs{$game}.*/g)
{
$status = $status . " $game(ON)";
#print "$game is running($procs{$game})\n";
}
else
{
$status = $status . " $game(OFF)";
#print "$game is not running($procs{$game})\n";
}
}
Submit a correction or amendment below.
Make A New Post