From 1c200d51fbae7824a30159714669146d6b214210 Mon Sep 17 00:00:00 2001 From: "Miguel A. Cortizo" Date: Mon, 31 Mar 2014 22:17:03 +0200 Subject: Update README --- README.rst | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 199c055..ecb4904 100644 --- a/README.rst +++ b/README.rst @@ -5,8 +5,8 @@ **ngxtop** parses your nginx access log and outputs useful, ``top``-like, metrics of your nginx server. So you can tell what is happening with your server in real-time. -Can be used also with Apache log files (experimental). In this case, if not log format is specified, 'combined' will be -used. If the script doesn't detect redirections properly you can force it by using the '-s' option. +Can read from stdin (experimental), useful for remote log files. In this case, if not log +format is specified, 'combined' will be used. Installation ------------ @@ -27,7 +27,6 @@ Usage ngxtop [options] ngxtop [options] (print|top|avg|sum) ngxtop info - tail -f /var/log/apache2/access.log | ngxtop [-s] Options: -l , --access-log access log file to parse. @@ -52,7 +51,6 @@ Usage -c , --config allow ngxtop to parse nginx config file for log format and location. -i , --filter filter in, records satisfied given expression are processed. -p , --pre-filter in-filter expression to check in pre-parsing phase. - -s, --from-stdin read lines from stdin. -b, --db-dump dump database to disk when finished Samples @@ -120,3 +118,30 @@ List 4xx or 5xx responses together with HTTP referer |-----------+----------+----------------| | - | 400 | - | +Output from remote server using log-format option +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + $ ssh user@remote_server tail -f /var/log/apache2/access.log | ngxtop -f common + running for 20 seconds, 1068 records processed: 53.01 req/sec + + Summary: + | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx | + |---------+------------------+-------+-------+-------+-------| + | 1068 | 28026.763 | 1029 | 20 | 19 | 0 | + + Detailed: + | request_path | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx | + |------------------------------------------+---------+------------------+-------+-------+-------+-------| + | /xxxxxxxxxx | 199 | 55150.402 | 199 | 0 | 0 | 0 | + | /xxxxxxxx/xxxxx | 167 | 47591.826 | 167 | 0 | 0 | 0 | + | /xxxxxxxxxxxxx/xxxxxx | 25 | 7432.200 | 25 | 0 | 0 | 0 | + | /xxxx/xxxxx/x/xxxxxxxxxxxxx/xxxxxxx | 22 | 698.727 | 22 | 0 | 0 | 0 | + | /xxxx/xxxxx/x/xxxxxxxxxxxxx/xxxxxx | 19 | 7431.632 | 19 | 0 | 0 | 0 | + | /xxxxx/xxxxx/ | 18 | 7840.889 | 18 | 0 | 0 | 0 | + | /xxxxxxxx/xxxxxxxxxxxxxxxxx | 15 | 7356.000 | 15 | 0 | 0 | 0 | + | /xxxxxxxxxxx/xxxxxxxx | 15 | 9978.800 | 15 | 0 | 0 | 0 | + | /xxxxx/ | 14 | 0.000 | 0 | 14 | 0 | 0 | + | /xxxxxxxxxx/xxxxxxxx/xxxxx | 13 | 20530.154 | 13 | 0 | 0 | 0 | + -- cgit v1.2.3