当前位置: 首页 > 新闻动态 > 软件编程

shell监控linux系统进程创建脚本分享

作者:用户投稿 浏览: 发布日期:2026-01-16
[导读]: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

免责声明:转载请注明出处:http://jing-feng.com.cn/news/249452.html

扫一扫高效沟通

多一份参考总有益处

免费领取网站策划SEO优化策划方案

请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!