I am just wondering how I can find out in bash how many CPU cores a user is now using on a Linux Server?
I am submitting a fair amount of background jobs to the server, so I'd like to write a bash script to check before I submit a job if the running jobs (processes) submitted by me are too many, because I have to let other users have enough cores to use for their jobs. I'd like to know what bash command can tell me how many cores my jobs are using now.
Thanks and regards!