I don't understand why ps -al
or sudo ps -al
won't display for instance my java processes. If I do ps -al
then I don't see for example my java jobs but I see them when I do the (strange and unrecognized) ps -xal | grep java
which probably should be something else. I can also find the java PID by a netstat for the port that the java (jetty server) in running on (port 80), get the PID for the process on port 80 and then kill it by its PID. I doesn't seem like sudo killall java
works all the time. Can you help my with a working strategy how to simplify handling the running of 2-3 jetty instances that only sometimes appear when doing ps -al
? I suppose the best way is to stop jetty similarly to the manner in which it is started i.e. sudo mvn jetty:stop
but the jetty manual says that it's ok to just kill the process, which is faster. (I often want to restart jetty.)
-a
andx
are process selectors, Sops
will show filtered processes listing.If you want to see all process use:
ps ax
,ps -ax
orps -A
, evena
and-a
are not the same. Reference:man ps
For killing, try with
sudo killall -s9 ...
. Reference: Kill Commands and Signals