while (<>) {
    $ipp = $_;
    chomp $ipp;
    @result = `ssh $ipp 'ps auwx | grep pantasks'`;
    $running = 0;
    foreach $thing (@result) {
	if ( $thing =~ /server/) {
	    $running = 1;
	}
    }
    if ($running == 1) {
	print "$ipp RUNNING pantasks\n";
    } 
    if ($running == 0) {
	print "$ipp NO pantasks\n";}

}
