ct 任务nohup sh ./bin/start.sh /dev/null 2>&1 &中控机批量for h in `get_hosts_by_path xxx`;do { ssh $h 'cd /home/map/anticraw_tmp && nohup /home/map/php-fpm/b...
分类:
其他好文 时间:
2015-06-06 00:15:13
阅读次数:
149
zabbix探索规则自带磁盘及网卡的,参照后整理探索端口并自动添加监控报警功能:shell脚本:#!/bin/bash
port_array=(`netstat-tnlp|egrep-i"$1"|awk{‘print$4‘}|awk-F‘:‘‘{if($NF~/^[0-9]*$/)print$NF}‘|sort|uniq2>/dev/null`)
length=${#port_array[@]}
printf"{\n"
print..
分类:
其他好文 时间:
2015-06-05 17:55:58
阅读次数:
154
虚拟化环境需要克隆虚拟主机,新版RHEL7.1重新封装有些变化下面以“GUI服务器”环境进行rm-rf/etc/ssh/ssh_host*
rm-rf/etc/udev/rules.d/70*删除/etc/sysconfig/network-scripts/ifcfg-eno16777736文件中的MAC以及UUIDcat/dev/null>/etc/machine-id
rm-rf/etc/hostname
sys..
分类:
其他好文 时间:
2015-06-04 06:17:44
阅读次数:
714
gluster3.4.5logrotate默认配置如下:[root@lab25logrotate.d]#catglusterd/var/log/glusterfs/*glusterd.vol.log{missingokpostrotate/bin/kill-HUP`cat/var/run/glusterd.pid2>/dev/null`2>/dev/null||trueendscript}[root@lab25logrotate.d]#catglusterfsd/var/log/gl..
分类:
其他好文 时间:
2015-05-29 12:19:15
阅读次数:
203
1、MapReduce实现矩阵相乘 一. 准备数据 #!/bin/bash
if?[?$#?-ne?3?]
then
??echo?"there?must?be?3?arguments?to?generate?the?two?matries?file!"
??exit?1
fi
cat?/dev/null?>?M_$1_...
分类:
其他好文 时间:
2015-05-21 22:49:07
阅读次数:
215
方法一:echo "open 21.244.88.129user glxtftp glbzuserbinprompt offcd /glxt/DBINFOlcd /tmpput $dblogbye" |ftp -n >/dev/null 2>&1方法二:ftp -ivn <<KATEopen $1u...
分类:
Web程序 时间:
2015-05-20 18:17:10
阅读次数:
188
一:如果linux根分区使用量达到100%,会造成如下现象:root不能登录系统不能正常启动二:通过命令查找根分区内的大文件1.du-sh/*2>/dev/null|sort-hr|head-32.如果上述命令执行后发现/var/占空间最大,那么在查找/var分区内的大文件,如:du-sh/var/*2>/dev/null|sort-hr..
分类:
系统相关 时间:
2015-05-18 21:13:02
阅读次数:
197
[root@songnan00 ~]# crontab -e
crontab: installing new crontab
[root@songnan00 ~]# crontab -l
*/5 * * * * /usr/sbin/ntpdate ntpserver 2>&1 > /dev/null
00 08 * * * /home/songnan/BVT_docker/bvt-scrip...
分类:
系统相关 时间:
2015-05-18 10:55:24
阅读次数:
125
shell中可能经常能看到:>/dev/null 2>&1命令的结果可以通过%>的形式来定义输出/dev/null 代表空设备文件> 代表重定向到哪里,例如:echo "123" > /home/123.txt1 表示stdout标准输出,系统默认值是1,所以">/dev/null"等同于"1>/d...
分类:
系统相关 时间:
2015-05-15 10:26:58
阅读次数:
239
服务器时不时出现Nginx 502 Bad Gateway,如果在电脑旁边还好,要是半夜或者出去了,怎么办?没关系,写个脚本检测服务状态,发现异常,自动重启。自动重启脚本:/dev/null"; $res = shell_exec($exec); if(strip...
分类:
Web程序 时间:
2015-05-14 08:36:20
阅读次数:
185