当前位置:网站首页>##无监控,不运维,以下是监控里常用的脚本监控
##无监控,不运维,以下是监控里常用的脚本监控
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、数据库的监测带自愈
边栏推荐
- Transactions from December 29, 2021 to January 4, 2022
- Distributed cache architecture - cache avalanche & penetration & hit rate
- 使用 jMeter 对 SAP Spartacus 进行并发性能测试
- View and modify the MySQL data storage directory under centos7
- 以VMware创新之道,重塑多云产品力
- 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
- [figure neural network] GNN from entry to mastery
- SAP SEGW 事物码里的 Association 建模方式
- GPON technical standard analysis I
- Pytorch two-layer loop to realize the segmentation of large pictures
猜你喜欢

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

我在滴滴做开源

stm32和电机开发(从架构图到文档编写)

Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue

Simply take stock reading notes (2/8)

SAP SEGW 事物码里的 Association 建模方式

RHCSA1

Taobao flag insertion remarks | logistics delivery interface

Taobao short video, why the worse the effect

JDBC exercise - query data encapsulated into object return & simple login demo
随机推荐
A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
Transactions on December 23, 2021
使用 jMeter 对 SAP Spartacus 进行并发性能测试
UNIX socket advanced learning diary - advanced i/o functions
VoneDAO破解组织发展效能难题
Flume common commands and basic operations
Difference between JUnit theories and parameterized tests
RHCSA5
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
I met Tencent in the morning and took out 38K, which showed me the basic smallpox
奔跑,开路
Keras implements verification code identification
Kotlin流程控制、循环
Distributed solution - distributed lock solution - redis based distributed lock implementation
RHCSA7
Alipay transfer system background or API interface to avoid pitfalls
Taobao short videos are automatically released in batches without manual RPA open source
Sqoop import and export operation
GPON technical standard analysis I
Transactions from December 27 to 28, 2021