我是靠谱客的博主 默默音响,这篇文章主要介绍shell监控linux系统进程创建脚本分享,现在分享给大家,希望可以做个参考。

复制代码 代码如下:

#!/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系统进程创建脚本分享内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(137)

评论列表共有 0 条评论

立即
投稿
返回
顶部