shell多线程快速检测内网ip是否存活
#!/bin/bash # By rocdk890 # https://blog.slogra.com #Check the network is online cat /dev/null > ip_yes.txt cat /dev/null > ip_no.txt ip_num="192.168.1" read -p "Enter your network segment(Default ip: 192.168.1):" ip_num if...
#!/bin/bash # By rocdk890 # https://blog.slogra.com #Check the network is online cat /dev/null > ip_yes.txt cat /dev/null > ip_no.txt ip_num="192.168.1" read -p "Enter your network segment(Default ip: 192.168.1):" ip_num if...
#!/bin/bash # By rocdk890 # https://blog.slogra.com #Check the network is online read -p "Enter your network segment(example 192.168.1.):" ip_num echo "Please wait..." for i in...
公司服务器最近两天老是因为内存被使用满而造成死机,实在是受不了老叫机房的人去帮忙重启,专门写了个脚本来释放下内存,当然这台服务器不是太重要,我粗鲁的处理方式估计不会适合大多数服务器,请大家使用之前先考虑清楚,不然造成数据丢失就不关我的事了.
脚本内容:
cat check-mem.sh
#!/bin/bash mem_total=`free -m | awk 'NR==2' | awk '{print $2}'` mem_free=`free -m | awk 'NR==3' | awk '{print $4}'`...