Analyze and show tips about possible bottlenecks in Linux systems regarding to disk, net, cpu, mem
10K+
Analyze and show tips about possible bottlenecks and risks in Linux systems regarding to diskio, networking, cpu, swapping, memory etc.
We decided to create this utility to help on the laborious job of aswering the following:
After hundred of hours looking for metrics on CLI and Prometheus/Grafana tools, correlating data to check if all is ok, now we can automate some of this work. Surely this won't answer all the doubts, but can help you on some repetitive work.
If you are a system admin, answering the "Is the system OK" overnight too, come and tell us what you miss from perfstat on the Issues. Share your experience and automate it forever!
If you are a developer too, help system admins find problems more quickly by implementing some of the Issues so they can keep your software up! If in doubt, ask for a task in "Issues" and we'd be glad to answer.
Perfstat has various interfaces:
perfstatperfstat prometheusgo get github.com/flaviostutz/perfstat
Start exporter using Docker container
version: '3.5'
services:
perfstat:
image: flaviostutz/perfstat
privileged: true
ports:
- 8880:8880
volumes:
- /etc/hostname:/etc/hostname
run docker-compose up -d
Start exporter directly on host
perfstat prometheus
curl localhost:8880/metrics
Add this exporter to Prometheus configuration
Look at docker-compose.yml for a complete example with Prometheus and Grafana
Download a example Grafana Dashboard for Perfstat res/grafana1.json
In order to run perfstat automatically on all hosts of a Swarm Cluster (even if the host is added after running this)
version: '3.5'
services:
perfstat:
image: flaviostutz/perfstat
privileged: true
volumes:
- /etc/hostname:/etc/hostname
deploy:
mode: global
danger_level - overall danger levels
label "type" - bottleneck or risck
label "group" - subsystem: net, disk, mem, cpu
label resource - cpu, mem, disk, net
label name - cpu:1, disk-/mnt/test, nic:eth0
issue_score - independent issues score
issue_resource_value - mem perc for active issues
//run profile for an specific test case
go test -cpuprofile /tmp/cpu.prof -run ^TestProcessStatsBasic$
//see results in browser
go tool pprof -http 0.0.0.0:5050 /tmp/cpu.prof
docker-compose up won't workdocker exec -it [containerid] sh
cd /app
go run .
Because there are some mutex locks misplaced there. We used termdash Controller redraw "by hand" to avoid concurrency problems and it is working well.
Content type
Image
Digest
Size
475 MB
Last updated
about 6 years ago
docker pull flaviostutz/perfstat