dstat
Version, currently master branch1 version
- master branchlatestDec 18, 2017
github.com/jamestaylr/device-stat
Utility to monitor and report system statistics across machines
Installation
# Add this to your shard.yml
dependencies:
dstat:
github: jamestaylr/device-stat
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- James Taylor
Dependencies
Runtime Dependencies
- pg*github: will/crystal-pg
- toml*github: manastech/crystal-toml, branch: master
README
dstat Node Profiler
Crystal Setup
Install dependencies, which will be resolved into lib from shard.yml:
crystal deps
Database Setup
Creating the Roles and Tables
sudo su - postgres
psql
CREATE DATABASE stats;
CREATE USER capstone3 WITH PASSWORD 'password';
Then, run psql/schema.psql to initialize the tables, enumerated types, and indices. The database must also be externally reachable:
- In
pg_hba.conf, an entryhost all all 0.0.0.0/0 md5must be added - In
postgresql.conf,listen_addressesmust be set to'*'to bind to0.0.0.0rather than localhost - The following modification must be made to
iptables:
iptables -A INPUT -s 0/0 -p tcp --dport 5432 -j ACCEPT
telnet (instead of a psql client) can be used to trivially verify the port is open on the host machine.
Configure Cron
crontab -e
Should be configured to run benchmarking (dstat -r) every minute:
* * * * * /usr/local/dstat/dstat -r
SystemD Configuration
Move the service unit file, dstat.service into /etc/systemd/system (altering the user option as appropriate). Then the web service can be interacted with using the expected service commands:
sudo service dstat status
If the unit file is changed on disk, run: systemctl daemon-reload as root.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Dec 18, 2017
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jamestaylr/device-stat
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 14, 2026
- Versions
- 1