Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: I may be remotely depressed.

by dru145 (Friar)
on Jan 03, 2002 at 03:15 UTC ( [id://135841]=note: print w/replies, xml ) Need Help??


in reply to FTP question

Here's something basic that should work. It will save the output of a ps -ef command to a file then use a regex to search if ftpd is running.
#!/usr/bin/perl -w use strict; # See if ftp is running my $result; my $file = "/tmp/df"; my $cmd1 = "ps -ef"; # Run the ps -ef command $result = `$cmd1 >$file`; # Open the file and search if the daemon is running open (FILE, $file) or die "can't open $file: $!"; while (<FILE>){ if (/ftpd/){ print "The ftp daemon is running\n"; } }

HTP
-Dru
Another satisfied monk.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found