How i can find which process running in a specific socket(IP:Port)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I need to find out process ID of a process which is running in a specific IP:Port



I have option to filter process using specific Port, but as my server having multiple IPs, so, And several process running with same port but with different IP. so, i need to find out the process which running with specific IP & Port.
Looking for hearing from you guys.







share|improve this question
















  • 2




    Which OS is this?
    – muru
    Feb 17 at 6:16










  • @muru OS is: RHEL or CentOS
    – Farhan Habib
    Feb 17 at 6:57










  • Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
    – Ulrich Schwarz
    Feb 17 at 6:58










  • lsof -t -n is another options for a manual list.
    – Jasen
    Feb 17 at 9:26















up vote
0
down vote

favorite












I need to find out process ID of a process which is running in a specific IP:Port



I have option to filter process using specific Port, but as my server having multiple IPs, so, And several process running with same port but with different IP. so, i need to find out the process which running with specific IP & Port.
Looking for hearing from you guys.







share|improve this question
















  • 2




    Which OS is this?
    – muru
    Feb 17 at 6:16










  • @muru OS is: RHEL or CentOS
    – Farhan Habib
    Feb 17 at 6:57










  • Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
    – Ulrich Schwarz
    Feb 17 at 6:58










  • lsof -t -n is another options for a manual list.
    – Jasen
    Feb 17 at 9:26













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to find out process ID of a process which is running in a specific IP:Port



I have option to filter process using specific Port, but as my server having multiple IPs, so, And several process running with same port but with different IP. so, i need to find out the process which running with specific IP & Port.
Looking for hearing from you guys.







share|improve this question












I need to find out process ID of a process which is running in a specific IP:Port



I have option to filter process using specific Port, but as my server having multiple IPs, so, And several process running with same port but with different IP. so, i need to find out the process which running with specific IP & Port.
Looking for hearing from you guys.









share|improve this question











share|improve this question




share|improve this question










asked Feb 17 at 5:53









Farhan Habib

1




1







  • 2




    Which OS is this?
    – muru
    Feb 17 at 6:16










  • @muru OS is: RHEL or CentOS
    – Farhan Habib
    Feb 17 at 6:57










  • Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
    – Ulrich Schwarz
    Feb 17 at 6:58










  • lsof -t -n is another options for a manual list.
    – Jasen
    Feb 17 at 9:26













  • 2




    Which OS is this?
    – muru
    Feb 17 at 6:16










  • @muru OS is: RHEL or CentOS
    – Farhan Habib
    Feb 17 at 6:57










  • Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
    – Ulrich Schwarz
    Feb 17 at 6:58










  • lsof -t -n is another options for a manual list.
    – Jasen
    Feb 17 at 9:26








2




2




Which OS is this?
– muru
Feb 17 at 6:16




Which OS is this?
– muru
Feb 17 at 6:16












@muru OS is: RHEL or CentOS
– Farhan Habib
Feb 17 at 6:57




@muru OS is: RHEL or CentOS
– Farhan Habib
Feb 17 at 6:57












Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
– Ulrich Schwarz
Feb 17 at 6:58




Is manual inspection good enough? I usually just look at the output of netstat -tulpn but that can probably also filter since yyou already know the IP and port.
– Ulrich Schwarz
Feb 17 at 6:58












lsof -t -n is another options for a manual list.
– Jasen
Feb 17 at 9:26





lsof -t -n is another options for a manual list.
– Jasen
Feb 17 at 9:26











1 Answer
1






active

oldest

votes

















up vote
0
down vote













Will this be enough?



Say I am looking for a process listening on port 21 and IP of 192.168.168.2:



#ss -l -p '( sport = :21 )' src 192.168.168.2

Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 32 192.168.168.2:ftp *:* users:(("vsftpd",**pid=1444**,fd=3))e


Here -l looks for the Listening ports, -p forces to show PID.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f424728%2fhow-i-can-find-which-process-running-in-a-specific-socketipport%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Will this be enough?



    Say I am looking for a process listening on port 21 and IP of 192.168.168.2:



    #ss -l -p '( sport = :21 )' src 192.168.168.2

    Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
    tcp LISTEN 0 32 192.168.168.2:ftp *:* users:(("vsftpd",**pid=1444**,fd=3))e


    Here -l looks for the Listening ports, -p forces to show PID.






    share|improve this answer


























      up vote
      0
      down vote













      Will this be enough?



      Say I am looking for a process listening on port 21 and IP of 192.168.168.2:



      #ss -l -p '( sport = :21 )' src 192.168.168.2

      Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
      tcp LISTEN 0 32 192.168.168.2:ftp *:* users:(("vsftpd",**pid=1444**,fd=3))e


      Here -l looks for the Listening ports, -p forces to show PID.






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        Will this be enough?



        Say I am looking for a process listening on port 21 and IP of 192.168.168.2:



        #ss -l -p '( sport = :21 )' src 192.168.168.2

        Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
        tcp LISTEN 0 32 192.168.168.2:ftp *:* users:(("vsftpd",**pid=1444**,fd=3))e


        Here -l looks for the Listening ports, -p forces to show PID.






        share|improve this answer














        Will this be enough?



        Say I am looking for a process listening on port 21 and IP of 192.168.168.2:



        #ss -l -p '( sport = :21 )' src 192.168.168.2

        Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
        tcp LISTEN 0 32 192.168.168.2:ftp *:* users:(("vsftpd",**pid=1444**,fd=3))e


        Here -l looks for the Listening ports, -p forces to show PID.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 17 at 10:18









        Pierre.Vriens

        94241015




        94241015










        answered Feb 17 at 9:07









        Yuri

        11




        11






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f424728%2fhow-i-can-find-which-process-running-in-a-specific-socketipport%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay