X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Flib%2Flogin_functions.sh;fp=home%2Flib%2Flogin_functions.sh;h=cbd8236a5ed46589ed29b9fe63b38bf885c0dab7;hb=a76a676bc46f68400348e64a549f01a79eac7292;hp=e51a2fad3b403c8b259df63608735ab3c89a2a58;hpb=216c3ebdd0a79766710cd35915c95e7f05d2129d;p=khome.git diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index e51a2fa..cbd8236 100644 --- 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)) {