unix shell account

i purchased a unix shell account and got myself into a bit of trouble with my providers heh

i got 3 automated emails telling me i had 3 background processes running, and my limit is two, which i knew.

after a couple of emails between myself and a human being, he suggested i look up information on ps and kill commands, to manage my background processes better.

can anyone point me in the right direction? i have no experience what so ever with unix, or shell accounts heh.. "why did you by a shell account you idiot!" i know i know... to IRC anonymously, and run an eggdrop is all... and... to finally learn about something people are always talking about.. unix.

thanks :slight_smile:


Do you know what particular OS they are running? Anyway, to determine how many processes you have running total, use;
ps -elf | grep <your_login> | wc -l

You will have to subtract one for the command you just executed which ended when it displays back a number.

To determine the process ID (PID) associated with your login, use;

The output should look like;
8174 pts/68 0:00 bash
878 pts/59 0:00 some_command

If I wanted to end "some_command", I would type;
kill 878

Then rereun ps. If it is still running (which is possible), use;
kill -9 878

To log out and make sure all of your processes are not running, use;
kill -1 -1

The reason I asked which OS they were running ia that Solaris 7-8 have a pgrep/pkill command. This allows you to search for a process by name directly, ie;
pkill some_command

If they are running a BSD derived OS, you will probably need to do:

ps aux | grep <username>