Native command to get cpu usage by core

0

Is there any simple way to get CPU usage of each core in Debian in command line? I need it to be able to output current usage into stdout, not like htop (ain't even native!), that does not have non-interactive mode at all... or dose it?

Seems like top can display individual cores when hitting 1 in interactive mode... but I can't find any switch for that, where in batch mode... (-b)

Flash Thunder

Posted 2015-01-20T18:16:42.330

Reputation: 46

Answers

0

I don't think it's installed by default, but sysstat is a tool that provides a lot of system resource usage data, including CPU usage by core. Be sure to read the associated man pages for details on how to get the specific data you're looking for.

I imagine you'll end up with something along the lines of:

sar -P ALL 2 5

immortal squish

Posted 2015-01-20T18:16:42.330

Reputation: 216

I can't install anything on the server, so this is not the answer for me, sorry. – Flash Thunder – 2015-01-20T18:38:10.377