Ipvsadm参数详解(常用命令)

2013年11月29日 12:41:40 怀素1980 阅读数:15901

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/huaishu/article/details/17023061
[root@localhost ipvsadm]#  ipvsadm  -h
ipvsadm v1.24 2005/12/10 (compiled with popt and IPVS v1.2.1) Usage: ipvsadm -A|E -t|u|f service-address [-s scheduler] [-p [timeout]] [-M netmask] ipvsadm -D -t|u|f service-address ipvsadm -C ipvsadm -R ipvsadm -S [-n] ipvsadm -a|e -t|u|f service-address -r server-address [options] ipvsadm -d -t|u|f service-address -r server-address ipvsadm -L|l [options] ipvsadm -Z [-t|u|f service-address] ipvsadm --set tcp tcpfin udp ipvsadm --start-daemon state [--mcast-interface interface] [--syncid sid] ipvsadm --stop-daemon state ipvsadm -h Commands: Either long or short options are allowed. --add-service -A add virtual service with options --edit-service -E edit virtual service with options --delete-service -D delete virtual service --clear -C clear the whole table --restore -R restore rules from stdin --save -S save rules to stdout --add-server -a add real server with options --edit-server -e edit real server with options --delete-server -d delete real server --list -L|-l list the table --zero -Z zero counters in a service or all services --set tcp tcpfin udp set connection timeout values --start-daemon start connection sync daemon --stop-daemon stop connection sync daemon --help -h display this help message Options: --tcp-service -t service-address service-address is host[:port] --udp-service -u service-address service-address is host[:port] --fwmark-service -f fwmark fwmark is an integer greater than zero --scheduler -s scheduler one of rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq, the default scheduler is wlc. --persistent -p [timeout] persistent service --netmask -M netmask persistent granularity mask --real-server -r server-address server-address is host (and port) --gatewaying -g gatewaying (direct routing) (default) --ipip -i ipip encapsulation (tunneling) --masquerading -m masquerading (NAT) --weight -w weight capacity of real server --u-threshold -x uthreshold upper threshold of connections --l-threshold -y lthreshold lower threshold of connections --mcast-interface interface multicast interface for connection sync --syncid sid syncid for connection sync (default=255) --connection -c output of current IPVS connections --timeout output of timeout (tcp tcpfin udp) --daemon output of daemon information --stats output of statistics information --rate output of rate information --exact expand numbers (display exact values) --thresholds output of thresholds information --persistent-conn output of persistent connection info --sort sorting output of service/server entries --numeric -n numeric output of addresses and ports
--add-service     -A        add virtual service with option在内核的虚拟服务器表中添加一条新的虚拟服务器记录。也就是增加一台新的虚拟服务器--edit-service    -E        edit virtual service with options编辑内核虚拟服务器表中的一条虚拟服务器记录--delete-service  -D        delete virtual service删除内核虚拟服务器表中的一条虚拟服务器记录--clear           -C        clear the whole table清除内核虚拟服务器表中的所有记录--restore -R restore rules from stdin 恢复虚拟服务器规则 --save -S save rules to stdout 保存虚拟服务器规则,输出为-R 选项可读的格式 --add-server -a add real server with options 在内核虚拟服务器表的一条记录里添加一条新的真实服务器 --edit-server -e edit real server with options 编辑一条虚拟服务器记录中的某条真实服务器记录 --delete-server -d delete real server 删除一条虚拟服务器记录中的某条真实服务器记录 --list -L|-l list the table 显示内核虚拟服务器表 --zero -Z zero counters in a service or all services 虚拟服务表计数器清零 --set tcp tcpfin udp set connection timeout values 设置连接超时值 --start-daemon start connection sync daemon 启动同步守护进程。他后面可以是master 或backup,用来说明LVS Router 是master 或是backup。在这个功能上也可以采keepalived 的VRRP 功能。 --stop-daemon stop connection sync daemon 停止同步守护进程 --help -h display this help message 显示帮助信息 Options: --tcp-service -t service-address service-address is host[:port] 说明虚拟服务器提供的是tcp 的服务[vip:port] or [real-server-ip:port] --udp-service -u service-address service-address is host[:port] 说明虚拟服务器提供的是udp 的服务[vip:port] or [real-server-ip:port] --fwmark-service -f fwmark fwmark is an integer greater than zero 说明是经过iptables 标记过的服务类型。 --scheduler -s scheduler one of rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,the default scheduler is wlc. 使用的调度算法,有这样几个选项,默认的调度算法是: wlc. --persistent -p [timeout] persistent service 持久稳固的服务。这个选项的意思是来自同一个客户的多次请求,将被同一台真实的服务器处理。timeout 的默认值为300 秒 --netmask -M netmask persistent granularity mask --real-server -r server-address server-address is host (and port) 真实的服务器[Real-Server:port] --gatewaying -g gatewaying (direct routing) (default) 指定LVS 的工作模式为直接路由模式(也是LVS 默认的模式 --ipip -i ipip encapsulation (tunneling) 指定LVS 的工作模式为隧道模式 --masquerading -m masquerading (NAT) 指定LVS 的工作模式为NAT 模式 --weight -w weight capacity of real server 真实服务器的权值 --u-threshold -x uthreshold upper threshold of connections --l-threshold -y lthreshold lower threshold of connections --mcast-interface interface multicast interface for connection sync 指定组播的同步接口 --syncid sid syncid for connection sync (default=255) --connection -c output of current IPVS connections 显示LVS 目前的连接 如:ipvsadm -L -c --timeout output of timeout (tcp tcpfin udp) 显示tcp tcpfin udp 的timeout 值 如:ipvsadm -L --timeout --daemon output of daemon information 显示同步守护进程状态 --stats output of statistics information 显示统计信息 --rate output of rate information 显示速率信息 --thresholds output of thresholds information --persistent-conn output of persistent connection info --sort sorting output of service/server entries 对虚拟服务器和真实服务器排序输出 --ops -O one-packet scheduling --numeric -n numeric output of addresses and ports 输出IP 地址和端口的数字形式

有两种命令选项格式,长的和短的,具有相同的意思。在实际使用时,两种都可
以。
-A –add-service 在内核的虚拟服务器表中添加一条新的虚拟服务器记录。也
就是增加一台新的虚拟服务器。
-E –edit-service 编辑内核虚拟服务器表中的一条虚拟服务器记录。
-D –delete-service 删除内核虚拟服务器表中的一条虚拟服务器记录。
-C –clear 清除内核虚拟服务器表中的所有记录。
-R –restore 恢复虚拟服务器规则
-S –save 保存虚拟服务器规则,输出为-R 选项可读的格式
-a –add-server 在内核虚拟服务器表的一条记录里添加一条新的真实服务器
记录。也就是在一个虚拟服务器中增加一台新的真实服务器
-e –edit-server 编辑一条虚拟服务器记录中的某条真实服务器记录
-d –delete-server 删除一条虚拟服务器记录中的某条真实服务器记录
-L|-l –list 显示内核虚拟服务器表
-Z –zero 虚拟服务表计数器清零(清空当前的连接数量等)
–set tcp tcpfin udp 设置连接超时值
–start-daemon 启动同步守护进程。他后面可以是master 或backup,用来说
明LVS Router 是master 或是backup。在这个功能上也可以采用keepalived 的
VRRP 功能。
–stop-daemon 停止同步守护进程
-h –help 显示帮助信息
其他的选项:
-t –tcp-service service-address 说明虚拟服务器提供的是tcp 的服务
[vip:port] or [real-server-ip:port]
-u –udp-service service-address 说明虚拟服务器提供的是udp 的服务
[vip:port] or [real-server-ip:port]
-f –fwmark-service fwmark 说明是经过iptables 标记过的服务类型。
-s –scheduler scheduler 使用的调度算法,有这样几个选项
rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,
默认的调度算法是: wlc.
-p –persistent [timeout] 持久稳固的服务。这个选项的意思是来自同一个客
户的多次请求,将被同一台真实的服务器处理。timeout 的默认值为300 秒。
-M –netmask netmask persistent granularity mask
-r –real-server server-address 真实的服务器[Real-Server:port]
-g –gatewaying 指定LVS 的工作模式为直接路由模式(也是LVS 默认的模式)
-i –ipip 指定LVS 的工作模式为隧道模式
-m –masquerading 指定LVS 的工作模式为NAT 模式
-w –weight weight 真实服务器的权值
–mcast-interface interface 指定组播的同步接口
-c –connection 显示LVS 目前的连接 如:ipvsadm -L -c
–timeout 显示tcp tcpfin udp 的timeout 值 如:ipvsadm -L –timeout
–daemon 显示同步守护进程状态
–stats 显示统计信息
–rate 显示速率信息
–sort 对虚拟服务器和真实服务器排序输出

–numeric -n 输出IP 地址和端口的数字形式

--stat选项是统计自该条转发规则生效以来的包
1. Conns    (connections scheduled)  已经转发过的连接数
2. InPkts   (incoming packets)       入包个数
3. OutPkts  (outgoing packets)       出包个数
4. InBytes (incoming bytes) 入流量(字节) 5. OutBytes (outgoing bytes) 出流量(字节)
--rate选项是显示速率信息
1. CPS      (current connection rate)   每秒连接数
2. InPPS    (current in packet rate)    每秒的入包个数
3. OutPPS   (current out packet rate) 每秒的出包个数 4. InBPS (current in byte rate) 每秒入流量(字节) 5. OutBPS (current out byte rate) 每秒入流量(字节)

转载于:https://www.cnblogs.com/jinanxiaolaohu/p/10558882.html

[转帖]Ipvsadm参数详解(常用命令)相关推荐

  1. linux ping 命令 参数详解,常用ping命令详解

    Ping是Windows.Unix和Linux系统下的一个命令.ping也属于一个通信协议,是TCP/IP协议的一部分.利用"ping"命令可以检查网络是否连通,可以很好地帮助我们 ...

  2. Linux常用命令详解教程大全,Linux教程手册详解常用命令

    一.基本命令 1.1 关机和重启 关机     shutdown -h now        立刻关机     shutdown -h 5        5分钟后关机     poweroff     ...

  3. mysql 的man参数详解_pacman命令详解

    Pacman 是一个软件包管理器,作为ArchLinux发行版的一部分.简单来说,就是和apt-get之于Ubuntu一样,pacman就是Arch的apt-get.要想轻松玩转Arch,学会pacm ...

  4. Redis详解——常用命令总结(完善中)

    1.启动服务:指定目录redis-server redis.conf +Enter ./redis-server /usr/local/redis/redis-2.8.13/redis.conf 2. ...

  5. ping ip 端口_学生会私房菜【20200305期】——Ping命令及其常用参数详解

    一命令原理 Ping是ICMP的一个典型应用.Ping是检测网络连通的常用工具,同时也能收集其他相关信息.用户可以在Ping命令中指定不同参数,如ICMP报文长度.发送的ICMP报文个数.等待回复响应 ...

  6. ls命令及常用参数详解

    ls命令及常用参数详解 ls命令及常用参数详解 ls命令详解 Linux中执行ls -l后,显示的各列代表什么意思? ls命令及常用参数详解 ♢\color{red}{\diamondsuit}♢ l ...

  7. Linux中top命令参数详解、常用快捷键

    1.命令 1.简介 top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.  显示系统当前的进程和其他状况: top是一个动态显示过程 ...

  8. Linux TOP命令各参数详解

    Linux TOP命令参数详解 TOP命令参数详解 top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.下面详细介绍它的使用方法. ...

  9. oracle spool 分隔符_sqlplus--spool命令参数详解

    sqlplus--SPOOL参数详解 Spool是Oracle快速导出数据的工具,是sqlplus的指令,不是sql语法里的东西 一.Spool常用的设置 set arraysize 5000;  / ...

最新文章

  1. Attention!注意力机制可解释吗?
  2. golang mysql proxy_mixer: 一个用go实现的mysql proxy
  3. OpenSSL 与 SSL 数字证书概念贴
  4. 验证手机号码归属地_最新确认:手机号码归属地不能取消
  5. 【渝粤题库】国家开放大学2021春1377理工英语3题目
  6. 组装台式电脑配置清单_攒机必备!各种价位的台式电脑配置清单!
  7. 作者:杨静(1979-),女,博士,合肥工业大学计算机与信息学院副教授
  8. python3 模板引擎_Python实现的简单模板引擎功能示例
  9. MVC AjaxOptions 中的OnSuccess方法执行多次的问题
  10. NYOJ 58 步数最少 【BFS】
  11. 谈谈这些年来我为什么一直在坚持
  12. springboot使用thymeleaf模板引擎时出现org.xml.sax.SAXParseException的原因与解决办法
  13. cocos2dx中node的pause函数(lua)
  14. greenev —— Python 异步网络服务框架
  15. 计算机如何恢复记事本,如何使用电脑桌面便签恢复误删除了的记事本数据内容?...
  16. python鼠标拖拽功能_python 基于selenium实现鼠标拖拽功能
  17. Qt QImage实现频谱图绘制
  18. 三维空间刚体变换:欧拉角、旋转向量、四元数
  19. frp服务实现内网穿透SSH远程内网虚拟机
  20. 怎样查出SQLServer的性能瓶颈

热门文章

  1. 防止内存泄露 Linux下用Valgrind做检查【ZT】
  2. 简单的java日志记,Java 记要 日志,log
  3. C语言中的回调函数(Callback Function)
  4. python ax.imshow_python – Matplotlib imshow / matshow在情节上显...
  5. windows java配置_菜鸟教程 windows 配置java的环境变量
  6. 怎么看vray渲染进度_3dmax如何渲染光子,为什么会卡光子呢?
  7. YUV格式学习:YUV444转换RGB24
  8. toadstool sql格式化
  9. 【maven】maven dependencyManagement 锁定Jar包版本
  10. 【FLink】Flink 1.12 TaskManager 内存结构