I'd like to direct TOP output to a file, but only select lines from TOP where a certain COMMAND (program name) is running.
For instance, If a command running is called DP800, when I do this:
top -b -d1 | grep DP800 > wiltop.txt
The redirect is formatted strangely (i.e. does not look like TOP output) and it seems that the output spools an entire screen length before being directed to the output file (wiltop.txt)
I tried to use the -U and -p flags to minimize TOP output to the relevant output I need, but those flags did not meet my purpose entirely.
Is there a TOP flag to display output only from certain commands running? (DP800 in my case)
Thanks for any help you can offer.