手机
当前位置:查字典教程网 >脚本专栏 >linuxshell >shell监控linux系统进程创建脚本分享
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系统进程创建脚本分享】相关文章:

linux系统mysql自动备份并使用ftp上传的方法

Shell脚本注释写法

8个实用的Shell脚本分享

一个shell小案例(创建日期目录)

Python执行Linux系统命令的4种方法

linux自动重启tomcat脚本分享

自己常用的一些shell脚本分享

Shell实现强制释放内存脚本分享

一键配置CentOS iptables防火墙的Shell脚本分享

centos中mysql备份数据库脚本分享

精品推荐
分类导航