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:
29e5f1b
)
Simplify proc name grabbing
author
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 6 Oct 2021 21:35:38 +0000
(17:35 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 6 Oct 2021 21:35:38 +0000
(17:35 -0400)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
894ec7f
..
59989af
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-536,13
+536,11
@@
status() {
echo
printf '%smem by proc\n' "$indent_unit"
- ps -eo rss,c
md
\
+ ps -eo rss,c
omm
\
| awk -v total="$(free | awk '$1 == "Mem:" {print $2; exit}')" '
NR > 1 {
rss = $1
- cmd = $2
- n = split(cmd, path, "/") # _may_ be a path
- proc = path[n]
+ proc = $2
by_proc[proc] += rss
}
This page took
0.027178 seconds
and
4
git commands to generate.