Fork me on GitHub
瞬间的惊奇真是种确幸,每种确幸都是支玄妙的俳句。吊桥抬起,退回到内心幽静的花园,邂逅的还是那种熟悉的冷冷清清又轰轰烈烈的美妙质感。这真令人欢喜。
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: 查看硬盘的大小脚本[root@localhost ~]# vi repboot.sh#!/bin/bash# To show usage of /boot directory and mode of kernel file.echo "Useage of /boot: "du -sh /bootec 阅读全文
posted @ 2018-10-01 09:22 干嘛那么贪睡 阅读(210) 评论(0) 推荐(0) 编辑
摘要: test 命令测试 -常见的测试类型–测试文件状态–字符串比较–整数值比较–逻辑测试&& 如果是“前面”(真),则“后面”[ -f /var/run/dhcpd.pid ] && rm /var/run/dhcpd.pid 检查 文件是否存在,如果存在就删掉[ -d /media/cdrom ] & 阅读全文
posted @ 2018-10-01 09:21 干嘛那么贪睡 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 需要先明白数据库主从同步正常的标准是来查看两个线程Slave_IO和Slave_SQL两个线程的工作状态; #!/bin/bash #Check MySQL Slave's Runnning Status #Crontab time 00:10 MYSQLPORT=`netstat -na|grep 阅读全文
posted @ 2018-10-01 09:20 干嘛那么贪睡 阅读(183) 评论(0) 推荐(0) 编辑
摘要: source、sh、bash、./ 执行脚本的区别 1、source命令用法: source FileName 作用:在当前bash环境下读取并执行FileName中的命令。该filename文件可以无"执行权限"注:该命令通常用命令“.”来替代。如:source .bash_profile . . 阅读全文
posted @ 2018-10-01 09:19 干嘛那么贪睡 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 变量[^_^][T_T]source .bashrcget_ps1(){if [ "$?" = "0" ]then#we're on the system console or maybe telnetting inexport PS1="[^_^] \h \W\\$ "else#we're not 阅读全文
posted @ 2018-10-01 09:15 干嘛那么贪睡 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 企业监控 主动探测监控(“监控机”主动探测“被监控机”)HTTP服务器监控#!/bin/shLANG=C#被监控服务器、端口列表server_all_list=(\192.168.1.1:80 \192.168.1.2:80 \192.168.1.3:80 \)date=$(date -d "tod 阅读全文
posted @ 2018-10-01 09:14 干嘛那么贪睡 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash #监控的网页地址url="http://dev2.jwsmed.com" #fastcgi启动/重启/停止脚本路径PROG=/data/fistsoft/php/sbin/php-fpm #fastcgi重启记录日志文件LOG=/data/services/logs/php_ 阅读全文
posted @ 2018-10-01 09:10 干嘛那么贪睡 阅读(557) 评论(0) 推荐(0) 编辑
摘要: #! /bin/bash proc_name="beam.smp" #进程名 proc_num() #查询进程数{ num=`ps -ef | grep $proc_name | grep -v grep | wc -l` return $num} proc_numnumber=$? #获取进程数量 阅读全文
posted @ 2018-10-01 09:08 干嘛那么贪睡 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 监控脚本1、查看主机网卡流量#!/bin/bash#network#Mike.Xuwhile : ; dotime='date +%m"-"%d" "%k":"%M'day='date +%m"-"%d'rx_before='ifconfig eth0|sed -n "8"p|awk '{print 阅读全文
posted @ 2018-10-01 09:06 干嘛那么贪睡 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 一、校验数字的表达式 1 数字:^[0-9]*$ 2 n位的数字:^\d{n}$ 3 至少n位的数字:^\d{n,}$ 4 m-n位的数字:^\d{m,n}$ 5 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9] 阅读全文
posted @ 2018-10-01 00:21 干嘛那么贪睡 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页