How to record and replay htop?

TL;DR Is there an option to run htop in a way that will generate some report and the load it using htop later? Similar to perf record and perf report.

I'm a big fan of htop. I use it quite a lot when I want to see if I have some resource problem. e.g some process thread is taking too much cpu/memory. I was wondering if there is a way to record the data that htop use, e.g snapshots of /proc, and use it later in htop. I basically want to run htop on my sever and view the results later. Similar to what you can do with sar. Only that I prefer htop a lot more than the tools that come with sar.


Solution 1:

Unlike perf, which is fully fledged disassembler/debugger/profiler suite, htop is just a simple "interactive process manager - a better top with scrolling" (as author defines it himself in his video presentation). In version 3.0 htop should get support for reading kernel perf counters, which is a great improvement, but no plans has been announced for supporting advanced profiling features like those present in perf...

At this time, the only way one might record htop is by means of asciinema or similar tools, nothing like interactive replay of a recorded performance profile...