几个巡检命令

iostat
free -h
df -h
top
mysql的show processlist;
cat /etc/zabbix/zabbix_agent.conf | grep -vE '^$|#'  去掉空格和注释
echo "xxx">a.conf 清空a.conf的内容,写入xxx
echo "xxx">>a.conf 在a.conf里加一条xxx的内容
du -m /run   查看/run目录的大小,以MB单位
du -h /run  查看/run目录的大小,以GB单位 
du -sm /run   只看/run目录的大小,以MB单位 
df -h /bwyprdshare | sed  's/\%//g' | awk '{print $5}'| sed -n '2p'    查看 /bwyprdshare 的目录占用空间状态, sed  's/\%//g'  去除%号显示, awk '{print $5}' 只显示第5列, sed -n '2p' 只显示第二行

Leave a comment

Your email address will not be published. Required fields are marked *