Which port is used

Hi,
On AIX, when running :

ps -ef | grep inherit
 oracle  8061180        1   0   Oct 13      - 15:06 /product/oracle/distrib/ora112039/db/bin/tnslsnr mydb-inheritj

How can I find which port is used by this process?

Thanks.

try this -

sudo ss -ntlp  | grep 8061180

4th column will let you know the port.

Thank you. It asks me root password that I do not have.

Regards.

Does ss exist on AIX?
Googling this I get

To list the details of a process ID the following is shorter: ps -fp process_id

Hi,
Thanks.

ps -fp 8061180
     UID      PID     PPID   C    STIME    TTY  TIME CMD
  oracle  8061180        1   0   Oct 13      - 15:20 /u1/product/oracle/distrib/ora112039/db/bin/tnslsnr mydb -inherit

Does not show port in use.

Did you run the

netstat -Aan

?
It shows all the ports that are in use.
For each control block in column #1 you must map the PID with the rmsock command.
When it matches the PID (that you already have) then it corresponds to the control block that corresponds to the netstat -Aan line that provides the port number.

Thanks.
Sorry cannot understand. Can you please give an exemple?
regards.

I cannot explain details, it is some years ago where I had access to an AIX system.
Did you run the netstat command? Does the following yield something?

netstat -Aan | grep LISTEN

Yes:

$ netstat -Aan | grep LISTEN
f1000e00143a2bb8 tcp6       0      0  *.22                  *.*                   LISTEN
f1000e00149f9bb8 tcp4       0      0  *.22                  *.*                   LISTEN
f1000e00040293b8 tcp        0      0  *.24537               *.*                   LISTEN
f1000e0003fba3b8 tcp        0      0  *.111                 *.*                   LISTEN

please start using markdown tags when posting code/data samples - I've edited your last post (for now).
Does this (Googled) link help?
(I see I could use Google as well as @MadeInGermany - that's encouraging)

Thanks. I don't understand what you mean by " please start using ...".
I will take a look at that link.
Regards.