How can I know the total of used processors by user in Linux? For example: User "X" runs 2 (or more) processes that use in total 3 processors. How can I know it? If it impossible, then How can I know how many processors can be used by user? For example: User "X" opened session with 2 processors (of 8 possibles).
I need to write Perl function that gets user name (for example "root") and returns scalar number - one of possibles: 1. Total user Processors used (e.g. 2 from 8) 2. Total user Cores used 3. Processors that available for user In my case users runs one (maybe more, but not much) big process that runs few days and I want to know how the processes (of special user) loads the machine.... Because if he uses to much resources, then I'll need to stop him...