A simple terminal-based DNS statistics viewer for Technitium DNS Server, written in Nim.
- Live DNS statistics displayed in a dynamically colorized terminal interface
- Time range selection - View hourly (updated minutely), daily (updated hourly), or weekly (updated daily) statistics
- Performance metrics including recursive response times (median, average, 99th percentile)
- Resolver health indicator - Shows the performance of your configured resolver based on your Internet connection
- Cache efficiency tracking with hit/miss rates and population stats
- DNS Score - Composite experience score (0-100) based on multiple metrics, gives you an at-a-glance idea of your DNS performance
- First-run configuration wizard for easy setup
- Only Linux is supported at this time
- A Technitium DNS Server instance with the Query Logs (SQLite) App installed
- Must be configured to use the in-memory database option for performance reasons.
- A Technitium API token with the following permissions:
Dashboard:ViewSettings:ViewLogs:View
Download the latest release from the GitHub Releases page.
# Clone the repository
git clone https://github.com/sjclayton/nsstats.git
cd nsstats
# Build release binary
nimble release -yThe compiled binary will be at bin/nsstats, you can place it in your $PATH or copy it
to another location of your choice for convenience.
Prerequisites for building:
- Nim compiler >= 2.2.10
- nimble package manager
On first run, nsstats will prompt you to configure your Technitium DNS Server connection:
nsstatsIf no option is provided, shows current (last hour) stats.
Usage: nsstats [OPTIONS]
Options:
-d, --daily Show daily stats (last 24 hours)
-w, --weekly Show weekly stats (last 7 days)
-c, --config Use an alternate config file (-c /path/to/config.toml)
-h, --help Show this help message
Configuration is stored in TOML format at:
$XDG_CONFIG_HOME/nsstats/config.tomlor~/.config/nsstats/config.toml
Example configuration:
host = "192.168.1.1"
port = "5380"
token = "your-api-token-here"Generate an API token from the Technitium DNS Server web console under Administration > Sessions.
| Metric | Description |
|---|---|
| Total Queries | Total number of DNS queries processed (recursive/cached only) |
| Recursive Lookups | Queries requiring recursive resolution (with miss rate %) |
| Median/Avg/99% RTT | Round-trip response time statistics (recursive lookups only) |
| Resolver Health | Optimal (<10ms), Fair (<20ms), or Degraded (your ISP connection's effect on resolution) |
| Overall Impact | Average delay per lookup (weighted by recursive/total queries ratio) |
| Cached Responses | Responses served from the cache (with hit rate %) |
| Cache Population | Ratio of cached entries to configured maximum cache size |
| DNS Score | Composite experience score (0-100) based on weighted metrics |
MIT License - see LICENSE file for details
