LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   netstat -nap acting weird (https://www.linuxquestions.org/questions/linux-networking-3/netstat-nap-acting-weird-207671/)

Donboy 07-20-2004 10:16 PM

netstat -nap acting weird
 
I use netstat a lot. Sometimes I have noticed when I run...

netstat -nap | grep ESTAB

it doesn't show the program name at the very end of each line. Like normally I see httpd or qmail-remote or some other command name that is involved with the established connection. Lately it's been just showing a single dash.

Any idea what that's about? Machine in question is running FC1.

I tried restarting those processes, but it doesn't help. Haven't tried rebooting the system yet because I'm waiting on my traffic to die down a little before I put-off a bunch of people. But I'm pretty sure a reboot will fix it, as I seem to recall that working for me in the past.

Any idea what causes that? Maybe another forum or mailing list where I can ask? Is there a mailing list for the maintainers of netstat?

ppuru 07-20-2004 10:56 PM

Perhaps you are not running netstat as root.

Donboy 07-20-2004 11:08 PM

No, I'm usually always running as root.

Just to be sure, I logged completely out and logged back in as root and it's still doing it.

Donboy 09-01-2004 12:17 AM

More on this problem.... I thought this was never going to happen again, but I just noticed something.... It started happening again right when the month rolled over. Now all my programs are listed as dashes. It was working fine a couple of hours ago, but now the first of the month has just rolled over on the clock and it's doing it again.

Any ideas why? I looked at my cron stuff, but none of them were set to go off at midnight. Maybe it has something to do with the clock somehow.

ppuru 09-01-2004 10:48 PM

Here is a snapshot from my netstat -nap listing , as non-root and as root.
Code:


as nonroot
<snip>
udp        0      0 0.0.0.0:631            0.0.0.0:*                          -                 
<snip>
unix  3      [ ]        STREAM    CONNECTED    167004 -                 
unix  5      [ ]        STREAM    CONNECTED    167010 -                  /tmp/.X11-unix/X0
unix  3      [ ]        STREAM    CONNECTED    166983 -                 
<snip>
unix  2      [ ]        DGRAM                    3593  -                 
<snip>

as root
<snip>
tcp        0      0 10.x.11.xx:35026    10.x.0.x:389        ESTABLISHED 2227/evolution-womb
udp        0      0 0.0.0.0:631            0.0.0.0:*                          24472/cupsd       
<snip>
unix  2      [ ]        DGRAM                    3593  1507/xinetd

as a non-root user, all details are not shown.

Donboy 09-01-2004 11:16 PM

Right. But I'm always running as root. Always. I never use su or sudo or anything. I authenticate using RSA private keys under SSH2.

What I actually am doing is using the following command...

watch 'netstat -nap | grep EST'

Which displays a continuous feed of netstat output that I can use to watch connections come and go. Right after midnight... poof.... it looks like this...

Code:

Every 2s: netstat -nap | grep EST | egrep -v "sshd|smbd|:22"                    Wed Sep  1 23:14:29 2004

tcp        0      0 66.92.204.251:80        142.59.120.43:3046      ESTABLISHED -
tcp        0      0 66.92.204.251:80        142.59.120.43:3047      ESTABLISHED -
tcp        0      0 66.92.204.251:80        24.55.108.78:1873      ESTABLISHED -
tcp        0      0 66.92.204.251:80        24.55.108.78:1875      ESTABLISHED -



All times are GMT -5. The time now is 12:41 PM.