netstat command unrecognised by build v24-sp2 (08/07/10) std

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
ddwrtusr
DD-WRT Novice


Joined: 18 May 2009
Posts: 7

PostPosted: Tue Mar 15, 2011 19:40    Post subject: netstat command unrecognised by build v24-sp2 (08/07/10) std Reply with quote
I was happy to find that there is a way to determine the established connections. I was following the below link:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=10210
under the contributions upload. (My thanks to CYBERDE for the script!)
The script uses the netstat command to count the number of connections established (which is the master condition of the script).
Below is an excerpt of the script that does this:
CONNECTIONS=`netstat -n | grep $WANIP:$PORT | grep ESTABLISHED | wc -l`
The command netstat is not working. I tried to issue the netstat command separately in a new telnet session. Below is the message that I get:
-sh: netstat: not found
I am using a DIR-300, DD-WRT v24-sp2 (08/07/10) std - build 14896

Any advise or suggestions to Workaround this? Thanks in Advance!
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Wed Mar 16, 2011 7:19    Post subject: Reply with quote
no netstat on this router.
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
ddwrtusr
DD-WRT Novice


Joined: 18 May 2009
Posts: 7

PostPosted: Wed Mar 16, 2011 10:24    Post subject: Reply with quote
ok, I found that there is a special edition of DD-WRT available for this router (DIR-300). Will this special edition be of any help to execute the netstat... Thanks in Advance!
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Wed Mar 16, 2011 16:46    Post subject: Reply with quote
See the wiki scripting pages for info about how to count connections from the conntrack file instead of using netstat.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum