Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Service monitor with Perl and PerlSvc

by Juerd (Abbot)
on Apr 17, 2003 at 16:20 UTC ( [id://251245]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package PerlSvc;
    use Win32::Service;
    ...
    use DBI;
    use DBD::ODBC;
    use Win32::EventLog;
    
  2. or download this
    # the short name by which your service will be known (cannot be 'my')
    
  3. or download this
    ${$_}{'CurrentState'}
    
  4. or download this
    $dsn="driver=\{SQL Server\}\;Server=$srv\;UID\=$uid\;PWD\=$pwd\;";
    
  5. or download this
        $exec=$dbh->prepare("...");
        $exec->execute;
    
  6. or download this
    $exec=$dbh->prepare("... values ('$cn', '$sname', $state)");
    
  7. or download this
        $exec->finish;}else{
    
  8. or download this
    }
    }else
    
  9. or download this
            unless (${$_} eq "1"){
    
  10. or download this
                $dsn="driver=\{SQL Server\}\;Server=$srv\;UID\=$uid\;PWD\=
    +$pwd\;";
    
  11. or download this
    }
    sleep(5);
    }
    }
    
  12. or download this
        Win32::Service::GetServices("", \%tmp);
    ...
                if (Win32::Service::GetStatus("",$_,\%{$_})){
    
  13. or download this
    "$DisplayName"
    
  14. or download this
    print "No help available.\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found