0

I have a server where there are 144 procs and is being used by multiple people with the same account id. Is there any way I can see how many processors are free (in the terminal) so that I can schedule my program to run with the appropriate number of procs? top does give me the list, but I cannot scroll down and see when (something like) > 31 procs are busy. The server is behind a firewall, so installing htop is also not an option. I saw this How can I see how many processor cores are working? but it didn't help much. The taskset command mentioned here is giving me a bad usage error. Any help?

mitra
  • 23

1 Answers1

1

One simple way is to see how many processes are currently running according to the linux scheduler using:

grep procs_running /proc/stat

You may want to also take into consideration that some processes are temporarily blocked (say on I/O or waiting), so it may be also worth taking these into consideration:

grep procs_blocked /proc/stat