1、BIGIP维护文档1. F5设备关键信息采集CPU占用率获取命令行:#tmstat在最顶上已行即是CPU占用率通过SNMP系统进行获取的方式采集以下值total cycles (sysStatTmTotalCycles - .1.3.6.1.4.1.3375.2.1.1.2.1.41)idle cycles (sysStatTmIdleCycles - .1.3.6.1.4.1.3375.2.1.1.2.1.42)和sleep cycles(sysStatTmSleepCycles-.1.3.6.1.4.1.3375.2.1.1.2.1.43). 大约每隔10秒钟执行一次以上采集动作2. 对每
2、一个值,计算其增量针对两次获取到的结果,示例如下DeltaTmTotalCycles = sysStatTmTotalCycles2 - sysStatTmTotalCycles1DeltaTmIdleCycles = sysStatTmIdleCycles2 - sysStatTmIdleCycles1DeltaTmSleepCycles = sysStatTmSleepCycles2- sysStatTmSleepCycles13然后根据以下公式计算CPU利用率:CPUusage=(DeltaTmTotalCycles - (DeltaTmIdleCycles +DeltaTmSleepC
3、ycles) / DeltaTmTotalCycles) *100最终的CPUusage则为该时段的平均CPU占用率。内存占用率的获取命令行:#b memory显示结果的第一行包括系统的总内存数量和当前已经使用的内存数量SNMP:通过OID sysStatMemoryUsed (.1.3.6.1.4.1.3375.2.1.1.2.1.45) 获取测试命令及输出:rootbigip4:Active config # snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.1.1.2.1.45.1.3.6.1.4.1.3375.2.1.1
4、.2.1.45.0 = Counter64: 384110592系统总连接数:命令行参数:#b global show输出如下:rootbigip1:Active config # b global showGLOBAL STATISTICS -Client side (cur, max, tot) = (32, 45, 244142) /此处为当前Client端的并发连接数 (pkts, bits) in = (719555, 424.4M), out = (342699, 403.0M) PVA (cur, max, tot) = (0, 0, 0) PVA (pkts, bits) in
5、 = (0, 0), out = (0, 0)Server side (cur, max, tot) = (32, 44, 234935) /此处为当前Server端的并发连接数 (pkts, bits) in = (716344, 422.7M), out = (139137, 315.1M) PVA (cur, max, tot) = (0, 0, 0) PVA (pkts, bits) in = (0, 0), out = (0, 0)PVA connections (curr, tot) = (0, 0)TMM cycles (total, idle, sleep) = (213.1T
6、, 121.3T, 91.48T)Denials (maint, addr full, serv full) = (0, 0, 0) (no serv, no listen, no mem, no lic) = (0, 10150, 0, 0)CPU (total, active, multi-mode) = (1, 1, UP)Memory (total, used) = (768.0M, 196.3M)Packets (drop, err in, err out) = (0, 0, 0)HTTP requests = 0Authorization - results (yes, no, d
7、efer, err) = (0, 0, 0, 0) sessions (cur, max, tot) = (0, 0, 0)OneConnect (curr, max, reuse, new) = (0, 0, 0, 0)Stream replacements = 0XML profile errors = 0rootbigip1:Active config #SNMP:通过以下OID获取:sysStatClientCurConns (.1.3.6.1.4.1.3375.2.1.1.2.1.8)测试命令及输出:rootbigip2:Active config # snmpwalk -c pub
8、lic -v2c localhost -On .1.3.6.1.4.1.3375.2.1.1.2.1.8.1.3.6.1.4.1.3375.2.1.1.2.1.8.0 = Counter64: 12系统新建连接数命令行指令:bigtop注意,bigtop输出在默认情况下为4秒钟统计值,每秒新建连接需要将该值除以4。SNMP:通过以下OID获取:sysStatClientTotConns (.1.3.6.1.4.1.3375.2.1.1.2.1.7)/time其中time为两次SNMP Get的间隔时间。系统吞吐流量:通过以下OID获取:客户端入流量:( sysStatClientBytesIn
9、 (.1.3.6.1.4.1.3375.2.1.1.2.1.3)*8 ) / time客户端出流量:( sysStatClientBytesOut (.1.3.6.1.4.1.3375.2.1.1.2.1.5) *8 ) / time服务器端入流量:( sysStatServerBytesIn (.1.3.6.1.4.1.3375.2.1.1.2.1.10)*8 ) / time服务器端出流量:( sysStatServerBytesOut (.1.3.6.1.4.1.3375.2.1.1.2.1.12) *8 ) /time其中time为两次SNMP Get的间隔时间。VS流量获取:命令行参
10、数:#b vs show将输出所有VS的当前状态SNMP:VS 对Client端的流量的获取VS Client Throughtput=VS ClientByteOut+VS ClientByteInVS ClientByteOut的OID为:.1.3.6.1.4.1.3375.2.2.10.2.3.1.9VS ClientByteIn的OID为:.1.3.6.1.4.1.3375.2.2.10.2.3.1.7以VS ClientByteOut为例:测试是否能看到值:rootgw:Active config # snmpwalk -c public -v2c localhost -On .1.
11、3.6.1.4.1.3375.2.2.10.2.3.1.9.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.7.118.115.95.116.101.115.116 = Counter64: 35942.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.15.102.112.95.108.97.98.95.111.117.116.98.111.117.110.100 = Counter64: 401095776.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.15.111.102.102.105.99.101.95.111.117.116.98.1
12、11.117.110.100 = Counter64: 720464695.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.49.46.102.53.108.97.98.46.118.115.46.116.101.108 = Counter64: 254054212.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.50.46.102.53.108.97.98.46.118.115.46.99.110.99 = Counter64: 65675400.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.
13、102.112.50.46.102.53.108.97.98.46.118.115.46.116.101.108 = Counter64: 250312237.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.51.46.102.53.108.97.98.46.118.115.46.99.110.99 = Counter64: 44321163.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.51.46.102.53.108.97.98.46.118.115.46.116.101.108 = Counter64: 222
14、635369.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.52.46.102.53.108.97.98.46.118.115.46.99.110.99 = Counter64: 4929087.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.52.46.102.53.108.97.98.46.118.115.46.116.101.108 = Counter64: 127996782.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.16.102.112.95.98.105.103.105.112.95
15、.108.97.98.95.116.101.108 = Counter64: 771582372.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.19.102.112.49.46.102.53.108.97.98.46.99.110.46.118.115.46.99.110.99 = Counter64: 54347649.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.19.102.112.95.98.105.103.105.112.95.108.97.98.95.118.115.95.99.110.99 = Counter64: 1319029404.1.3
16、.6.1.4.1.3375.2.2.10.2.3.1.9.24.118.115.95.50.49.57.95.49.52.50.95.57.52.95.49.56.57.95.53.51.95.103.116.109 = Counter64: 325004.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.25.118.115.95.50.49.49.95.49.53.53.95.49.54.51.95.49.55.51.95.53.51.95.103.116.109 = Counter64: 311258获取VS的Index和名称:rootgw:Active config #
17、snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.2.10.1.2.1.1.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.7.118.115.95.116.101.115.116 = STRING: vs_test.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.15.102.112.95.108.97.98.95.111.117.116.98.111.117.110.100 = STRING: fp_lab_outbound.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.15
18、.111.102.102.105.99.101.95.111.117.116.98.111.117.110.100 = STRING: office_outbound.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.49.46.102.53.108.97.98.46.118.115.46.116.101.108 = STRING: fp1.f5lab.vs.tel.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.50.46.102.53.108.97.98.46.118.115.46.99.110.99 = STRIN
19、G: c.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.50.46.102.53.108.97.98.46.118.115.46.116.101.108 = STRING: fp2.f5lab.vs.tel.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.51.46.102.53.108.97.98.46.118.115.46.99.110.99 = STRING: c.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.51.46.102.53.108.97.98.46.118.1
20、15.46.116.101.108 = STRING: fp3.f5lab.vs.tel.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.52.46.102.53.108.97.98.46.118.115.46.99.110.99 = STRING: c.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16.102.112.52.46.102.53.108.97.98.46.118.115.46.116.101.108 = STRING: fp4.f5lab.vs.tel.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.16
21、.102.112.95.98.105.103.105.112.95.108.97.98.95.116.101.108 = STRING: fp_bigip_lab_tel.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.19.102.112.49.46.102.53.108.97.98.46.99.110.46.118.115.46.99.110.99 = STRING: c.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.19.102.112.95.98.105.103.105.112.95.108.97.98.95.118.115.95.99.110.99
22、= STRING: fp_bigip_lab_vs_cnc.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.24.118.115.95.50.49.57.95.49.52.50.95.57.52.95.49.56.57.95.53.51.95.103.116.109 = STRING: vs_219_142_94_189_53_gtm.1.3.6.1.4.1.3375.2.2.10.1.2.1.1.25.118.115.95.50.49.49.95.49.53.53.95.49.54.51.95.49.55.51.95.53.51.95.103.116.109 = STRING
23、: vs_211_155_163_173_53_gtm这里的顺序和上面的顺序是一样的,在.1.3.6.1.4.1.3375.2.2.10.1.2.1.1后面就是每个VS名称所对应的OID,把这个OID加到.1.3.6.1.4.1.3375.2.2.10.2.3.1.9后面就是ltmVirtualServStatClientBytesOut的特定VS的OID值了。如果需要获取单个VS数据,以fp_lab_outbound为例:rootgw:Active config # snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.2.10.
24、2.3.1.9.15.102.112.95.108.97.98.95.111.117.116.98.111.117.110.100.1.3.6.1.4.1.3375.2.2.10.2.3.1.9.15.102.112.95.108.97.98.95.111.117.116.98.111.117.110.100 = Counter64: 401095776VS状态的获取命令行参数:#b vs show将输出所有VS的当前状态Virtual Server状态的OID是.1.3.6.1.4.1.3375.2.2.10.1.2.1.22,同样的,在后面加上VS名称OID就可以得到值了,值得类型有red
25、,green和blue。rootgw:Active config # snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.2.10.1.2.1.22.1.3.6.1.4.1.3375.2.2.10.1.2.1.22.7.118.115.95.116.101.115.116 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.15.102.112.95.108.97.98.95.111.117.116.98.111.117.110.100 = INTEGER: green(1).
26、1.3.6.1.4.1.3375.2.2.10.1.2.1.22.15.111.102.102.105.99.101.95.111.117.116.98.111.117.110.100 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.49.46.102.53.108.97.98.46.118.115.46.116.101.108 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.50.46.102.53.108.97.98.46.118.
27、115.46.99.110.99 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.50.46.102.53.108.97.98.46.118.115.46.116.101.108 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.51.46.102.53.108.97.98.46.118.115.46.99.110.99 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102
28、.112.51.46.102.53.108.97.98.46.118.115.46.116.101.108 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.52.46.102.53.108.97.98.46.118.115.46.99.110.99 = INTEGER: red(3).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.16.102.112.52.46.102.53.108.97.98.46.118.115.46.116.101.108 = INTEGER: red(3).1.3.6.
29、1.4.1.3375.2.2.10.1.2.1.22.16.102.112.95.98.105.103.105.112.95.108.97.98.95.116.101.108 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.19.102.112.49.46.102.53.108.97.98.46.99.110.46.118.115.46.99.110.99 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.19.102.112.95.98.105.103.105.112.95.10
30、8.97.98.95.118.115.95.99.110.99 = INTEGER: green(1).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.24.118.115.95.50.49.57.95.49.52.50.95.57.52.95.49.56.57.95.53.51.95.103.116.109 = INTEGER: blue(4).1.3.6.1.4.1.3375.2.2.10.1.2.1.22.25.118.115.95.50.49.49.95.49.53.53.95.49.54.51.95.49.55.51.95.53.51.95.103.116.109
31、= INTEGER: blue(4)2. UCS的备份与恢复: V9This Solution describes how to back up and restore your configuration data using a UCS configuration archive. Unless your configuration has been customized to run programs that are not normally supported on the BIG-IP system, the UCS archive will contain all files required to restore your current configuration to a new system.The .ucs file contains the following configuration data: All BIG-IP-specific configuration files BIG-IP product licenses User accounts and password information DNS zone files Installed SSL certificates and keys B