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)


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
  • I can't install anything on the server, so this is not the answer for me, sorry. Jan 20 '15 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.