今天解决某单位前几天因/var文件系统写满后,syslog停止工作。 #cat /var/adm/syslog/syslog.log
发现日志停止在19日就没记录了,进程却还在
#ps -fe|grep syslog root 14208 1 0 10:57:04 ? 0:00 /usr/sbin/...
分类:
其他好文 时间:
2014-09-25 13:58:29
阅读次数:
219
调试技巧:保存log并同时打印屏幕打印log命令adb logcat -v threadtime只能输出到屏幕 如果同时想输出屏幕并保存log回看,可以用"tee"做管道输出:adb logcat -v threadtime | tee backup.log | grep 'MediaPlayerS...
分类:
数据库 时间:
2014-09-25 12:41:38
阅读次数:
482
man grep
grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus (-) is given as file name) for lines containing a match to the given PATT...
分类:
其他好文 时间:
2014-09-25 12:05:58
阅读次数:
195
#!/bin/bashem1_mac=`ifconfigem1|grep‘HWaddr‘|awk‘{print$5}‘`em2_mac=`ifconfigem2|grep‘HWaddr‘|awk‘{print$5}‘`em3_mac=`ifconfigem3|grep‘HWaddr‘|awk‘{print$5}‘`em4_mac=`ifconfigem4|grep‘HWaddr‘|awk‘{print$5}‘`em1="/etc/sysconfig/network-scripts/ifcfg-em1"em2=..
分类:
其他好文 时间:
2014-09-25 03:57:08
阅读次数:
218
如要匹配Computer或computer两个单词,可做如下操作:[Cc]mputer“.”允许匹配ASCII集中任意字符,或为字母,或为数字。使用\{\}匹配模式结果出现的次数匹配字母A出现两次,并以B结尾,操作如下:A\{2\}B匹配A至少4次,使用:A\{4,\}B如给出出现次数范围,例如A出...
分类:
其他好文 时间:
2014-09-25 02:29:38
阅读次数:
223
inittab文件剖析[CentOS 5.X]grep -v “^#” /etc/inittab | more #过滤掉以#开头的行 inittab文件格式id:runlevels:action:process id: 标识符,一般为两位数字或字母 runlevels: 运行级别,可以指定多个,若为空,则表示从0~6各个运行级别都执行 action: 指定运行状态 process:...
分类:
其他好文 时间:
2014-09-24 20:17:47
阅读次数:
170
如何卸载CentOS系统自带MySQL 1.1、查找以前是否装有MySQL命令:rpm-qa|grep-imysql可以看到如下图的所示:(图片来自互联网,仅做参考使用)说明系统自带:MySQL-client-5.5.25a-1.rhel5MySQL-server-5.5.25a-1.rhel51....
分类:
数据库 时间:
2014-09-24 17:32:07
阅读次数:
399
Openfire配置: Ubuntu安装Openfire后性能极低,压力测试只能到4000在线用户数。 ? 第一步 修改Openfire运行环境 通过ps -aux | grep openfire查看openfire服务能观察到启动命令为: /usr/lib/jvm/java-7-openjd...
分类:
其他好文 时间:
2014-09-24 17:10:48
阅读次数:
287
假设遇到mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server报错,有两种情况导致这个问题:1)卸载操作系统预装的mysql-libs包rpm -qa | grep -i libs...
分类:
数据库 时间:
2014-09-24 16:03:27
阅读次数:
2883
查找目录下的所有文件中是否含有某个字符串find .|xargs grep -ri "IBM"find .|xargs grep -ri "IBM" -l\ :只用来屏蔽一个元字符的特殊含义。 如\*,\',\",\|,\+,\^,\. 等.:(点)只匹配任意单字符。pattern\{n\}:只用来...
分类:
系统相关 时间:
2014-09-24 10:10:56
阅读次数:
278