linux scp限速传输
2015-07-07 10:08
585 查看
在将生产库的备份拷贝到UAT环境时,为降低对生产环境的影响,需要对SCP工具进行限速。
上面是未做限速的情况,我看到每秒传送11.2MB,当时以为生产库和UAT数据库之间的网络是百兆网,这不把带宽给跑满了吗,当时吓的汗毛都立起来了,现在想想应该不是百兆网,SCP工具很难把网络跑满,一般会使用百分之四五十的带宽,至于每秒11.2MB应该是交换机做了限制。可是问了几个同事都不能确定到底是多少的带宽,只好对SCP工具进行限速了。
SCP工具可是使用-l参数进行速度限制,单位是字节。
限制每秒传输20000字节,也就约等于每秒传输2M的数据。
1 | [oracle@xxDB01 xxxdb]$ scp -r lv0_20150607 10.0.97.33:/data/ivldb |
2 | Address 10.0.97.33 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! |
3 | oracle@10.0.97.33's password: |
4 | 20150607.log 100% 71KB 71.2KB/s 00:00 |
5 | level_0_ivldb_datafile_700_1 10% 787MB 11.2MB/s 10:06 ETAKilled by signal 2. |
SCP工具可是使用-l参数进行速度限制,单位是字节。
1 | NAME |
2 | scp - secure copy (remote file copy program) |
3 |
4 | SYNOPSIS |
5 | scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 [...] |
6 | [[user@]host2:]file2 |
7 | -l limit |
8 | Limits the used bandwidth, specified in Kbit/s. |
1 | [oracle@XXDB01 xxdb]$ scp -rl 20000 lv0_20150607 10.0.97.33:/data/xxxdb |
2 | Address 10.0.97.33 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! |
3 | oracle@10.0.97.33's password: |
4 | 20150607.log 100% 71KB 71.2KB/s 00:00 |
5 | level_0_ivldb_datafile_700_1 50% 3823MB 2.1MB/s 29:50 |
6 | ETASlevel_0_ivldb_datafile_700_1 100% 7593MB 2.1MB/s 59:49 |
7 | level_0_ivldb_datafile_699_1 100% 8709MB 2.1MB/s 1:08:3 |
相关文章推荐
- Linux的test命令
- 关闭SELinux
- centos yum安装ffmpeg
- 查看linux系统版本命令 (转)
- 比较一下Linux下的Epoll模型和select模型的区别
- CentOS6.5克隆虚拟机后无法启动网卡或无法上网的解决办法
- Ubuntu输入法切换问题
- centos 6.5 网桥配置
- linux socket编程记录
- Centos查看端口占用情况和开启端口命令
- centos 用户行为监控
- CentOS 6.4 x64 minimal安装后 临时联网 以及 setup工具安装
- 嵌入式Linux常用文件系统
- ceph存储 git查看某个文件修改历史Linux下的命令
- linux 链接ln的使用 创建和删除符号连接(软、硬链接)
- linux实训
- 安装 gevent linux
- Linux 命令行中的幽默
- linux用户环境变量
- Linux的五个查找命令