Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Filtering netstat command output Post 303042069 by Chubler_XL on Thursday 12th of December 2019 04:49:02 PM
Old 12-12-2019
This should be close to what you were doing.

Code:
netstat -an | awk '
/LISTEN/ && ! /127.0.0.1/ {
   gsub("::", "ALL", $0)
   if ($4 ~ ":") { RECV[$2] }
}
/ESTABLISHED/ && ($2 in RECV) {
   gsub(/:.*/,"",$5)
   if (!($5 in FOUND)) {
      print $5
      FOUND[$5]
   }
}'

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

output of NETSTAT

# netstat -in Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll net1 1500 192.168 192.168.0.11 24508 0 12212 112931 2795 lo0 8232 127 127.0.0.1 42 0 42 0 0 atl0* 8232 none none No Statistics... (1 Reply)
Discussion started by: samprax
1 Replies

2. Shell Programming and Scripting

filtering a range of ports out of a netstat output

i'd like to grep a range of ports on a netstat -nt output, localaddress, say :1 to :1023. how do i do it via sed/awk/grep? Thanks, Marc (1 Reply)
Discussion started by: marcpascual
1 Replies

3. Solaris

netstat -an -- meaning of the output

Dear Experts, I put below command- could you please describe the outputs column- let me describe some them- col_1: (10.131.60.48.55880) The IP address of the local computer and the port number being used for this particular connection appear in the Local Address column. col_2:... (3 Replies)
Discussion started by: thepurple
3 Replies

4. HP-UX

Difference in netstat -a and -an output.

Hi, Does anyone know why I get a different output when using "netstat -a" or "netstat -an" ?? # netstat -a | grep ts15r135 tcp 0 0 nbsol152.62736 ts15r135.23211 ESTABLISHED # netstat -an | grep 172.23.160.78 tcp 0 0 135.246.39.152.51954 ... (4 Replies)
Discussion started by: ejdv
4 Replies

5. UNIX for Dummies Questions & Answers

interpreting netstat output

hi all, when I run- wcars1j5#netstat -an | grep 8090 127.0.0.1.8090 *.* 0 0 49152 0 LISTEN wcars1j5# 1. does this mean that no one is connected to this port? Regards, akash (1 Reply)
Discussion started by: akash_mahakode
1 Replies

6. IP Networking

netstat output

I can't tell what the output of the netstat command means. Is there anywhere that has this information? I tried the man pages, but they weren't helpful. (3 Replies)
Discussion started by: Ultrix
3 Replies

7. IP Networking

Connections not shown in netstat output

I have a TCPIP server application (a Vendor package) which by default allows 10 connections. It provides a parameter to allow us to increase the maximum allowable connections in case it is needed. Intermittently this application is failing with maximum number of connections reached even when there... (1 Reply)
Discussion started by: AIX_user
1 Replies

8. 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

9. UNIX for Dummies Questions & Answers

netstat -an output, pls. explain..

Hi, I have old SCO O/S. System keeps crashing. I made lot of changes to kernel but so for nothing helped. I wrote a script which takes netstat -an output every one minute. I saw some thing right before the system crashed. Not sure if this means anything.. uname -a SCO_SV djx2 3.2... (2 Replies)
Discussion started by: samnyc
2 Replies

10. Shell Programming and Scripting

netstat output

Hi Team, Below is the output of netstat -an | grep 1533 tcp 0 0 17.18.18.12:583 10.3.2.0:1533 ESTABLISHED tcp 0 0 17.18.18.12:370 10.3.2.0:1533 ESTABLISHED Below is the o/p of netstat -a | grep server_name tcp 0 ... (4 Replies)
Discussion started by: Girish19
4 Replies
RECV(3PVM)							  PVM Version 3.4							RECV(3PVM)

NAME
pvm_recv - Receive a message. SYNOPSIS
C int bufid = pvm_recv( int tid, int msgtag ) Fortran call pvmfrecv( tid, msgtag, bufid ) PARAMETERS
tid Integer task identifier of sending process supplied by the user. msgtag Integer message tag supplied by the user. msgtag should be >= 0. bufid Integer returns the value of the new active receive buffer identifier. Values less than zero indicate an error. DESCRIPTION
The routine pvm_recv blocks the process until a message with label msgtag has arrived from tid. pvm_recv then places the message in a new active receive buffer, which also clears the current receive buffer. A -1 in msgtag or tid matches anything. This allows the user the following options. If tid = -1 and msgtag is defined by the user, then pvm_recv will accept a message from any process which has a matching msgtag. If msgtag = -1 and tid is defined by the user, then pvm_recv will accept any message that is sent from process tid. If tid = -1 and msgtag = -1, then pvm_recv will accept any message from any process. The PVM model guarantees the following about message order. If task 1 sends message A to task 2, then task 1 sends message B to task 2, message A will arrive at task 2 before message B. Moreover, if both messages arrive before task 2 does a receive, then a wildcard receive will always return message A. If pvm_recv is successful, bufid will be the value of the new active receive buffer identifier. If some error occurs then bufid will be < 0. pvm_recv is blocking which means the routine waits until a message matching the user specified tid and msgtag values arrives at the local pvmd. If the message has already arrived then pvm_recv returns immediately with the message. Once pvm_recv returns, the data in the message can be unpacked into the user's memory using the unpack routines. EXAMPLES
C: tid = pvm_parent(); msgtag = 4 ; bufid = pvm_recv( tid, msgtag ); info = pvm_upkint( tid_array, 10, 1 ); info = pvm_upkint( problem_size, 1, 1 ); info = pvm_upkfloat( input_array, 100, 1 ); Fortran: CALL PVMFRECV( -1, 4, BUFID ) CALL PVMFUNPACK( INTEGER4, TIDS, 25, 1, INFO ) CALL PVMFUNPACK( REAL8, MATRIX, 100, 100, INFO ) ERRORS
These error conditions can be returned by pvm_recv PvmBadParam giving an invalid tid value, or msgtag < -1. PvmSysErr pvmd not responding. SEE ALSO
pvm_bufinfo(3PVM), pvm_getminfo(3PVM), pvm_nrecv(3PVM), pvm_unpack(3PVM), pvm_probe(3PVM), pvm_send(3PVM), pvm_mcast(3PVM) 30 August, 1993 RECV(3PVM)
All times are GMT -4. The time now is 01:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy