All,
I'm using
top -l 0 -s 1 -pid XXX -stats rsize | awk 'NR%13==0; fflush(stdout)' > output.txt
to store the rsize value of a process in a file. Currently the contents of output.txt look like this:
3828K+
3832K+
3836K+
3840K+
3840K
3840K
I would like to modify this one-liner to include timestamp along with the value. I know that there is a "time" column in the top command output.I don't know if this is the execution time.
How How do I modify the awk part of the above one-liner and add timestamp to it? The resultant output should look like this:
1338936728 3828K+
1338936729 3838K
I'm on a Mac OSX. I would like to make a timestamp Vs rsize plot.