linkside-cli¶
The app's engine on the command line: replay a recording, run a live session, export, query Mist and inspect what the driver fills in.
linkside-cli replay testdata/synthetic/ies.pcap --client 02:00:00:00:00:01 # one pcap
linkside-cli replay testdata/sessions/synthetic-mlo # session directory, clients from session.json
linkside-cli replay testdata/sessions/synthetic-mlo --json yes # SessionSummary as JSON
linkside-cli live --client <mac> [--reference <mac>] \
[--channel 5180/80] [--bssid <mac>] [--roam-target 5200/80] [--record <session-dir>] [--seconds 120] \
[--search-after 60|no] [--host sensor] [--take-over yes] [--site <id> --api … --org …]
linkside-cli export <session-dir> --out <dir> # report.md and capture.pcapng
linkside-cli mist set-token < token.txt # API token in the login keychain (Observer or higher); the app moves it into its own
op read 'op://<vault>/<item>/credential' | linkside-cli mist set-token # the same from 1Password
linkside-cli mist self --api https://api.eu.mist.com --org <org-id> # the token's access per org
linkside-cli mist sites --api https://api.eu.mist.com --org <org-id>
linkside-cli mist aps --site <id> --api … --org … # APs with their radios
linkside-cli mist neighbors 5 --site <id> --api … --org … # RRM's neighbors per AP on a band (24, 5, 6), the strongest first
linkside-cli mist clients --site <id> --api … --org … # the site's connected clients, as New Session matches a part of a MAC
linkside-cli mist search hostname <name> --site <id> --api … --org … # without --site: the whole org
linkside-cli mist stats --site <id> --client <mac> --api … --org …
linkside-cli mist events --site <id> --client <mac> --raw yes --api … --org … # each event as Mist's JSON
linkside-cli mist const client_events --api … --org … # Mist's client event types, one JSON line each
linkside-cli capture --radio capA --filter '<filter>' # raw stream
linkside-cli clock # clock offset Pi ↔ Mac
linkside-cli radiotap <file.pcap> --client <mac> # the rate fields the driver fills in, per transmitter
linkside-cli fields # field lists against tshark, and its decode of the reference capture
live, capture and clock use ssh sensor, with the ~/.ssh/config from sensor setup. mist also reads the API URL from LINKSIDE_MIST_API, the org ID from LINKSIDE_MIST_ORG and the token from LINKSIDE_MIST_TOKEN or the login keychain, not the app's own data protection keychain, which needs the app's entitlement: once the app has moved the token over, the CLI takes it from LINKSIDE_MIST_TOKEN (op read … | linkside-cli … or an export) or from set-token again, and a token set-token writes later does not reach the app, which keeps its own: Save in Settings changes the app's; the Helpdesk token of the AP pcap from LINKSIDE_MIST_HELPDESK_TOKEN.
live holds the sensor for its session, as the app does (linkside-radio, claim): while another session holds it, live ends with the holder named, and --take-over yes ends that session's hold. capture does not start while a session holds the sensor.
live --site <id> runs Mist beside the capture as the app does, the API URL, the org ID and the token taken as mist takes them: the client's stats and events about every 30 s, a mist poll line each and a mist event line per event, Mist's place for the client for a search, and with --record the polls in mist.json, so a replay judges the recording as the app's. After Stop it waits for Mist's late events and its next stats, about a minute, before it prints the analysis; Ctrl-C once the focus finished cuts them off, which mist.json names (cutOff). Without --site it ends at Stop. A recording from live has no outcome in its session.json until the app opens it: the outcome is judged with the screens' snapshot, which the CLI does not reach yet.
live without --channel has capA search the NL channels (2.4 GHz, 5 GHz, the 6 GHz PSCs) until it has seen the client, after each round also the 6 GHz channels the Reduced Neighbor Reports named beyond the PSCs. With only an MLD address (from Mist), --channel and --bssid are required, plus --reconnect yes, or --mld-after <s> to switch to the reconnect filter only when the address sends nothing for that long; either goes with --record, which then keeps the other clients' requests to the AP (rule 4). --record takes a directory without a recording in it: one that holds a pcap, a status file, a session.json or a mist.json is refused, and so is one another session reserved before it wrote a file (its .linkside-session, made exclusively), so two sessions never share one. A session that ended before it opened a recorder (the radio check failed) leaves the directory free for the next try, without the mist.json of Mist's polls meanwhile, and writes no session.json into a directory whose files it did not make.