摘要:
export http_porxy=yourproxy.com:port export https_proxy=yourproxy.com:port export http_proxy=http://domain\\user:pwd@proxy_addr:port export https_proxy= http://domain\\user:pwd@proxy_addr:port ... 阅读全文
摘要:
iptables -F iptables -X iptables -Z iptables -P INPUT DROP iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A INPUT -p tcp --dport 21 -j A... 阅读全文
摘要:
rsync -v --list-only --port=29989 mhgame@mcs.millionhero.com::mh head 0.lst rsyn -c -a rsync://115.231.46.37/gfs/data3/bc/f62/e4169441 /gfs/data0/ rsync -c -a rsync://115.231.46.37/gfs/data3/bc/f62... 阅读全文
摘要:
$ showmount -e 192.168.0.96 Export list for 192.168.0.96: /backup/gz 192.168.0.23/32,192.168.0.102/32,192.168.0.40 /backup/webbg_script 192.168.0.0/22 /backup/dw_bak 192.168.... 阅读全文
摘要:
#!/usr/bin/expect set timeout 2 spawn ssh -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2] expect { "(yes/no)?" {send "yes\n";exp_continue} "password:" {send "[l... 阅读全文
摘要:
# 用Python建立最简单的web服务器 $ python -m SimpleHTTPServer 8080# 支持开发功能的 基础web from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class TestHTTPHan 阅读全文
摘要:
Linux系统下有很多可用的集中管理方案,例如著名的puppet,这个是用ruby开发,号称可以管理以万计的服务器。不过对于大多数SA来说,这个不怎么轻量,设置有点复杂。 这里推荐PSSH,比DSH更强大的批量管理工具,先来看下它的命令列表。 pssh 包安装 5 个实用程序: parallel-s 阅读全文
摘要:
iostat -x 1 10 如果 iostat 没有,要 yum install sysstat avg-cpu: %user %nice %sys %iowait %idle 0.00 0.00 0.25 33.46 66.29 Device: rrqm/s wrqm/s r/s w/s rse 阅读全文
摘要:
# hdparm -Tt /dev/sda /dev/sda: Timing cached reads: 6676 MB in 2.00 seconds = 3340.18 MB/sec Timing buffered disk reads: 218 MB in 3.11 seconds = 70. 阅读全文
摘要:
lsof filename 显示打开指定文件的所有进程lsof -a 表示两个参数都必须满足时才显示结果lsof -c string 显示COMMAND列中包含指定字符的进程所有打开的文件lsof -u username 显示所属user进程打开的文件lsof -g gid 显示归属gid的进程情况 阅读全文