Hi All,
I am using the following command in Linux:
sar -r 30 3
Linux 2.6.18-194.3.1.7.3.el5xen 02/07/2013
02:55:47 PM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
02:56:17 PM 128646024 22348920 14.80 230232 15575860 75497464 0 0.00 0
02:56:47 PM 128646188 22348756 14.80 230244 15576116 75497464 0 0.00 0
02:57:17 PM 128646676 22348268 14.80 230248 15576160 75497464 0 0.00 0
Average: 128646296 22348648 14.80 230241 15576045 75497464 0 0.00 0
-bash-3.2$
I have tried using the following command to get the desired output but somehow not getting it. %memused field is blank
-bash-3.2$ sar -r 1 3 | grep -v Average | grep -v Linux | cut -d' ' -f1,2,6
12:57:57 PM %memused
12:57:58 PM
12:57:59 PM
12:58:00 PM
-bash-3.2$
From the above output, I need to get the following output onwards.
Output should look as below( Need only the values and not the columns to be displayed):
02:55:47 PM %memused
02:56:17 PM 14.80
02:56:47 PM 14.80
02:57:17 PM 14.80
Thanks for your time!
Regards,
a1_win