---
title: Install ovs-stat on Linux | Snap Store
description: Get the latest version of ovs-stat for Linux - Create a sysfs-style representation
  of an Open vSwitch switch.
url: https://snapcraft.io/ovs-stat
---

# ovs-stat

[Edward Hope-Morley (hopem)](https://snapcraft.io/publisher/hopem "View all snaps from Edward Hope-Morley (hopem)")

* [Edward Hope-Morley (hopem)](https://snapcraft.io/publisher/hopem "View all snaps from Edward Hope-Morley (hopem)")
* [Development](https://snapcraft.io/search?categories=development)

latest/stable 1.2

Install latest/stable of ovs-stat

This channel hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

**Install using the command line**

```
sudo snap install ovs-stat
```

Don't have snapd? [Get set up for snaps](https://snapcraft.io/docs/installing-snapd).

---

### Package name

* ovs-stat

---

### License

* Apache-2.0

---

### Last updated

* 16 September 2021 - latest/stable
* 16 September 2021 - latest/candidate

This snap hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

### Websites

* [github.com/dosaboy/ovs-stat](https://github.com/dosaboy/ovs-stat "https://github.com/dosaboy/ovs-stat")

---

### Contact

* [opentastic@gmail.com](mailto:opentastic@gmail.com "mailto:opentastic@gmail.com")

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/ovs-stat#report-snap-modal)

---

* [Description](https://snapcraft.io/ovs-stat#tab-description)
* [Security](https://snapcraft.io/ovs-stat#tab-security)

#### Create a sysfs-style representation of an Open vSwitch switch.

Organise Openvswitch switch contents - bridges, ports, flows etc - into a filesystem structure to make it easy to query either using built-in commands or conventional tools like find and grep. Built-in tools exist to query Openstack and build ovs-appctl ofproto/trace commands.

Use ovs-stat on a host running openvswitch or a sosreport containing ovs data (requires openvswitch and networking plugin output). The result is a "dataset" - a sysfs-style representation of the switch - along with a summary of key attributes. This structure can then be queried manually or by using the built-in queries provided. It can also be viewed as a tree using the --tree command or exported as a tarball. Each dataset is keyed by hostname so that you can build a catalog of datasets from multiple hosts to allow searching across them.

**Install:**

NOTE: a recent version of snapd is needed to get latest support for ovs interface hence why we use the snap version since distro apt package may not be sufficient.

`sudo snap install ovs-stat`

`sudo snap connect ovs-stat:openvswitch`

`sudo snap connect ovs-stat:network-control`

NOTE: the above interfaces are needed for a live ovs. If analysing sosreport data and your sosreport lives on a separate/remote filesystem you only need the following:

`sudo snap connect ovs-stat:removable-media`

**Usage Examples:**

NOTE: because running commands against an openvswitch is typically root-only and because a strictly confined snap can only access the $HOME of the current user, we need to use a location outside $HOME such as /tmp so that the snap can access the path as root.

NOTE: because this is a snap, /tmp/results is converted to /tmp/snap.ovs-stat/tmp/results under the hood

Create dataset from local host and prints summary

`sudo ovs-stat`

Display an existing dataset using tree command

`sudo ovs-stat -p /tmp/results --tree`

Create dataset from sosreport. note that we don't use sudo for this.`

`ovs-stat -p /tmp/results /path/to/sosreport`

Using a path (-p) that contains an existing dataset will switch to read-only mode and will not clobber existing data. To refresh an existing dataset you will need to use --force.

Create dataset from local host and include openstack assertions

`sudo ovs-stat -p /tmp/results --openstack`

Show all Openstack ports on a bridge br-int

`ovs-stat -p /tmp/results --query "openstack.ports br-int"`

Show all Openstack ports on vlan 53

`ovs-stat -p /tmp/results --query "openstack.ports 53"`

Show all Neutron layer2-population flood tunnels for vlan 53

`ovs-stat -p /tmp/results --query "openstack.l2pop 53"`

Generate ofproto/trace commands for a given port

`$ ovs-stat -p ./mydataset --query "ofproto-trace.port tapa05cfc36-21 dhcp"`
`sudo ovs-appctl ofproto/trace br-int udp,in_port=157,dl_src=b3:22:2f:03:42:5d,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=255.255.255.255,udp_src=68,udp_dst=67`

**Troubleshooting**

If your dataset is empty or you see a bunch of "permission denied" make sure you have added the necessary interface connections (see Install section).

If you are running ovs-stat against a sosreport make sure not to use sudo (since snap can only access your $HOME).

---

## Install ovs-stat on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the [installing snapd documentation](https://snapcraft.io/docs/installing-snapd).

[### Arch Linux](https://snapcraft.io/install/ovs-stat/arch)

[### CentOS](https://snapcraft.io/install/ovs-stat/centos)

[### Debian](https://snapcraft.io/install/ovs-stat/debian)

[### elementary OS](https://snapcraft.io/install/ovs-stat/elementary)

[### Fedora](https://snapcraft.io/install/ovs-stat/fedora)

[### KDE Neon](https://snapcraft.io/install/ovs-stat/kde-neon)

[### Kubuntu](https://snapcraft.io/install/ovs-stat/kubuntu)

[### Manjaro](https://snapcraft.io/install/ovs-stat/manjaro)

[### Pop!\_OS](https://snapcraft.io/install/ovs-stat/pop)

[### openSUSE](https://snapcraft.io/install/ovs-stat/opensuse)

[### Red Hat Enterprise Linux](https://snapcraft.io/install/ovs-stat/rhel)

[### Ubuntu](https://snapcraft.io/install/ovs-stat/ubuntu)
