I am looking to log the CPU, Memory, Bandwidth for a process running on Linux. Ultimately the data will be stored in a database, but my main question is how to get access to this data to log in the first place.
My initial thought is to use the top command, and parse the data I need.
Can you think of a better way?