I am working on a python script to read CPU usage per core and do some data analysis. 'htop' can show a dynamic usage on standard output but it's not readable by the program.
Is there a way to log snapshot of 'htop' to a text file or standard output?