今天打开公司的监控系统怎么都访问不了,登陆系统tail -Fn /usr/loacl/apache/logs/error.log发现大量的[notice] child pid 8759 exit signal Segmentation fault (11) 报错free -m 查看free只剩下157 估计是内存不够了,在网上找解决方案都不成。后来找到一个说是把缓存清下就试了下果然不报错使用了两个
redis-cli info > /tmp/red.txt 2>/dev/nullm1=`cat /tmp/red.txt|grep total_commands_processed|sed -r 's/\r//'|awk -F ":" '{print $2}'`sleep 10continueredis-cli info > /tmp/red1.txt 2>/dev/nu
#!/bin/shthrps () {thr=`ps aux|grep mysql|wc -l`if [ $thr -ge "3" ]then echo 1else echo 0fi}mysqljs () {mysql -uroot -p123456 -e "show variables like 'key_buffer_size'" >/tmp/myl 2>/dev/nullif [
dir () {dir=$1[ -d $dir ] || mkdir $dirnum=(`/usr/bin/du $dir -sk|awk '{print $1}'|sed 's/[A-Z]//'`)m=$(echo "scale=3;$num/1024"|bc|awk '{printf "%.3f", $0}')echo $m }dir $1
#!/bin/sh#install mysql#check install is notcheck_ok () {if [ $? != "0" ];then echo -e "\033[32m the install is not\033[0m";breakelse echo -e "\033[33m is ok\033[0m"fi}#off the iptables and selinuxipt
#/bin/bash#create the work in 2016-4-15#install ftpcheck_ok() {if [ $? != "0" ];then echo -e "\033[32m the commond is error\033[3m"exit 0elseecho -e "\033[32 the commond is ok\033[0m"fi}#check the wal
while :;read -p "pleas a number" ndoc[$b]=$n;((b++)) echo ${c[@]} echo ${#c[@]}if [ ${#c[@]} -gt 2 ]thend=0 unset c[$d]
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号