将top命令查看指定程序的结果输出到文件

http://outofmemory.cn/code-snippet/8187/linux-top-command-view-by-process-name-or-process-id

top -p`pgrep python | tr "\\n" "," | sed 's/,$//'`



https://www.aliyun.com/zixun/content/3_12_519211.html

top -d 2 -n 3 -b > test.txt


top -p $(pidof RecordClient0414 | sed 's/\s\{1,\}/,/g') -d 60 -n 1 -b >>/home/zy/QTpro/xz0414/build-RecordClient0414-Desktop_Qt_5_6_0_GCC_64bit-Debug/scene1/20.txt


你可能感兴趣的:(将top命令查看指定程序的结果输出到文件)