Message-Id: <199708181715.NAA42412@shrimp.fishy.net> Date: Mon, 18 Aug 1997 13:15:37 -0400 (EDT) From: Ben Mehlman To: wu-ftpd@wugate.wustl.edu Subject: Zombie Killer Due to popular demand (three requests since I mentioned it just an hour ago), here's the perl script I use to kill off the ftpd's that are left behind... NOTE: I am on AIX, which has the -o option on PS for customized columns. If your system doesn't have this it won't work. Run form cron periodically (every hour?). It will kill any ftpd's more than 24 hours old. -Ben #!/usr/local/bin/perl open(PS, "/bin/ps -ef -o comm,etime,pid |") || die "couldn't run /bin/ps\n"; foreach () { next unless /^ftpd\S*\s+\d+-\S+\s+(\d+)/; print; print `/bin/kill $1`; } close(PS); ---------------------------------------------------------------------------- Ben Mehlman The reasonable man adapts himself to the world; the Prodigy Services Corp unreasonable one persists in trying to adapt the ben@staff.prodigy.com world to himself. Therefore all progress depends on the unreasonable man. -George Bernard Shaw