监控端工具ansible计划任务*/10****/dev/shm/history_log.sh构建脚本vim/dev/shm/history_log.sh#!/bin/bashfunctionhistory_log(){ localtime time=`date-d"-10min""+%F%H:%M"` tim=${time%[0-9]} remote_ab-htest-c"tail-300/tmp/all_history"|grep"$tim">>/tmp/All_hi..
分类:
系统相关 时间:
2014-10-20 02:18:43
阅读次数:
238
安装centos7以后按照以往习惯修改rc.local添加开机启动命令,但重启后发现无效,再次重启发现依然如故检查系统rc.local服务运行情况systemctl | grep "rc.local"# rc-local.service ...
分类:
其他好文 时间:
2014-10-20 02:04:47
阅读次数:
236
从Centos7开始,不再用sysvinit管理系统服务了,而是改用了systemd,因此对系统服务管理方法已经变更,以下简述1.查看当前所有系统服务的状态1 systemctl2.查看指定系统服务的状态systemctl | grep "服务名称"3.更改系统服务的状态# 启动指定服务(重启后无效...
分类:
其他好文 时间:
2014-10-20 02:02:28
阅读次数:
193
1.查看NetworkManager.servicesystemctl | grep "NetworkManager.service"2.停止NetworkManager.servicesystemctl disable NetworkManager.service3.查看网卡状态ifconfig4...
分类:
其他好文 时间:
2014-10-19 18:24:40
阅读次数:
138
当然,我们也可以配合grep,只查看包含指定字符的log信息
[root@localhost ~]#tail -f file | grep --line-buffered your_pattern...
分类:
系统相关 时间:
2014-10-19 17:13:55
阅读次数:
290
http://www.vaikan.com/use-multiple-cpu-cores-with-your-linux-commands/你是否曾经有过要计算一个非常大的数据(几百GB)的需求?或在里面搜索,或其它操作——一些无法并行的操作。数据专家们,我是在对你们说。你可能有一个4核或更多核的C...
分类:
系统相关 时间:
2014-10-19 12:57:50
阅读次数:
292
1.清空正在运行的文件: cat /dev/null > filename cp /dev/null filename 貌似说效率更高,但没感觉。更喜欢第一个。2.nohup: no hang up 不挂起 3.grep -o 'str' fileName |wc –l 统计某个字符串出现的次数4....
分类:
其他好文 时间:
2014-10-18 16:46:18
阅读次数:
200
1查看fastcGI进程 ps -ef|grep 'php-fpm' 若没启动,启动 2系统文件打开数ulimit -n 4096查看所有进程的文件打开数lsof |wc -l查看某个进程打开的文件数lsof -p pid |wc -l一、fastcgi缓冲区设置过小 http { ...
分类:
其他好文 时间:
2014-10-18 00:39:47
阅读次数:
233
一:Linux基础命令: 1、find 命令 查找文件 如 find / -name hello 查找根目录下已hello命名的文件。 2、grep命令 字符串匹配 如 grep "lucy" * -R 递归查找文件中含有“lucy”字符串的文件 3、d...
分类:
系统相关 时间:
2014-10-17 23:14:37
阅读次数:
318
针对sql注入特征编写的sql防注入脚本visql.sh#!/bin/bashselect_union(){date=`date+%F\(%H:%M:%S\)`keyword=`grep-E‘select‘./access.log|grep-E‘union‘|awk‘{print$1}‘|sort|uniq`foriin$keyworddogrep‘\<‘$i‘\>‘ip.list&>/dev/null###白名单列表if[$?-eq0]then..
分类:
数据库 时间:
2014-10-17 18:58:25
阅读次数:
136