Wednesday, 3 January 2018

How to get port number of a process by pid in Unix


Get the pid by ps -ef | grep <processName>

Get the port in which this process is listening by below command.

netstat -lanpt | grep LISTEN | grep <pid>

No comments:

Post a Comment

Thank You for your valuable comment

Difference between class level and object locking and static object lock

1) Class level locking will lock entire class, so no other thread can access any of other synchronized blocks. 2) Object locking will lo...