Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Netstat broken

Whenever I try to use netstat in Terminal it doesn't print out what it's suppose to print out. Here's what I get when I type netstat;

routing:

0 bad routing redirects

0 dynamically created routes

0 new gateways due to redirects

4294957722 destinations found unreachable

0 uses of a wildcard route

2 routes not in table but not freed




and if I type whereis netstat in Terminal it shows me it's in /usr/sbin/ then when I try typing /usr/sbin/netstat in Terminal it shows me all the routing tables as normal as it should when it's run like so;



Active Internet connections

Proto Recv-Q Send-Q Local Address Foreign Address (state)

tcp4 0 0 <local_addr> <addr> ESTABLISHED

tcp4 0 0 <local_addr> <addr> ESTABLISHED

tcp4 0 0 <local_addr> <addr> ESTABLISHED


(I've edited out addresses for the purpose of this example to show what I should be getting)


It's really frustrating why it's not executing the one in /usr/sbin/, I've no idea where it's trying to run the other netstat since it won't tell me, and it only displays 1 when I enter whereis command. I've tried making an alias under my .Profile file but it's got no effect what-so-ever. It's like the link to the file is broken or something. I've tried running Permission Fixes via DiskUtility but that doesn't fix it, I've also tried installing the gnome-netstat from MacPorts and that doesn't work either, I have tried restoring previous state of the system, but still no change either.


IS there a way to fix this and get it working as normal? Because I have no idea how to fix a broken link to a file since I don't know where it's trying to run the other netstat from. I also run OSSEC-HIDS which does report checks and it doesn't tell me anything unusual, however it does sometimes report that the current netstat could be trojaned version of netstat, but I've already confirmed that it's a false-positive detection as there's been no changes to the hash sum if it were changed as I have ran multiple tests to confirm it, and even looked up some help from the OSSEC-HIDS support forums. –– I am NOT looking to reinstall the system unless it's really necessary, I would like to just find a simple fix to this little bug problem.


I just hope there's no some stupid obvious fix that I missed.

iMac (20-inch Late 2009)-OTHER, Mac OS X (10.7.5), Intel Core 2 Duo @2.66GHz, 8GB RAM

Posted on Dec 5, 2012 12:44 AM

Reply
3 replies

Netstat broken

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.