Why do you want a display in the IOC shell?
netstat -u -p
can do the job.
If you start IOCs with the same binary, you may need to know the process PID.
To prevent this, use hardlinks
$ ln clsXdev-3_14_1 ocbin-1
$ ln clsXdev-3_14_1 ocbin-2
[starts 3 IOCs with same binary]
$ netstat -u -p
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 cls1jin:35605 cls1jin:44647 ESTABLISHED 3543/caRepeater
udp 0 0 172.17.4.56:49833 cls1lan:ca-2 ESTABLISHED 11629/iocbin-1
udp 0 0 172.17.4.56:59837 cls1lan:ca-2 ESTABLISHED 3511/clsXdev-3_14_1
udp 0 0 172.17.4.56:49742 cls1lan:ca-2 ESTABLISHED 8751/iocbin-2
--
Emmanuel
From:
[email protected]To:
[email protected]Date: Wed, 29 Jan 2014 13:32:11 -0800
Subject: Command to print out dynamically assigned TCP port
Hello,
If I start up multiple IOC’s on the same linux server, the IOC’s that start up later use a dynamically assigned TCP port.
>>> cas warning: Configured TCP port was unavailable.
>>> cas warning: Using dynamically assigned TCP port 33470,
Just curious, is there an EPICS IOC shell command that prints out/displays this port?
Regards,
Murali