home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f865d28
)
Add process owners report to motd
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 2 Nov 2020 11:45:11 +0000
(06:45 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 2 Nov 2020 11:45:11 +0000
(06:45 -0500)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
7635e5d
..
6b01d49
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-549,6
+549,26
@@
motd() {
echo
+ echo 'Process owners'
+ ps -eo user \
+ | awk '
+ NR > 1 {
+ count_by_user[$1]++
+ total++
+ }
+
+ END {
+ for (user in count_by_user)
+ print count_by_user[user], total, user
+ }
+ ' \
+ | sort -n -k 1 -r \
+ | bar_gauge -v num=1 -v ch_left=' ' -v ch_right=' ' -v ch_blank=' ' \
+ | column -t \
+ | indent "${indent_unit}"
+
+ echo
+
echo 'Loggers'
awk '
{
This page took
0.03054 seconds
and
4
git commands to generate.