We use TOP command for monitoring the CPU utilization of our system. Running from a command line we can view information regarding CPU and memory usage, the number of running processes, load. Here is the output of the top command…..
But i have a better and much simpler solution to do this job.
# top -b -d 5 -n 4 >> top_log_file
-b —- top running in batch mode
now. Read More
-d —– delay (refresh after 5 seconds and default is 3 seconds).
-n — number of iterations.
we will get a log file named “top_log_file”
# vim top_log_file
so this is how we can run top command in batch mode also for administrative purpose.