Been messing with this all day and probably going about it the wrong way. In a nutshell, I'm trying to monitor a process (lced) for up/down status. The code below will tell you (from the command line) if the "lced" process is running or not. I've been trying to get the application monitor to work with this code. Any ideas?
#!/usr/bin/perl
#use strict
my $service = ("lced");
my $host = `/bin/hostname`;
chomp $host;
#print "$host\n";
#print "$service\n";
my $status =`/bin/ps cax | /bin/grep $service`;
#print "$status\n";
if (!$status) {
print "$service stopped\n";
}