Skip to content

Commit

Permalink
Merge pull request #433 from mwiget/query-links
Browse files Browse the repository at this point in the history
sanitize xml tags and include links pci and engine stats
  • Loading branch information
dpino committed Sep 12, 2016
2 parents f17f5d0 + 91c5bdc commit 3520f49
Show file tree
Hide file tree
Showing 4 changed files with 797 additions and 45 deletions.
11 changes: 11 additions & 0 deletions src/program/snabbvmx/query/README.md
@@ -0,0 +1,11 @@
## snabb snabbvmx query

This command scans all running snabbvmx instances and dumps their operational data found into
a XML structure for post processing.


```
$ snabb snabbvmx query
```

Example output for a single snabbvmx instance driving one 10GE port can be found in [example1.xml](example1.xml) and another example showing two instances driving linux interfaces in [example2.xml](example2.xml).
247 changes: 247 additions & 0 deletions src/program/snabbvmx/query/example1.xml
@@ -0,0 +1,247 @@
<snabb>
<instance>
<id>xe0</id>
<pid>544</pid>
<next_hop_mac_v4>02:02:02:02:02:02</next_hop_mac_v4>
<next_hop_mac_v6>02:02:02:02:02:02</next_hop_mac_v6>
<monitor>0.0.0.0</monitor>
<engine>
<breaths>3824938500</breaths>
<configs>1</configs>
<freebits>88655384016</freebits>
<freebytes>10820750769</freebytes>
<frees>29019137</frees>
</engine>
<pci>
<_0000-05-00.0>
<dtime>1473479594</dtime>
<macaddr>0</macaddr>
<mtu>9500</mtu>
<promisc>1</promisc>
<rxbcast>0</rxbcast>
<rxbytes>10991753416</rxbytes>
<rxdrop>147538</rxdrop>
<rxerrors>0</rxerrors>
<rxmcast>0</rxmcast>
<rxpackets>29166126</rxpackets>
<speed>10000000000</speed>
<status>1</status>
<txbcast>0</txbcast>
<txbytes>10936750183</txbytes>
<txdrop>0</txdrop>
<txerrors>0</txerrors>
<txmcast>509</txmcast>
<txpackets>29018980</txpackets>
</_0000-05-00.0>
</pci>
<apps>
<lwaftr>
<drop-all-ipv4-iface-bytes>0</drop-all-ipv4-iface-bytes>
<drop-all-ipv4-iface-packets>0</drop-all-ipv4-iface-packets>
<drop-all-ipv6-iface-bytes>0</drop-all-ipv6-iface-bytes>
<drop-all-ipv6-iface-packets>0</drop-all-ipv6-iface-packets>
<drop-bad-checksum-icmpv4-bytes>0</drop-bad-checksum-icmpv4-bytes>
<drop-bad-checksum-icmpv4-packets>0</drop-bad-checksum-icmpv4-packets>
<drop-in-by-policy-icmpv4-bytes>0</drop-in-by-policy-icmpv4-bytes>
<drop-in-by-policy-icmpv4-packets>0</drop-in-by-policy-icmpv4-packets>
<drop-in-by-policy-icmpv6-bytes>0</drop-in-by-policy-icmpv6-bytes>
<drop-in-by-policy-icmpv6-packets>0</drop-in-by-policy-icmpv6-packets>
<drop-in-by-rfc7596-icmpv4-bytes>0</drop-in-by-rfc7596-icmpv4-bytes>
<drop-in-by-rfc7596-icmpv4-packets>0</drop-in-by-rfc7596-icmpv4-packets>
<drop-ipv4-frag-invalid-reassembly>0</drop-ipv4-frag-invalid-reassembly>
<drop-ipv4-frag-random-evicted>0</drop-ipv4-frag-random-evicted>
<drop-ipv6-frag-invalid-reassembly>0</drop-ipv6-frag-invalid-reassembly>
<drop-ipv6-frag-random-evicted>0</drop-ipv6-frag-random-evicted>
<drop-misplaced-not-ipv4-bytes>0</drop-misplaced-not-ipv4-bytes>
<drop-misplaced-not-ipv4-packets>0</drop-misplaced-not-ipv4-packets>
<drop-misplaced-not-ipv6-bytes>0</drop-misplaced-not-ipv6-bytes>
<drop-misplaced-not-ipv6-packets>0</drop-misplaced-not-ipv6-packets>
<drop-no-dest-softwire-ipv4-bytes>0</drop-no-dest-softwire-ipv4-bytes>
<drop-no-dest-softwire-ipv4-packets>0</drop-no-dest-softwire-ipv4-packets>
<drop-no-source-softwire-ipv6-bytes>0</drop-no-source-softwire-ipv6-bytes>
<drop-no-source-softwire-ipv6-packets>0</drop-no-source-softwire-ipv6-packets>
<drop-out-by-policy-icmpv4-packets>0</drop-out-by-policy-icmpv4-packets>
<drop-out-by-policy-icmpv6-packets>0</drop-out-by-policy-icmpv6-packets>
<drop-over-mtu-but-dont-fragment-ipv4-bytes>0</drop-over-mtu-but-dont-fragment-ipv4-bytes>
<drop-over-mtu-but-dont-fragment-ipv4-packets>0</drop-over-mtu-but-dont-fragment-ipv4-packets>
<drop-over-rate-limit-icmpv6-bytes>0</drop-over-rate-limit-icmpv6-bytes>
<drop-over-rate-limit-icmpv6-packets>0</drop-over-rate-limit-icmpv6-packets>
<drop-over-time-but-not-hop-limit-icmpv6-bytes>0</drop-over-time-but-not-hop-limit-icmpv6-bytes>
<drop-over-time-but-not-hop-limit-icmpv6-packets>0</drop-over-time-but-not-hop-limit-icmpv6-packets>
<drop-too-big-type-but-not-code-icmpv6-bytes>0</drop-too-big-type-but-not-code-icmpv6-bytes>
<drop-too-big-type-but-not-code-icmpv6-packets>0</drop-too-big-type-but-not-code-icmpv6-packets>
<drop-ttl-zero-ipv4-bytes>0</drop-ttl-zero-ipv4-bytes>
<drop-ttl-zero-ipv4-packets>0</drop-ttl-zero-ipv4-packets>
<drop-unknown-protocol-icmpv6-bytes>0</drop-unknown-protocol-icmpv6-bytes>
<drop-unknown-protocol-icmpv6-packets>0</drop-unknown-protocol-icmpv6-packets>
<drop-unknown-protocol-ipv6-bytes>0</drop-unknown-protocol-ipv6-bytes>
<drop-unknown-protocol-ipv6-packets>0</drop-unknown-protocol-ipv6-packets>
<hairpin-ipv4-bytes>0</hairpin-ipv4-bytes>
<hairpin-ipv4-packets>0</hairpin-ipv4-packets>
<in-ipv4-bytes>5121043048</in-ipv4-bytes>
<in-ipv4-frag-needs-reassembly>0</in-ipv4-frag-needs-reassembly>
<in-ipv4-frag-reassembled>0</in-ipv4-frag-reassembled>
<in-ipv4-frag-reassembly-unneeded>0</in-ipv4-frag-reassembly-unneeded>
<in-ipv4-packets>14509956</in-ipv4-packets>
<in-ipv6-bytes>5699485594</in-ipv6-bytes>
<in-ipv6-frag-needs-reassembly>0</in-ipv6-frag-needs-reassembly>
<in-ipv6-frag-reassembled>0</in-ipv6-frag-reassembled>
<in-ipv6-frag-reassembly-unneeded>0</in-ipv6-frag-reassembly-unneeded>
<in-ipv6-packets>14508632</in-ipv6-packets>
<ingress-packet-drops>114681497770</ingress-packet-drops>
<memuse-ipv4-frag-reassembly-buffer>0</memuse-ipv4-frag-reassembly-buffer>
<memuse-ipv6-frag-reassembly-buffer>0</memuse-ipv6-frag-reassembly-buffer>
<out-icmpv4-bytes>0</out-icmpv4-bytes>
<out-icmpv4-packets>0</out-icmpv4-packets>
<out-icmpv6-bytes>0</out-icmpv6-bytes>
<out-icmpv6-packets>0</out-icmpv6-packets>
<out-ipv4-bytes>5119140314</out-ipv4-bytes>
<out-ipv4-frag>0</out-ipv4-frag>
<out-ipv4-frag-not>0</out-ipv4-frag-not>
<out-ipv4-packets>14508632</out-ipv4-packets>
<out-ipv6-bytes>5701441288</out-ipv6-bytes>
<out-ipv6-frag>0</out-ipv6-frag>
<out-ipv6-frag-not>0</out-ipv6-frag-not>
<out-ipv6-packets>14509956</out-ipv6-packets>
</lwaftr>
</apps>
<links>
<lwaftr.v6----nh_fwd6.service>
<dtime>1473479594</dtime>
<rxbytes>5701441288</rxbytes>
<rxpackets>14509956</rxpackets>
<txbytes>5701441288</txbytes>
<txdrop>0</txdrop>
<txpackets>14509956</txpackets>
</lwaftr.v6----nh_fwd6.service>
<vm_v4v6.output----vm_xe0.rx>
<dtime>1473479594</dtime>
<rxbytes>17380</rxbytes>
<rxpackets>20</rxpackets>
<txbytes>17380</txbytes>
<txdrop>0</txdrop>
<txpackets>20</txpackets>
</vm_v4v6.output----vm_xe0.rx>
<nh_fwd4.vm----vm_v4v6.v4>
<dtime>1473479594</dtime>
<rxbytes>9926</rxbytes>
<rxpackets>10</rxpackets>
<txbytes>9926</txbytes>
<txdrop>0</txdrop>
<txpackets>10</txpackets>
</nh_fwd4.vm----vm_v4v6.v4>
<lwaftr.hairpin_out----lwaftr.hairpin_in>
<dtime>1473479594</dtime>
<rxbytes>0</rxbytes>
<rxpackets>0</rxpackets>
<txbytes>0</txbytes>
<txdrop>0</txdrop>
<txpackets>0</txpackets>
</lwaftr.hairpin_out----lwaftr.hairpin_in>
<lwaftr.v4----nh_fwd4.service>
<dtime>1473479594</dtime>
<rxbytes>5119140314</rxbytes>
<rxpackets>14508632</rxpackets>
<txbytes>5119140314</txbytes>
<txdrop>0</txdrop>
<txpackets>14508632</txpackets>
</lwaftr.v4----nh_fwd4.service>
<nh_fwd4.service----lwaftr.v4>
<dtime>1473479594</dtime>
<rxbytes>5121043048</rxbytes>
<rxpackets>14509956</rxpackets>
<txbytes>5121043048</txbytes>
<txdrop>0</txdrop>
<txpackets>14509956</txpackets>
</nh_fwd4.service----lwaftr.v4>
<nic_v4v6.v6----nh_fwd6.wire>
<dtime>1473479594</dtime>
<rxbytes>5699485594</rxbytes>
<rxpackets>14508632</rxpackets>
<txbytes>5699485594</txbytes>
<txdrop>0</txdrop>
<txpackets>14508632</txpackets>
</nic_v4v6.v6----nh_fwd6.wire>
<vm_v4v6.v4----nh_fwd4.vm>
<dtime>1473479594</dtime>
<rxbytes>9926</rxbytes>
<rxpackets>10</rxpackets>
<txbytes>9926</txbytes>
<txdrop>0</txdrop>
<txpackets>10</txpackets>
</vm_v4v6.v4----nh_fwd4.vm>
<nh_fwd6.wire----nic_v4v6.v6>
<dtime>1473479594</dtime>
<rxbytes>5701553603</rxbytes>
<rxpackets>14510406</rxpackets>
<txbytes>5701553603</txbytes>
<txdrop>0</txdrop>
<txpackets>14510406</txpackets>
</nh_fwd6.wire----nic_v4v6.v6>
<nh_fwd6.service----lwaftr.v6>
<dtime>1473479594</dtime>
<rxbytes>5699485594</rxbytes>
<rxpackets>14508632</rxpackets>
<txbytes>5699485594</txbytes>
<txdrop>0</txdrop>
<txpackets>14508632</txpackets>
</nh_fwd6.service----lwaftr.v6>
<vm_xe0.tx----vm_v4v6.input>
<dtime>1473479594</dtime>
<rxbytes>151787</rxbytes>
<rxpackets>529</rxpackets>
<txbytes>151787</txbytes>
<txdrop>0</txdrop>
<txpackets>529</txpackets>
</vm_xe0.tx----vm_v4v6.input>
<vm_v4v6.v6----nh_fwd6.vm>
<dtime>1473479594</dtime>
<rxbytes>141861</rxbytes>
<rxpackets>519</rxpackets>
<txbytes>141861</txbytes>
<txdrop>0</txdrop>
<txpackets>519</txpackets>
</vm_v4v6.v6----nh_fwd6.vm>
<nic_v4v6.v4----nh_fwd4.wire>
<dtime>1473479594</dtime>
<rxbytes>5121043048</rxbytes>
<rxpackets>14509956</rxpackets>
<txbytes>5121043048</txbytes>
<txdrop>0</txdrop>
<txpackets>14509956</txpackets>
</nic_v4v6.v4----nh_fwd4.wire>
<nic_xe0.tx----nic_v4v6.input>
<dtime>1473479594</dtime>
<rxbytes>10820528642</rxbytes>
<rxpackets>29018588</rxpackets>
<txbytes>10820528642</txbytes>
<txdrop>0</txdrop>
<txpackets>29018588</txpackets>
</nic_xe0.tx----nic_v4v6.input>
<nic_v4v6.output----nic_xe0.rx>
<dtime>1473479594</dtime>
<rxbytes>10820674263</rxbytes>
<rxpackets>29018980</rxpackets>
<txbytes>10820674263</txbytes>
<txdrop>0</txdrop>
<txpackets>29018980</txpackets>
</nic_v4v6.output----nic_xe0.rx>
<nh_fwd4.wire----nic_v4v6.v4>
<dtime>1473479594</dtime>
<rxbytes>5119120660</rxbytes>
<rxpackets>14508574</rxpackets>
<txbytes>5119120660</txbytes>
<txdrop>0</txdrop>
<txpackets>14508574</txpackets>
</nh_fwd4.wire----nic_v4v6.v4>
<nh_fwd6.vm----vm_v4v6.v6>
<dtime>1473479594</dtime>
<rxbytes>7454</rxbytes>
<rxpackets>10</rxpackets>
<txbytes>7454</txbytes>
<txdrop>0</txdrop>
<txpackets>10</txpackets>
</nh_fwd6.vm----vm_v4v6.v6>
</links>
</instance>
</snabb>

0 comments on commit 3520f49

Please sign in to comment.