Counting the number of processes running in Linux


Option 1: Number of processes run by a lsdyna_smp_s_r1

Sometimes we need to get the number of processes run by a lsdyna_smp_s_r1. For example if you are running a software named lsdyna_smp_s_r1 and you want to know how many processes were spawn, you can use the command

# ps -C lsdyna_smp_s_r1 | wc -l
183

OR if you are checking for the number of processes for SSH

# pgrep lsdyna_smp_s_r1 | wc -l
183

Option 2: Number of processes run by a User

# ps -U user1 | wc -l
333

 

One thought on “Counting the number of processes running in Linux

Leave a reply to psychocod3r Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.