get_swap.sh
获取当前占用swap的pid脚本内容#!/bin/bash function getswap { SUM=0 OVERALL=0 for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do PID=`echo $DIR | cut -d / -f 3` PROGNAME=`ps -p $PID -o comm --no-headers` for SWAP in `grep Swap ...
pigz 并行压缩
并行压缩 #安装cd /tmpwget http://www.zlib.net/pigz/pigz-2.3.3.tar.gztar -zxvf pigz-2.3.3.tar.gz或者 tar -xvf pigz-2.3.3.tar.gzmake#压缩]$tar cvf - dmp_result/ |/tmp/pigz-2.3.3/pigz -p 10 > /var/lib/mysql/dmp.tar.gz-p 是指定使用几core的cpu 此处指定-p 10 可以通过t...
nc拷贝文件
目标端 10.10.10.10# nc 监听本地9999端口,接受到的文件 进行解压缩nc -l 9999|tar -zxvf -源端# 将要传输的文件或者文件夹压缩,并且使用nc连接目标端的nc监听的端口tar -zcvf - filename | nc 10.10.10.10 9999
Liunx远程拷贝(限速和断点续传)
linux远程拷贝文件,限制速度、断点续传
linux动态修改 max user processes limits
MySQL数据库 连接出现以下异常:ERROR 1135 (HY0000):?Can’t create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug ?以上是OS层面的max processes不够导致的,通过以下实验可以重现此异常: #设置mysql最大连接数1024 操...
shell实现多节点ssh密码登录
下面以:RHEL5 OS为例介绍使用方法 一、安装sshpass命令工具 1.下载sshpass-1.05-1.el5.rf.x86_64.rpm软件包: (http://rpm.pbone.net/index.php3/stat/4/idpl/18849339/dir/redhat_el_5/com/sshpass-1.05-1.el5.rf.x86_64.rpm.html)可以访问此网址下载 2.安装sshpass #]rpm –ivh sshpass-1.05-1.el5.rf.x86_64.rpm...
tcpkill安装
Tcpkill当遇到FIN_WAIT1、Linux下可以借助tcpkill命令,该命令可以将上述状态的安装说明此文适用于RHEL 6.1版本下载rpm包http://mirrors.zju.edu.cn/epel/6/x86_64/libnet-1.1.6-7.el6.x86_64.rpmhttp://mirrors.zju.edu.cn/epel/6/x86_64/libnids-1.24-1.el6.x86_64.rpmhttp://mirrors.zju....
FTP自动下载并解压缩文件脚本
#!/bin/bash###################################################RDIR=/source_dir #下载源数据FTP上目录LDIR=/dis_dir #ftp下载到本地的存放位置UZIP_DIR=$LDIR/uzip #解压中间目录,为了解决文件夹.zip的问题DMP_DIR=$LDIR/dump #最终解压后的的dmp位置#FTP主机IP地址HOST=192.168.1...
一个关于/root/.gvfs的问题解决?
今天公司服务器在执行一个程序(程序是开发人员自己开发)的时候如下错:lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/crazoy/.gvfs Output information may ...