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:
216c3eb
)
Note on how to work-around netstat output truncation
author
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 5 Apr 2023 19:11:06 +0000
(15:11 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 5 Apr 2023 19:11:06 +0000
(15:11 -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
e51a2fa
..
cbd8236
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-826,6
+826,9
@@
status() {
echo "${indent_unit}-->"
+ # TODO Populate pid->cmd dict from `ps -eo pid,comm` and lookup progs there
+ # since netstat -p output comes out truncated.
+
sudo -n netstat -tulnp \
| awk -v indent="${indent_unit}${indent_unit}" '
NR > 2 && ((/^tcp/ && proc = $7) || (/^udp/ && proc = $6)) {
This page took
0.025344 seconds
and
4
git commands to generate.