This generates output that looks like this: mymachine 63851 the-process ps -Ao user,pid,command | grep -v grep | grep We can now use the process status command ps to display the process name for the process ID (PID). This command will also print out the port number, which is 9999 in the above output example. In the output above the PID (process ID) is the ninth value (the fourth value from the end), in this example output the process ID (PID) is “63851”. In a terminal type the following and replace the “” with our port number. Using the nestat command we can find the process ID (PID) for a specific port. In the output above the PID (process ID) is the second value, in this example output the process ID (PID) is “63851”. This generates output that looks like this: node 63851 pogo 27u IPv6 0xfded4774db1c601f 0t0 TCP *:9999 (LISTEN) Using the lsof command we can find the process ID (PID) for a specific port that is in a LISTEN state. There are two different ways we can use to find the process that is listening to a port on Mac OS X. To find the process that is listening to a port on Mac OS X, we’ll use the lsof command to find the process ID (PID), and the ps command to show the name. How to Find the Process Listening to Port on Mac OS X
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |