I am aware that I can write a cron job that will run top in batch mode and write the output to a file but I am looking for something more elegant than that. Also I am aware of sysstat (sar) but I am looking for more detailed process data.
Does something like this exist?
Look into
atop
, which runs a daemon and keeps historical data for every process. You made need to do some tweaking to keep an archive, but that's my other tool of choice besidessar
.