10-25-2005
Which application has a TCP socket open
If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ?
10 More Discussions You Might Find Interesting
1. Programming
Hello there chaps.
First of all, i'm no TCP/IP-wiz, so forgive me if this is a stupid question.
I've been messing around with filetransfer using sockets, and there is one thing that confuses me.
This is how it's set up:
A server app listens on a port for a client connection.
When it... (3 Replies)
Discussion started by: crippe
3 Replies
2. AIX
I have what appears to be a unique socket problem, although admittedly my tcp/ip programming experience is relatively limited.
I have a AIX server process using TCP/IP berkely sockets, and a Windows (C#) process. The windows process takes input from a user and sends a message to the Unix... (1 Reply)
Discussion started by: adiaconou
1 Replies
3. Programming
Hi all,
I'm writing a socket program which sends a structure from one machine to another. When I run my client first time it runs well, however after the first time I couldn't receive all the data inside the structure (it is like, half of the array is received and the other half is not set). I... (1 Reply)
Discussion started by: SaTYR
1 Replies
4. IP Networking
Hi. I ran nmap on my server, and I get the following:
Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT
Interesting ports on -------- (-----):
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
6881/tcp open bittorrent-tracker
The... (0 Replies)
Discussion started by: Rledley
0 Replies
5. Programming
Hello,
I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies
6. IP Networking
Hello,
Our software is using a TCP socket (AF_INET, SOCK_STREAM) to communicate with an Ethernet device. When we send a message, the message object writes itself in full onto the socket's stream buffer before the software invokes send() from socket.h.
I'm still researching, but have 2... (1 Reply)
Discussion started by: bix_20002000
1 Replies
7. Shell Programming and Scripting
Hello all,
I have a requirement to read and write to a tcp socket from an HP-UX shell script. I see a /dev/tcp character device on my servers:
crw-rw-rw- 1 root root 72 0x00004f Mar 28 18:37 /dev/tcp
So I believe this is what I should use. The problem is that all the... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies
8. Solaris
I installed a fresh copy of Solaris 7 and present up my ip and domain for my web services but when I try to connect to it I get the following error;
TCPActiveOpen: connect failed tcp/192.168.1.148/7900: 146 (Connection refused).
the port is open in my router but I don't no were to add it in... (5 Replies)
Discussion started by: Wpgn
5 Replies
9. Solaris
I been looking for a good guide or some help on how to install and setup TCP-MUX protocol socket on my Solaris 7 servers.
Can anyone point me in right direction of help me ?
Thanks (5 Replies)
Discussion started by: Wpgn
5 Replies
10. AIX
Hi
The clients connect to my server -using port 9130. But no client could connect to my server at this time. I've checked already and this is the result
netstat -Aan|grep -v 127.0.0.1|grep 9130|pg
f10006000abcb398 tcp4 10313 0 10.0.89.81.9130 10.158.70.24.1705 CLOSE_WAIT... (8 Replies)
Discussion started by: bobochacha29
8 Replies
FSTAT(8) System Manager's Manual FSTAT(8)
NAME
fstat - file status
SYNOPSIS
fstat [ -u user ] [ -p pid ] [ filename... ]
DESCRIPTION
Fstat identifies open files. A file is considered open if a process has it open, if it is the working directory for a process, or if it is
an active pure text file. If no options are specified, fstat reports on all open files.
Options:
-u Report all files open by a specified user.
-p Report all files open by a specified process id.
filename...
Restrict reports to the specified files. If the file is a block special file, fstat additionally reports on any open files on that
device, treating it as a mounted file system.
The following fields are printed
USER The username of the owner of the process.
CMD The command name of the process.
PID The process id.
FD The file number in the per-process open file table. The special names "text" and "wd" mean that the file is the pure text inode or
the working directory for the process. If the file number is followed by an asterick (*), then the file is not an inode, but either
a socket, fifo, or has an error of some kind. In this case the rest of the entry is variable format, doesn't correspond to the rest
of the headings, and is enclosed in parenthesis. The following paragraph describing sockets will explain the variable format.
DEVICE
Major minor number of the device this file exists on.
INODE The inode number of the file.
SIZE The size in bytes of the file.
TYPE The type of the file. (see sys/file.h)
Sockets The formating of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field is
the socket type (stream, dgram, etc), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. For
tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). For unix domain sockets, its the address of the socket pcb and
the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. The idea is
not to duplicate netstat, but to make available enough information for further analysis. For example, the addresses mentioned above are
the addresses which the "netstat -A" command would print for tcp, udp, and unixdomain. Note that since pipe(2) is implemented with sock-
ets, a pipe appears as a connected unix domain stream socket. A unidirectional unix domain socket indicates the direction of flow with an
arrow ("<-" or "->"), and a full duplex socket shows a double arrow ("<->").
BUGS
Socket information clutters the output.
Since fstat takes a snapshot of the system, it is only correct for a very short period of time.
SEE ALSO
ps(1), pstat(8)
4th Berkeley Distribution December 12, 1987 FSTAT(8)