LOGTOP(1)
π LOGTOP β the manual, but make it slay
okay bestie, sit down, hydrate, because we're about to talk about logtop from the General Commands Manual and it's genuinely iconic. no cap. π
β¨ NAME β¨
logtop β Realtime log line rate analyser π¦
πΈ SYNOPSIS πΈ
logtop [OPTIONS]
that's it. that's the whole vibe. you feed it stuff, it tells you things. periodt. β¨
π DESCRIPTION π
okay so logtop is a System Administrator tool that analyzes the line rate on stdin. the way it works is literally this: it reads on stdin and prints a constantly updated result, and that result shows up in columns, like so:
- Line number π’
- count π’
- frequency π’
- and the actual line π
and bestie, listen, this:
$ tail -f FILE | logtop
is the friendly version of this whole situation:
$ watch 'tail FILE | sort | uniq -c | sort -gr'
same energy, way less typing, way more main character. no cap. π«Ά
π OPTIONS π
-s,--size=Kβ only keepKlines in memory, instead of the default 10000. memory said "i'm full" and we said "understood, queen." π-q,--quietβ do not display a live view of the data, only display a top at exit. shy girlie mode. π€«-l,--line-by-line=Kβ print the result line by line, in a machine friendly format, andKis the number of results to print per line. yes this is for when a script is the one reading, not your eyeballs. π€
the line by line format is: [%d %f %s\t]*\n
%d: Number of occurences%f: Frequency of apparition%s: String (Control chars replaced by dots.)
note the typo in "occurences" is load-bearing, i'm keeping it exactly as the manual says, don't come for me π
-i,--interval=Kβ interval between graphical updates, in seconds. Defaults to1. so it refreshes once a second unless you tell it otherwise. β°-h,--helpβ Show summary of options. your little safety net bestie. π-v,--versionβ Show version of program. flex the version number. π
π EXAMPLES π
Here are some logtop usage examples. grab a snack, this is the fun part. π
tail -f cache.log | grep -o "HIT\|MISS" | logtop
Realtime hit / miss ratio on some caching software log file. obsessed. β¨
tail -f access.log | cut -d' ' -f1 | logtop -s 10000
Realtime most querying IPs on your server, as long as log lines in access.log starts with the client IP. π₯
tail -f access.log | cut -d' ' -f7 | logtop -s 10000
Realtime most requested web pages in a NCSA like log file. the people have spoken and they want the same page over and over, iykyk. π
cat auth.log | grep -v "CRON" | grep -o ": .*" | logtop -q -s 100000
Display a one-shot simple analyse of your auth.log. no live view, just the receipts at the end. π
π¦ SEE ALSO π¦
go give it a lil visit, it's the ancestor of this whole thing. π«Ά
π AUTHOR π
logtop was written by Julien Palard. π
This manual page was written by Julien Palard <julien@palard.fr>, for the Debian project (and may be used by others). so generous, so iconic. πΈ
and that's the whole page bestie! this was version LOGTOP(1), dated April 16, 2011 β yes it's an elder but she's still serving π β¨ bye bye, go pipe something into it fr fr ππ
π¦ where this page comes from
- debian bookworm: logtop 0.4.3-1+b3 Β· FreeBSD License
- debian trixie: logtop 0.4.3-1+b3 Β· FreeBSD License
- ubuntu jammy: logtop 0.4.3-1build3 Β· FreeBSD License
- ubuntu noble: logtop 0.4.3-1build3 Β· FreeBSD License
- ubuntu resolute: logtop 0.7-1 Β· BSD-2-Clause
- ubuntu stonking: logtop 0.7-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms