当前位置:网站首页>##无监控,不运维,以下是监控里常用的脚本监控
##无监控,不运维,以下是监控里常用的脚本监控
2022-07-05 12:40:00 【51CTO】
一些常用的监控shell(自动修复)
1、tomcat的带自愈
2、nginx的带自愈
3、挂载分区的监测
#!/bin/bash
a=`df -hl | awk '{print $5}'| awk 'NR==2'| tr -d '%'`
b=`df -hl | awk '{print $5}'| awk 'NR==3'| tr -d '%'`
c=`df -hl | awk '{print $5}'| awk 'NR==4'| tr -d '%'`
d=`df -hl | awk '{print $5}'| awk 'NR==5'| tr -d '%'`
e=`df -hl | awk '{print $5}'| awk 'NR==6'| tr -d '%'`
f=`df -hl | awk '{print $5}'| awk 'NR==7'| tr -d '%'`
g=`df -hl | awk '{print $5}'| awk 'NR==8'| tr -d '%'`
h=`df -hl | awk '{print $5}'| awk 'NR==9'| tr -d '%'`
i=`df -hl | awk '{print $5}'| awk 'NR==10'| tr -d '%'`
if [ $a -le 80 ] && [ $b -le 80 ] && [ $c -le 80 ] && [ $d -le 80 ] && [ $e -le 80 ] && [ $f -le 80 ] && [ $g -le 80 ] && [ $h -le 80 ] && [ $i -le 80 ]
then
echo "使用率小于80%,使用率正常"
else
echo "硬盘空间不足,请检查"
fi
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
4、swap分区监测
5、数据库的监测带自愈
边栏推荐
- A deep long article on the simplification and acceleration of join operation
- 由扫地增而引起的小叙
- OPPO小布推出预训练大模型OBERT,晋升KgCLUE榜首
- 【云原生】Nacos中的事件发布与订阅--观察者模式
- Pinduoduo flag insertion remarks API
- Transactions from January 6 to October 2022
- Didi open source Delta: AI developers can easily train natural language models
- Simply take stock reading notes (2/8)
- Compilation principle reading notes (1/12)
- Database connection pool & jdbctemplate
猜你喜欢

Volatile instruction rearrangement and why instruction rearrangement is prohibited

Transactions from December 29, 2021 to January 4, 2022

Resnet+attention project complete code learning

VoneDAO破解组织发展效能难题

Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface

RHCSA1

国内市场上的BI软件,到底有啥区别

研究:数据安全工具在 60% 的情况下无法抵御勒索软件

Why is your next computer a computer? Explore different remote operations

Alipay transfer system background or API interface to avoid pitfalls
随机推荐
Simply take stock reading notes (2/8)
Introduction to relational model theory
Laravel文档阅读笔记-mews/captcha的使用(验证码功能)
RHCSA3
Add a new cloud disk to Huawei virtual machine
Compilation principle reading notes (1/12)
Taobao short video, why the worse the effect
SAP UI5 视图里的 OverflowToolbar 控件
VoneDAO破解组织发展效能难题
Kotlin process control and circulation
你的下一台电脑何必是电脑,探索不一样的远程操作
SAP 自开发记录用户登录日志等信息
OPPO小布推出预训练大模型OBERT,晋升KgCLUE榜首
Full text search of MySQL
Taobao short videos are automatically released in batches without manual RPA open source
Pytoch through datasets Imagefolder loads datasets directly from files
Super efficient! The secret of swagger Yapi
SAP self-development records user login logs and other information
Pytoch implements tf Functions of the gather() function
NLP engineer learning summary and index