> For the complete documentation index, see [llms.txt](https://docs.onomondo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onomondo.com/traffic-monitor-cli.md).

# Traffic Monitor CLI

`onomondo-live` is the Traffic Monitor CLI tool that enables you to capture all traffic between a device and the network, seen from the network's perspective. [The source code can be found here](https://github.com/onomondo/onomondo-live).

You can output the captured traffic to PCAP file or pipe it to another tool that can read PCAP files (like Wireshark).

## Installation <a href="#installation" id="installation"></a>

You need to have NodeJS and `npm` installed on your system. Then run this command:

```
$ npm install onomondo-live --global
```

## Usage <a href="#usage" id="usage"></a>

You need to use the SIM ID of one or more of your SIMs, and an Onomondo API key. If you want to listen to multiple sims you can supply multiple `--sim` parameters, e.g. like this: `--sim=111111111 --sim=222222222`.

**Write to file**

```
$ onomondo-live --key=onok_a1b2c3.f00ba5 --sim=012345678 --filename=output.pcap
```

**Write to standard output**

```
$ onomondo-live --key=onok_a1b2c3.f00ba5 --sim=012345678 -
```

**Pipe to Wireshark example**

```
$ onomondo-live --key=onok_a1b2c3.f00ba5 --sim=012345678 - | wireshark -k -i -
```
