Hi guys,
Couldn't find a suitable forum for this question, please move this thread if needed.
What I need to do redirect the output of TOP to a text file. Doing a simple
%> top > top.txt
yields the following
%> less top.txt
load averages: 0.88, 0.89, 0.87 11:50:49
100 processes: 99 sleeping, 1 on cpu
Memory: 64G real, 41G free, 13G swap in use, 53G swap free
---------------------------------------------------------------------------
As you can see, the CPU states are missing because the CPU states need a few seconds to be retrieved.
I tried the following command:
%> top -d 2 -s 5 > top.txt
which does give me the CPU states, but now I'm stuck with two outputs of TOP. I only want one.
Anyone have any idea's of how to capture the complete output of TOP on a UNIX machine?
thanks for your time,
tom.