1.将cpu和内存使用情况按照10hz的频率保存到文本文件: top -b -d 0.1 | grep "program_name" > ./cpu_test20230919.txt& 2. 将磁盘的读写速率按照10hz的频率保存到文本文件: sudo iotop -b -d 0.1 | grep "program_name" > ./disk_io_20230919.log