摘要:
ps -eo user,pid,pcpu,pmem,args --sort=-pmem |head -n 5 ps -eo user,pid,pcpu,pmem,args --sort=-pcpu |head -n 5 阅读全文
posted @ 2022-11-28 16:28
51-devops
阅读(20)
评论(0)
推荐(0)
摘要:
#!/bin/bashfunction CPU() { util=`vmstat |awk '{if(NR==3) print $13+$14}'` iowait=`vmstat |awk '{if(NR==3) print $16}'` echo "CPU使用率: ${util}% , 等待磁盘I 阅读全文
posted @ 2022-11-28 16:15
51-devops
阅读(151)
评论(0)
推荐(0)
摘要:
#!/bin/bashUSER_NAME=$@for USER in $USER_NAME;do if ! id $USER &>/dev/null; then PASS=`echo $RANDOM |md5sum |cut -c 1-10` useradd $USER chage -d 0 $US 阅读全文
posted @ 2022-11-28 14:40
51-devops
阅读(28)
评论(0)
推荐(0)
摘要:
1.下载安装mailx yum install mailx -y 2.配置发件服务地址 [root@prometheus-server scripts]# tail -n 4 /etc/mail.rc #测试set from=138xxxx@163.com smtp=smtp.163.comset 阅读全文
posted @ 2022-11-28 13:58
51-devops
阅读(64)
评论(0)
推荐(0)
摘要:
#设置时区ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeif ! crontab -l |grep ntpdate &>/dev/null ; then (echo "* 1 * * * ntpdate time.windows.com 阅读全文
posted @ 2022-11-28 13:33
51-devops
阅读(71)
评论(0)
推荐(0)
浙公网安备 33010602011771号