I'm currently using
top -b -d 1 > file1.csv
to append the entire output to a csv file. However, I'd like the Cpu(%us) field alone to be entered in file1.
I've gotten as far as this:
top -b -d 1|grep Cpu
where I'm able to view only the Cpu entry.
When I try
top -b -d 1|grep Cpu > file1.csv
it doesn't deem to work as I'm not even able to view my file.
My intention is to plot a LiveGraph for all the CPU values (stored in a csv file) dynamically.
Thanks!