xiaozhouX / snout

🐽snout is command line tool to collect system metrics and give you some advice about performance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snout

sniff bad smell about performance

Build Status Codecov License

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)

About

🐽snout is command line tool to collect system metrics and give you some advice about performance

License:Apache License 2.0


Languages

Language:Go 99.1%Language:Shell 0.9%