Killing Old popper Processes in Solaris 8

Posted on in System Administration

I've dealt with a few servers that have long lived popper (POP3) processes. These processes should be closed once the connection is closed, but they occasionally hang around. Once they get in this state, they will never close on their own. After a while, hundreds of these processes will just be consuming resources. Below is a command line that I run from a BASH shell to kill off these old processes. It's designed to kill any popper process that has been around for 10 days or longer.

# for PID in `ps -eo pid,etime,comm | grep popper | /usr/local/bin/egrep '[0-9]{2,3}-' | awk '{ print $1 }'`; do kill ${PID}; done

I use GNU egrep instead of the system default because Solaris' egrep doesn't support the {} syntax in regular expressions.

My Bookshelf

Reading Now

Other Stuff