RE: [U2] AIX Socket Command?
Hi Kevin Netstat - a (overall) Netpmon for stats per process ? >From memory so may be wrong Brian > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King > Sent: 15 September 2008 16:20 > To: u2-users@listserver.u2ug.org > Subject: [U2] AIX Socket Command? > > I could find this given the time but time is not on my side right now. > Anyone recall the program on AIX that tells which program has > a particular socket open? > > -Kevin > http://www.PrecisOnline.com > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] AIX Socket Command?
lsof But this is not installed automatically as part of AIX's (Base Operating System). Prior to AIX 6.1, I believe this program is on the Toolbox for Linux DVD, at 6.1, I understand it moved to the AIX Expansion Pack DVD. You'll need the AIX DVDs and smitty install. Alternatively, this is an open source package - you can google it and download it. Amongst other place you should find a version here: http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ lsof | grep TCP | pg Cheers, Ken > Kevin King wrote: > I could find this given the time but time is not on my side right now. > Anyone recall the program on AIX that tells which program has a particular > socket open? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] AIX Socket Command?
Kevin: In order to view sockets use the netstat command. For example to see what ones are listening on a port for activity type: netstat -an | grep LISTEN If you need to map the socket to a process ID take a look at the IBM Technote "TCP/IP Utilities for Mapping Sockets to Process ID." This doc explains how to do it. It is available here: http://www-01.ibm.com/support/docview.wss?uid=isg3T1000491 -- Carl Dula Voice: 973-227-8440 X111 Pulsar Systems, Inc.Fax: 973-227-8440 271 Route 46 West, Suite H209 email:[EMAIL PROTECTED] Fairfield, NJ 07004-2474http://www.pulsarsystems.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] AIX Socket Command?
The way I would do it, is as follows: 1. login as root 2. run netstat -Aan | grep LISTEN you will see something similar to the following: # netstat -Aan | grep LISTEN f1f302506b58 tcp4 0 0 *.13 *.*LISTEN f1f302502358 tcp0 0 *.21 *.*LISTEN f1f3031a1b58 tcp4 0 0 *.22 *.*LISTEN f1f302503b58 tcp0 0 *.23 *.*LISTEN next run the below command on the port you want to know about) rmsock tcpcb below is an example (I know that port 22 is sshd but lets pretend that I did not) # rmsock f1f3031a1b58 tcpcb The socket 0x31a1800 is being held by proccess 250016 (sshd). # Now you may be worried that rmsock (remove socket) will terminate the socket but ti will not /*THE COMMAND WILL FAIL (I LEARNED THIS TRICK FROM AIX SUPPORT) */ BUT IT WILL RETURN WHAT PROCESS HAS THE SOCKET OPEN. In the above case sshd dougc now here you will need to know the Kevin King wrote: > I could find this given the time but time is not on my side right now. > Anyone recall the program on AIX that tells which program has a particular > socket open? > > -Kevin > http://www.PrecisOnline.com > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/