{"id":49838548,"url":"https://github.com/sjclayton/nsstats","last_synced_at":"2026-05-14T02:36:54.949Z","repository":{"id":354163032,"uuid":"1222401049","full_name":"sjclayton/nsstats","owner":"sjclayton","description":"Simple CLI statistics tool for Technitium DNS Server","archived":false,"fork":false,"pushed_at":"2026-05-13T17:51:41.000Z","size":680,"stargazers_count":18,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T18:29:04.593Z","etag":null,"topics":["cli-tool","dns","network-monitoring","nim","nim-lang","technitium","technitium-dns","technitium-dns-server"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjclayton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T10:28:54.000Z","updated_at":"2026-05-13T17:51:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sjclayton/nsstats","commit_stats":null,"previous_names":["sjclayton/nsstats"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/sjclayton/nsstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjclayton%2Fnsstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjclayton%2Fnsstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjclayton%2Fnsstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjclayton%2Fnsstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjclayton","download_url":"https://codeload.github.com/sjclayton/nsstats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjclayton%2Fnsstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33008371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-tool","dns","network-monitoring","nim","nim-lang","technitium","technitium-dns","technitium-dns-server"],"created_at":"2026-05-14T02:36:54.282Z","updated_at":"2026-05-14T02:36:54.937Z","avatar_url":"https://github.com/sjclayton.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nsstats\n\nA simple terminal-based DNS statistics viewer for [Technitium DNS Server](https://technitium.com/dns/), written in Nim.\n\n## Screenshots\n\n**Core Metrics (default)**\n\n![nsstats screenshot](images/nsstats_screenshot.png)\n\n**w/Extra Metrics**\n\n![nsstats screenshot2](images/nsstats_screenshot2.png)\n\n## Features\n\n- **Live DNS statistics** displayed in a dynamically colorized terminal interface\n- **Time range selection** — View hourly (updated minutely), daily (updated hourly), or weekly (updated daily) statistics\n- **Performance metrics** including recursive response times (median, average, 99th percentile)\n- **Cache efficiency tracking** with hit/miss rates and population stats\n- **DNS Score** — Composite experience score (0-100) based on multiple metrics, gives you an at-a-glance idea of your DNS performance\n- **First-run configuration wizard** for easy setup\n\n## Requirements\n\n- **Only Linux is supported at this time**\n- A [Technitium DNS Server](https://technitium.com/dns/) instance with the **Query Logs (SQLite) App** installed\n  - Must be configured to use the **in-memory database** option for performance reasons.\n- A Technitium API token with the following permissions:\n  - `Dashboard:View`\n  - `Settings:View`\n  - `Logs:View`\n\n## Installation\n\n### Download Binary\n\nDownload the latest release from the [GitHub Releases](https://github.com/sjclayton/nsstats/releases) page.\n\n### Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/sjclayton/nsstats.git\ncd nsstats\n\n# Build debug (development) binary\nnimble debug\n\n# Build release binary\nnimble release\n```\n\nThe compiled binary will be at `bin/nsstats`, you can place it in your `$PATH` or copy it\nto another location of your choice for convenience.\n\n**Prerequisites for building:**\n\n- Nim compiler \u003e= 2.2.10\n- nimble package manager\n\n## Usage\n\nOn first run, nsstats will prompt you to configure your Technitium DNS Server connection:\n\n```bash\nnsstats\n```\n\nIf no option is provided, shows current (last hour) stats.\n\n### Command Line Options\n\n```\nUsage: nsstats [OPTIONS]\n\nOptions:\n  -d, --daily    Show daily stats (last 24 hours)\n  -w, --weekly   Show weekly stats (last 7 days)\n  -x, --extra    Show extra metrics (Resolver Health, Most Used Resolver)\n  -c, --config   Use an alternate config file (-c /path/to/config.toml)\n  -v, --version  Show current version\n  -h, --help     Show this help message\n```\n\n## Configuration\n\nConfiguration is stored in TOML format at:\n\n- `$XDG_CONFIG_HOME/nsstats/config.toml` or\n- `~/.config/nsstats/config.toml`\n\nExample configuration:\n\n```toml\nconn_mode = \"http\" # Options: \"http\", \"https\"\nhost = \"192.168.1.1\"\nport = \"5380\" # Defaults: HTTP -\u003e 5380, HTTPS -\u003e 53443\ntoken = \"your-api-token-here\"\nextra_metrics = false # Show extra metrics (Resolver Health, Most Used Resolver)\n```\n\nGenerate an API token from the Technitium DNS Server web console under `Administration \u003e Sessions`.\n\n## Displayed Metrics\n\n### Core Metrics\n\n| Metric                 | Description                                                          |\n| ---------------------- | -------------------------------------------------------------------- |\n| **Total Queries**      | Total number of DNS queries processed (recursive/cached only)        |\n| **Recursive Lookups**  | Queries requiring recursive resolution (with miss rate %)            |\n| **Median/Avg/99% RTT** | Round-trip response time statistics (recursive lookups only)         |\n| **Overall Impact**     | Average delay per lookup (weighted by recursive/total queries ratio) |\n| **Cached Responses**   | Responses served from the cache (with hit rate %)                    |\n| **Cache Population**   | Ratio of cached entries to configured maximum cache size             |\n| **DNS Score**          | Composite experience score (0-100) based on weighted metrics         |\n\n### Extra Metrics\n\nThe following metrics require `-x`/`--extra` or `extra_metrics = true` in your config file:\n\n| Metric                 | Description                                                                             |\n| ---------------------- | --------------------------------------------------------------------------------------- |\n| **Resolver Health**    | Optimal (\u003c15ms), Fair (\u003c25ms), or Degraded (your ISP connection's effect on resolution) |\n| **Most Used Resolver** | Upstream resolver with highest response rate - shows name, IP, and protocol in use      |\n\n## Contributing\n\nAnyone who wishes to contribute is welcome to open an issue or submit a pull request.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## Links\n\n- [Technitium DNS Server](https://technitium.com/dns/)\n- [Technitium API Documentation](https://github.com/TechnitiumSoftware/DnsServer/blob/master/APIDOCS.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjclayton%2Fnsstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjclayton%2Fnsstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjclayton%2Fnsstats/lists"}