Limit loggers report to top 5
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 2 Nov 2020 11:49:08 +0000 (06:49 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 2 Nov 2020 11:49:08 +0000 (06:49 -0500)
home/lib/login_functions.sh

index 6b01d49..8057711 100644 (file)
@@ -569,7 +569,7 @@ motd() {
 
     echo
 
-    echo 'Loggers'
+    echo 'Loggers (top 5)'
     awk '
         {
             split($5, prog, "[")
@@ -589,6 +589,7 @@ motd() {
                 print count[prog], total, prog
         }' \
     | sort -n -k 1 -r \
+    | head -5 \
     | bar_gauge -v width=30 -v num=1 -v ch_left=' ' -v ch_right=' ' -v ch_blank=' ' \
     | column -t \
     | indent "${indent_unit}"
This page took 0.022685 seconds and 4 git commands to generate.