tannyzhou1 發(fā)表于 2016-07-29 08:31
vmstat 3 5 | sed -n '3,$p' | awk '{if($22>50) print $0 1.log else print $0 2.log;}'
只能把大于50的值 ...
只能把大于50的值顯示,我的要求是:CPU的ilde 大50時(shí),把源文件全部定向到1.log,當(dāng)idle有小于50的,把源文件(包括大于50的)定向到文件2.log
歡迎光臨 Chinaunix (http://72891.cn/) | Powered by Discuz! X3.2 |