WebFaction
Community site: login faq
0
1

Hello, my processes are taking too much ram, so i need to kill all those processes for fresh ones.

asked 09 Jul '12, 15:32

Darker
122
accept rate: 0%


To kill all your processes, use:

pkill -u $USER

to kill individual processes, first find them using:

ps -u $USER -F

and then manually run kill PID where PID is the process ID of one of the processes in the previous command. For example, if I saw the lines:

[ryans@web310 ~]$ ps -u $USER -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
ryans      676     1  0 30033  2612   4 Jul04 ?        00:00:36 ./myprocess1
ryans      771   676  0 27106  2024   5 Jul07 pts/17   00:00:00 ./myprocess2
ryans     3922   771  0 27554  1184  11 22:56 pts/17   00:00:00 ps -u ryans -F

I could terminate the "./myprocess2" process using "kill 771". If it is stubborn and will not end, I could force it to do so using "kill -9 771".

Lastly, be sure to check any cron jobs you have set up. Terminating your processes won't have any long-term effect if they automatically start up again.

Hope that helps!

permanent link

answered 09 Jul '12, 23:00

ryans ♦♦
5.0k103960
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×10
×3

question asked: 09 Jul '12, 15:32

question was seen: 4,483 times

last updated: 09 Jul '12, 23:00

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM