ps -ef|grep XL --显示所有XL相关的进程
ps -ef |grep xl |wc -l —显示所有XL相关进程的数量
ps -ef|grep xl.py|grep -v grep|awk '{print $2}'|xargs kill -9 -- awk '{print $2}’以空格分离,取第二个字符; “grep -v grep" 在文档中过滤掉包含有grep字符的行;
- 杀掉所有XL开头的进程。
ps -ef|grep XL |grep -v grep | awk '{print $2}'| xargs kill -9
tar -zxvf /home/ceshi/MJHaiNan_16286_20170531105021.tar.gz --
解压一个打包文件
netstat -nat|grep -i "8001"|wc -l —统计8001(忽略大小写)所有有效的链接数量
netstat -nat|grep 'ip.800'|wc -l
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
- 拷贝数据
scp -r -P 9800 ceshi@ip:/opt/CardServer/shianxi .
scp -r -P 9800 test@ip:/opt/CardServer/TeamServer/team.py .
scp -r -P 9800 /Users/macuser/qd/XLMatchServer ceshi@ip:/home/ceshi/qudi/
- 调整服务器时间
date -s '2017-11-24 10:00'
- 安装except
yum install except
- python脚本
nohup python -u xl.py > out.log 2>&1 &
杀掉python脚本
ps -ef|grep python |grep -v grep | awk '{print $2}'| xargs kill -9
查看out.log
tail -f out.log
nohup python -u xl.py 1000 > out.log 2>&1 &
- 查看gate数量
netstat -nat|grep 'ip'|wc -l
netstat -nat|grep 'ip.800'|wc -l
- 服务器时间与网络时间同步:ntpdate -u ntp.api.bz
ab -n 1000000 -c 10000 -p post.txt -T application/x-www-form-urlencoded -r
http://120.78.225.253/