home
/
code
/
khome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add alias gr='git remote -v'
[khome.git]
/
home
/
lib
/
login_functions.sh
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
a7bcf45
..
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"
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
| 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
}
by_proc[proc] += rss
}
@@
-667,7
+665,7
@@
status() {
echo "${indent_unit}<->"
echo "${indent_unit}<->"
- printf '%sTCP
:
' "${indent_unit}${indent_unit}"
+ printf '%sTCP
\t
' "${indent_unit}${indent_unit}"
sudo -n netstat -tnp \
| awk 'NR > 2 && $6 == "ESTABLISHED" {print $7}' \
| awk '{sub("^[0-9]+/", ""); print}' \
sudo -n netstat -tnp \
| awk 'NR > 2 && $6 == "ESTABLISHED" {print $7}' \
| awk '{sub("^[0-9]+/", ""); print}' \
This page took
0.043937 seconds
and
4
git commands to generate.