How can I list all Java processes in bash?
I need an command line. I know there is command ps
but I don't know what parameters I need to use.
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- JQ: Select when attribute value exists in a bash a
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
try:
and see how you get on
It's better since it will only show you the active processes not including this command that also got java string the
[]
does the trickps aux | grep java
or
$ ps -fea|grep -i java
I use this (good on Debian 8):
alias psj='ps --no-headers -ww -C java -o pid,user,start_time,command'
You can use single command pgrep as well (doesn't require you to use pipes and multiple commands):
To know the list of java running on the linux machine. ps -e | grep java