sisko wrote:
I tried both strategies last night but I just did so again.
starting with the kill command, I did ps aux | grep apache2 as you suggested.
I only got one line of output. I presume the process id is the first set of number from the left after the user id ?!?
I then tried the kill command with the process id but it came back with the following error:
Code:
-bash: kill: (3330) - No such process
Also, when I tried the same thing last night the process id was different. I don't know if that is normal ??
For future reference, when you do
Code:
ps aux | grep <something>
you should get
two (or more) lines back if that thing you were looking for is running. One of them is the
grep command itself that contains the searched string as a parameter, hence finding itself in the list of process. That's why
kill doesn't find it later, it was there when the
ps aux run, you got it's PID, but it's long gone when you try to
kill it. Running the same command again will give
grep a new PID.
So you are interested in the other[s] line[s] of output, the ones that (don|doesn)'t contain
grep in (it|them).
<self_critique>Unless of course you were looking for a
run amok grep per se, one that is upping your linode I/O rate to the clouds and completely flats at 100% one CPU core, for someone put too little specificity in the path that it was recurring on. </self_critique>
