Help with netstat traffic server command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with netstat traffic server command
# 1  
Old 07-10-2014
Display Help with netstat traffic server command

Help required for creating a unix shell script using netstat command for retrieving total traffic in Kbytes with the source and destination address.
# 2  
Old 07-11-2014
What have you tried
# 3  
Old 07-11-2014
netstat 2000 >monitor.txt

awk 'BEGIN { print "Type\t\tSource Site\t\tDestination Site\t\tTotal Traffic Size\t\tCycle\t\tRate\n--------------------"; }
{print $1,"\t\t",$4,"\t\t",$5,"\t\t",%5.2f,"\t\t",2000,"\t\t",%5.2f(($2+$3)/1024)/$2000\n ;}
END{print "completed" ;}' >
# 4  
Old 07-11-2014
What's the issue / error you face with the above command
# 5  
Old 07-11-2014
No not faced error but not sure whether the $2 and $3 are the correct value for the value expected. $2 is rec-q and $3 is send-q.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Filtering netstat command output

Hi All, I am trying to collect the listen ports info from netstat command in centos 7 From that info i am trying to collect all the foreign address IP for those ports. I am using below script to do the same. netstat -an |grep -w "LISTEN" |grep -v "127.0.0.1" |awk '{print $4}' >... (3 Replies)
Discussion started by: sravani25
3 Replies

2. UNIX for Dummies Questions & Answers

Need help with a netstat command

Do I have this command correct to show all current connections/sessions my Solaris box has? It does not seem to do anything. netstat -an | grep EST (6 Replies)
Discussion started by: SIFT3R
6 Replies

3. UNIX for Advanced & Expert Users

Amount of Network Traffic info from netstat output

Hi, I'm trying to figure out how much traffic has been generated and received from netstat -s output (using Linux). I can see the output shows packet counts and Octet values, how would I correctly calculate how much traffic in and how much out? My output below: Ip: 88847576 total... (1 Reply)
Discussion started by: wilsonee
1 Replies

4. Shell Programming and Scripting

netstat command

Hi, In my project we use sftp with batch mode (password less) script in parallel for 14 sessions which connects to 2 different servers alternatively i.e. 7 connects to one server say server1 and the other 7 connects to say server 2. Now the problem is that these 14 sessions are run in... (5 Replies)
Discussion started by: dips_ag
5 Replies

5. UNIX and Linux Applications

Copy mail traffic to several server for a domain

Hello, everybody! I have a MX server (sendmail) and old pop3 server, I installed a zimbra server and I want to receive mail traffic to several mail server (old and Zimbra). How I do it on Postfix(Zimbra if will be a MX for my domain) or Sendmail? (0 Replies)
Discussion started by: Rezonans
0 Replies

6. Solaris

nestat on server involved in high traffic network

Hi All My Server is doing a very intense netowrk traffic operations and the cards are under very high pressure. I need to call NETSTAT on the shell. Do you know whether this command, under high pressure, might have some impact on the server traffic or can I proceed without any problem? (2 Replies)
Discussion started by: manustone
2 Replies

7. UNIX for Dummies Questions & Answers

Netstat command query

hy guys, I did netstat and it is listening, what can i do from the client side that to see if the port is open? Regards Charneet (1 Reply)
Discussion started by: charneet
1 Replies

8. UNIX for Advanced & Expert Users

Netstat command

Hi.., Now, I am reading about the netstat command and its implementation. I have doubts in some options and its functionalities, natstat - M (Which is described as display masqueraded connections), what it means? What is Forwarding Information Base.?(--fib) Thanks in advance,... (3 Replies)
Discussion started by: nagalenoj
3 Replies

9. UNIX for Dummies Questions & Answers

LAN traffic rerouting to web server

Hello. I am not sure where to post this and would appreciate any moderator help in moving this to the area where it is most applicable. Thank you. I've posted these questions in a couple different forums, but have not received any answers about what I am doing wrong. I would appreciate any... (3 Replies)
Discussion started by: J-Fal
3 Replies

10. UNIX for Dummies Questions & Answers

netstat command between clustered hosts

I have 2 clustered hosts, is it possible for me to issue a netstat command against 1 host from the other ? (4 Replies)
Discussion started by: murphyboy
4 Replies
Login or Register to Ask a Question