dsctl command line
dsctl is a command-line interface for querying the DataSabi collector directly from a terminal. It ships with the datasabi-collector package and is installed at /usr/bin/dsctl.
You must be in the datasabi group to use it. If you get a "permission denied" error, see Troubleshooting.
Commands
ping
Check that the collector is running and get its version:
dsctl ping
collector 0.1.5 (protocol 1) is runningsummary
Print per-app usage totals for a time range:
dsctl summary today
dsctl summary week
dsctl summary monthExample output:
Total: 1.2 GB (down 1.1 GB, up 87 MB)
1 Firefox 743 MB
2 Google Chrome 301 MB
3 System updates (apt) 89 MB
live
Show the current upload and download rate for each active process:
dsctl live
down 2.1 MB/s up 145 KB/s
Firefox down 1.9 MB/s up 88 KB/s
Google Chrome down 178 KB/s up 57 KB/snetworks
List all known networks and how they are treated:
dsctl networks
1 wlan0 Airtel-5G detected metered override auto => metered (active)
2 eth0 Home-Fibre detected no override auto => unlimitedset-network
Override the metered status of a network:
dsctl set-network 2 metered # force metered
dsctl set-network 2 unlimited # force unlimited
dsctl set-network 2 auto # back to automatic detectionUse the network id from dsctl networks.
watch
Stream live rates and alert events until you press Ctrl+C:
dsctl watchalert-config
Show the current alert rules and whether quiet mode is active:
dsctl alert-config
Quiet mode: off
Alert rules:
1 50 MB in 15 min
2 150 MB in 60 minset-alert
Add or update an alert rule (threshold in MB, window in minutes):
dsctl set-alert 100 30 # 100 MB in 30 minutes
dsctl set-alert 200 60 # 200 MB in an hourdelete-alert
Remove an alert rule by its id (from dsctl alert-config):
dsctl delete-alert 1quiet
Silence all alerts for a number of hours. Pass 0 to clear quiet mode:
dsctl quiet 4 # silence for 4 hours
dsctl quiet 0 # resume alertsJSON output
Any command can output raw JSON with --json:
dsctl summary today --json
dsctl networks --jsonCustom socket path
If the collector is running on a non-default socket, pass --socket:
dsctl --socket /path/to/collector.sock pingNext steps
Issue with this page? Email isaac@arkodeon.com