Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有多个Linux的服务器,我需要在这里测试我的程序的性能,这里我想输出运行程序时的系统状态。在linux的脚本中,我使用以下输出:
top -b -d 5 > System.txt iostat -d 8 > IO.txt
但是很遗憾,只能生成system.txt,而没有IO.txt文件,所以需要在脚本中添加一些东西让这两个文件同时存在吗?
像这样使用 iostat 命令:- iostat -d 8 1 > IO.txt。
在这个 1 表示限制,你想运行命令多少次得到结果。