摘要: 由于是在做mongoDB的实验中再一次的遇到了mongos路由节点同步时由于ntp时间的问题导致同步非常的慢。故写了个时间同步的语句===>while :; do rdate -s 192.168.109.129; sleep 2s; done > /dev/null 2>&1 &rdate: co... 阅读全文
posted @ 2015-07-09 11:30 arun_yh 阅读(9444) 评论(0) 推荐(0) 编辑
摘要: [root@i158 ~]# ntpdate -u time.uuwatch.com 9 Jul 11:18:50 ntpdate[853]: no server suitable for synchronization found[root@i158 ~]# ntpdate -d time.uuw... 阅读全文
posted @ 2015-07-09 11:28 arun_yh 阅读(439) 评论(0) 推荐(0) 编辑
摘要: groupadd-g, --gid GID The numerical value of the group′s ID. This value must be unique, unless the -o option is used. The value mu... 阅读全文
posted @ 2015-07-09 09:46 arun_yh 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 2.找出普通用户s212 data # cat /etc/passwd|awk -F: '{if($3>499)print $0}'nobody:x:65534:65534:nobody:/:/bin/falseuuwatch:x:1000:10::/home/uuwatch:/bin/bash1... 阅读全文
posted @ 2015-07-09 09:32 arun_yh 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 以后大家升级rpm包的时候,不要用Uvh了!我推荐用Fvh前者会把没有安装过得包也给装上,后者只会更新已经安装的包总结:未安装的加上小写p,已安装的不需要加p 查询qrpm {-q|--query} [select-options] [query-options]RPM的查询功能是极为强大,是极为重... 阅读全文
posted @ 2015-07-09 09:16 arun_yh 阅读(525) 评论(0) 推荐(0) 编辑
摘要: i249 ~ # ps -efl|head -1|awk '$2~/S/{print $2}'Si249 ~ # ps -efl|awk '$2~/S/{print $2}'SSSSprintf- 左对齐Width 域的步长,用0表... 阅读全文
posted @ 2015-07-08 17:29 arun_yh 阅读(4125) 评论(0) 推荐(0) 编辑
摘要: # htpasswd -b /usr/local/nagios/etc/htpasswd.users uuwatch 1234+asdf //在现有用户下添加用户和密码[root@slave1 ~]# cat /usr/local/nagios/etc/htpasswd.users ... 阅读全文
posted @ 2015-07-08 14:04 arun_yh 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 设备名称:[root@DB232 shell]# cat /proc/scsi/scsi Attached devices:Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.03 Type: Dire... 阅读全文
posted @ 2015-07-07 14:13 arun_yh 阅读(3689) 评论(0) 推荐(0) 编辑
摘要: 如何解决for循环嵌套问题?i161 admin # for x in `cat tongjidisk`;do ssh $x echo -----------------------$x------------------------; ssh $x for z in a b c d e f g h... 阅读全文
posted @ 2015-07-07 11:40 arun_yh 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 创建以当前时间为文件名的mkdir `date+%Y%m%d`备份以时间做为文件名的tar cvf./htdocs`date +%Y%m%d`.tar ./*date命令如何获得上星期的日期?lastmonth=`date+%Y-%m --date="-1 month"`"-01";然后 awk -... 阅读全文
posted @ 2015-07-07 09:23 arun_yh 阅读(6240) 评论(0) 推荐(0) 编辑