sniff bad smell about performance
snout is command line tool to collect system metrics and give you some advice about performance
Download snout with command wget https://snout.oss-cn-beijing.aliyuncs.com/snout
,run chmod +x snout
and then run snout with sudo
=====================================================
ββββββββββββ βββ βββββββ βββ ββββββββββββ
βββββββββββββ βββββββββββββββ ββββββββββββ
ββββββββββββββ ββββββ ββββββ βββ βββ
βββββββββββββββββββββ ββββββ βββ βββ
βββββββββββ ββββββββββββββββββββββββ βββ
βββββββββββ βββββ βββββββ βββββββ βββ
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
+--------------------+--------------------------------+----------------------------------------------------------------------------------+
| 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 |
+--------------------+--------------------------------+----------------------------------------------------------------------------------+
- tcp stack analysis
- disk usage analysis
- inode usage analysis
- network ports usage analysis
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)