All pastes #286928 Raw Edit

Mine

public text v1 · immutable
#286928 ·published 2006-12-21 00:34 UTC
rendered paste body
#!/usr/bin/perl -w

$host = "X.X.X.X";
$user = "user";

$foo = 0;

open(IN, "ssh $user\@$host ps -xwww |");
        while (<IN>) {
                print;
                chomp;
                if (/^FORK\ Playout\ Server.app$/) { 
                        print "Playout server is on\n";
                }
                if (/^Mediaplaye$/) {
                        print "Mediaplayer 02 is on\n";
                }
                if (/^FORK\ Mediaplayer\ 02.app$/) {
                        print "Mediaplayer 02 is on\n";
                }
                if (/^FORK\ Mediaplayer\ 01.app$/) {
                        print "Mediaplayer 01 is on\n";
                }
                $foo++ if (/^FORK Device Server.app$/);

#               if (/^"FORK\ Device\ Server.app$/) {
#                       print "Device Server is on\n";
#               }
        }
close(IN);

print $foo;