进程监控脚本程序
来源:互联网 发布:网络解锁助手1.0.9 编辑:程序博客网 时间:2024/06/02 07:30
脚本名demo.sh
#!/bin/sh
echo "$#"
while [ 1 ]
do
pidof $1
if [ $? != 0 ]
then
echo "$1 is not run! Now begin to run..."
./hello1 & #监控的应用程序 路径
else
echo "$1 is running."
fi
pidof $2
if [ $? != 0 ]
then
echo "$2 is not run! Now begin to run..."
./hello2 & #监控的应用程序 路径
else
echo "$2 is running."
fi
sleep 5
done
使用的时候:./demo.sh hello1 hello2
后面跟的参数就是你要监控的进程的名字(程序可执行文件的名字) 0 0
- 进程监控脚本程序
- 一个进程监控脚本程序
- 一个进程监控脚本程序 .
- 进程监控脚本
- shell脚本监控进程
- 监控脚本程序
- C#进程监控程序
- 服务进程监控程序
- 进程监控程序-java
- linux shell脚本-监控进程
- 进程内存占用监控脚本
- shell脚本监控监听器进程
- 监控进程的shell脚本
- 简单的进程监控脚本
- shell 脚本监控程序是否正在执行, 如果没有执行, 则自动启动该进程
- 监控进程(二进制程序)运行状态的C语言实现与脚本实现
- 监控进程 python程序汇总
- 并发程序中的 进程 监控
- opencvc函数(三)
- 本机使用VMWare部署Redis
- LeetCode---300. Longest Increasing Subsequence (M)
- Python中的timedelta
- 线性表基础知识总结
- 进程监控脚本程序
- 线性表基础知识总结
- Ecshop模板开发(十四):商品详情页显示与添加标签
- Machine Learing in Action
- lct学习笔记
- 使用Hexo搭建个人博客
- Opencv 图像叠加 添加水印
- 不必纠结MVC还是MVP,听我说两句~
- LeetCode 406. Queue Reconstruction by Height