-1

Background

I want to find the cpu core id and utilization of each and every process running in my system.

I have used ps -eF to get cpu core id and ps -aux to get cpu utilization.

Query

I want to know, is there any way to get both the things using a single command or any specific options that is available in ps command to retrieve both the things?

Shri
  • 7
  • 1
  • 2
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Jan 29 '17 at 07:33
  • are you aware of the `top` command? Good luck. – shellter Jan 29 '17 at 10:21

1 Answers1

0

You can add the -o option to your ps -ef to add additional columns to the output. The format specifiers are documented in the ps man page in the Standard Format Specifiers section.
For example:

ps -efo %cpu or ps -efo pcpu

Additionally, you can run this command to list all valid format specifiers:

ps L

Chris Nauroth
  • 9,614
  • 1
  • 35
  • 39