snout
sniff bad smell about performance
What is snout
snout is command line tool to collect system metrics and give you some advice about performance
Usage
=====================================================
ββββββββββββ βββ βββββββ βββ ββββββββββββ
βββββββββββββ βββββββββββββββ ββββββββββββ
ββββββββββββββ ββββββ ββββββ βββ βββ
βββββββββββββββββββββ ββββββ βββ βββ
βββββββββββ ββββββββββββββββββββββββ βββ
βββββββββββ βββββ βββββββ βββββββ βββ
snout is tool to improve your system performance
=====================================================
Usage:
snout [commands|flags]
The commands & flags are:
help print snout help
version print the version to stdout
--debug switch on debug mode
Examples:
# start in normal mode
snout
# start in debug mode
snout --debug
TIME_WAIT DEMO
+--------------------+--------------------------------+----------------------------------------------------------------------------------+
| SYMPTOM | DESCRIPTION | ADVISES |
+--------------------+--------------------------------+----------------------------------------------------------------------------------+
| TIME_WAIT_TOO_MUCH | tcp connection state | You can reuse tcp connection by set `keepalive` in http client,set |
| | `TIME_WAIT` is too much, | `fastcgi_keep_conn` in php-fpm settings |
| | current amount is 23 | |
+ + +----------------------------------------------------------------------------------+
| | | You can accelerate the `TIME_WAIT` connection recycle by sysctl: sysclt -w |
| | | net.ipv4.tcp_syncookies = 1;sysclt -w net.ipv4.tcp_tw_reuse = 1;sysclt -w |
| | | net.ipv4.tcp_tw_recycle = 1;sysclt -w net.ipv4.tcp_fin_timeout = 30 |
+--------------------+--------------------------------+----------------------------------------------------------------------------------+
Symptom Support
- tcp stack analysis
- disk usage analysis
- inode usage analysis
- network ports usage analysis
Related Project
statfs(df)
implement in golang (https://github.com/ringtail/go-statfs)
sysctl
implement in golang (https://github.com/ringtail/sysctl)
netstat
implement in golang (https://github.com/ringtail/GOnetstat)