shell监控linux系统进程创建脚本分享
摘要:复制代码代码如下:#!/bin/shwhiletruedopsax-ocommand|sort|uniq>1.txtusleep100000...
复制代码 代码如下:
#!/bin/sh
while true
do
ps ax -o command | sort | uniq > 1.txt
usleep 100000
ps ax -o command | sort | uniq > 2.txt
diff 1.txt 2.txt | grep '^+[^+]' | while read a
do
a=`echo ${a#*+}`
if [[ "$a" != "uniq" ]] && [[ "$a" != "sort" ]] && [[ "$a" != "" ]]
then
echo $a
fi
done
done
【shell监控linux系统进程创建脚本分享】相关文章:
★ 一天一个shell命令 linux文本操作系列-touch命令用法
上一篇:
Linux进程通信(IPC)方式简介
下一篇:
局域网远程开机软件制作代码分享