Line number, count, frequency, and the actual line
How do install logtop on a Debian or Ubuntu based system?
Simply type the following apt-get command:
$ sudo apt-get install logtop
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: logtop 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 15.7 kB of archives. After this operation, 81.9 kB of additional disk space will be used. Get:1 http://mirrors.service.networklayer.com/ubuntu/ precise/universe logtop amd64 0.3-1 [15.7 kB] Fetched 15.7 kB in 0s (0 B/s) Selecting previously unselected package logtop. (Reading database ... 114954 files and directories currently installed.) Unpacking logtop (from .../logtop_0.3-1_amd64.deb) ... Processing triggers for man-db ... Setting up logtop (0.3-1) ...
The syntax is as follows:
logtop [OPTIONS] [FILE] command | logtop command1 | filter | logtop command1 | filter | logtop [options] [file]
Here are some common examples of logtop.
Show the IP address flooding your LAMP server
Type the following command:
tail -f www.cyberciti.biz_access.log | cut -d' ' -f1 | logtop
See squid cache HIT and MISS log
tail -f cache.log | grep -o "HIT\|MISS" | logtop
To see realtime hit / miss ratio on some caching software log file, enter:
tail -f access.log | cut -d' ' -f1 | logtop -s 20000
The -s option set logtop to work with the maximum of K lines instead of 10000.
- Get Detailed Information About Particular IP address Connections Using netstat Command
- logtop home page
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop