I need CPU utilization for each core. I want text-based output in the terminal.
htop technically contains the information I need, but the output is not suitable for my use case as I need to pipe the output to another command for parsing. Is there a way to get this information in a more machine-readable text format?
EDIT: Any well known format would be nice, e.g. CSV/TSV, JSON, XML. Or something simple would be perfectly fine, like newline-delimited lines. Just something I can easily parse. I can possibly parse the
htop output, as it is text. However, that feels wrong because it's sort of "graphical" looking and I can't be sure future versions won't change the look.