D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
lib64
/
nagios
/
plugins
/
nccustom
/
Filename :
check_mysqld_msize.sh
back
Copy
#!/bin/bash ##################################### # 2014/10/17, Eduard N. # ##################################### debug=0 max_size=16 #in GB result=$(/bin/ps -C mysqld -o rss --no-header) if [ -z "$result" ] then result=$(/bin/ps -C mariadbd -o rss --no-header) if [ -z "$result" ] then echo "Warning! Zero result" exit 3; fi fi if [ $debug = 1 ] then echo $result, $(($result/1048576)), $max_size fi if [ $(($result/1048576)) -lt $max_size ] then echo "Ok. $result KB"; exit 0; else echo "Critical. RSS memory size: $result KB" exit 2; fi