参考技术A您好,很高兴为您解答,方法如下: /sbin/sysctl -a | grep shm /sbin/sysctl -a | grep sem /sbin/sysctl -a | grep file-max /sbin/sysctl -a | grep ip_local_port_range 如果我的回答没能帮助您,请继续追问。
sh 用于检查硬盘是否已满的Linux脚本
#!/bin/bash
#start editing
mail="user@mail.com"
partition="/dev/sda1"
threshold="90"
#stop editing
percent=$(df -h | grep "$partition" | awk '{ print $5 }' | sed 's/%//g')
if ((percent > threshold))
then
echo "$partition at $(hostname -f) is nearly full" | mail -s "Your disk is nearly full!!!" "$mail"
fi