当前位置:网站首页>##无监控,不运维,以下是监控里常用的脚本监控
##无监控,不运维,以下是监控里常用的脚本监控
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、数据库的监测带自愈
边栏推荐
- 初识Linkerd项目
- Rasa Chat Robot Tutorial (translation) (1)
- JDBC exercise - query data encapsulated into object return & simple login demo
- 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
- 2021-12-22 transaction record
- 滴滴开源DELTA:AI开发者可轻松训练自然语言模型
- 关于 SAP UI5 floating footer 显示与否的单步调试以及使用 SAP UI5 的收益
- 2021-12-21 transaction record
- Volatile instruction rearrangement and why instruction rearrangement is prohibited
- 在家庭智能照明中应用的测距传感芯片4530A
猜你喜欢
Taobao short videos are automatically released in batches without manual RPA open source
石臻臻的2021总结和2022展望 | 文末彩蛋
Distance measuring sensor chip 4530a used in home intelligent lighting
初识Linkerd项目
Transactions from January 6 to October 2022
HiEngine:可媲美本地的云原生内存数据库引擎
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
Annotation problem and hidden Markov model
What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail
随机推荐
A deep long article on the simplification and acceleration of join operation
Setting up sqli lab environment
Simply take stock reading notes (1/8)
Transactions from January 6 to October 2022
DNS的原理介绍
Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface
Kotlin function
《信息系统项目管理师》备考笔记---信息化知识
Flume common commands and basic operations
开发者,云原生数据库是未来吗?
Using MySQL in docker
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
10 minute fitness method reading notes (2/5)
SAP 自开发记录用户登录日志等信息
How can labels/legends be added for all chart types in chart. js (chartjs.org)?
Difference between JUnit theories and parameterized tests
SAP SEGW 事物码里的 ABAP Editor
【云原生】Nacos-TaskManager 任务管理的使用
Neural network of PRML reading notes (1)
Insmod prompt invalid module format