Wednesday, 13 January 2016

'top' command - always consider 2nd reading for performance metrics

top is one of the most popular, simplest and easiest for capturing system and process performance metrics on *nix platforms.

I use it the most when I'd like to capture the performance metrics when running a specific test case. A simple example would be to write a script that invokes top at regular intervals while the test is running.

Lets say you write a script that redirects the output of the command to a log file. Now, the metrics collected from the script would not give you the "true" system and process performance footprint during the test.

This is because, the very first output from top command is the average values for the various metrics from the start of the OS. The 2nd value is the actual instantaneous reading to be considered if you would like a "true" measurement to be done.

No comments:

Post a Comment