Reputation: 404
Currently am executing this
ps aux | grep java
It is returning
root 4589 <some process>
user1 4218 <some process1>
user1 4248 <some process2>
user1 4258 <some process3>
Here how we can count the processes which is running by "user1"?
Upvotes: 0
Views: 1294
Reputation: 249293
This is a bit more direct and should do what you want:
pgrep -u user1 java
Upvotes: 2