Unix socket communication how to see the relationship of the nodes











up vote
1
down vote

favorite












In Linux, I could use ss or netstat -anp command to see TCP and Unix communication. In TCP communication, I could see localIP, Local port, Peer IP and Peer port. What's more, I could see PID and program name. But when I see netstat -anp with Unix part, I could not identify the peer IP. I know Unix does not use port. But it shall shows Peer IP in some linux commands.



[k8s@k8s config]$ netstat -anp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:10251 0.0.0.0:* LISTEN -
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 100174318 - @/containerd-shim/moby/ebde2be0a20ea82431e38a9af5222540ad86a3049a7896646273783e8e5616dd/shim.sock
unix 2 [ ACC ] STREAM LISTENING 95532948 - @/containerd-shim/moby/d02dca7b9146fb4cbca3eb26f0a666b5999922c7803d81b28281d9604bb32249/shim.sock


The linux command netstat -anp's output is shown above. With Unix part, I could not identify Peer IP. Could some expert give me some guidance to list Peer IP. I am doing network service topology diagram for this purpose.










share|improve this question













migrated from askubuntu.com Nov 29 at 1:38


This question came from our site for Ubuntu users and developers.











  • 2




    Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
    – PerlDuck
    Nov 28 at 9:15










  • What operating system are you using?
    – terdon
    Nov 28 at 9:34










  • @terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
    – user84592
    Nov 29 at 1:23















up vote
1
down vote

favorite












In Linux, I could use ss or netstat -anp command to see TCP and Unix communication. In TCP communication, I could see localIP, Local port, Peer IP and Peer port. What's more, I could see PID and program name. But when I see netstat -anp with Unix part, I could not identify the peer IP. I know Unix does not use port. But it shall shows Peer IP in some linux commands.



[k8s@k8s config]$ netstat -anp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:10251 0.0.0.0:* LISTEN -
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 100174318 - @/containerd-shim/moby/ebde2be0a20ea82431e38a9af5222540ad86a3049a7896646273783e8e5616dd/shim.sock
unix 2 [ ACC ] STREAM LISTENING 95532948 - @/containerd-shim/moby/d02dca7b9146fb4cbca3eb26f0a666b5999922c7803d81b28281d9604bb32249/shim.sock


The linux command netstat -anp's output is shown above. With Unix part, I could not identify Peer IP. Could some expert give me some guidance to list Peer IP. I am doing network service topology diagram for this purpose.










share|improve this question













migrated from askubuntu.com Nov 29 at 1:38


This question came from our site for Ubuntu users and developers.











  • 2




    Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
    – PerlDuck
    Nov 28 at 9:15










  • What operating system are you using?
    – terdon
    Nov 28 at 9:34










  • @terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
    – user84592
    Nov 29 at 1:23













up vote
1
down vote

favorite









up vote
1
down vote

favorite











In Linux, I could use ss or netstat -anp command to see TCP and Unix communication. In TCP communication, I could see localIP, Local port, Peer IP and Peer port. What's more, I could see PID and program name. But when I see netstat -anp with Unix part, I could not identify the peer IP. I know Unix does not use port. But it shall shows Peer IP in some linux commands.



[k8s@k8s config]$ netstat -anp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:10251 0.0.0.0:* LISTEN -
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 100174318 - @/containerd-shim/moby/ebde2be0a20ea82431e38a9af5222540ad86a3049a7896646273783e8e5616dd/shim.sock
unix 2 [ ACC ] STREAM LISTENING 95532948 - @/containerd-shim/moby/d02dca7b9146fb4cbca3eb26f0a666b5999922c7803d81b28281d9604bb32249/shim.sock


The linux command netstat -anp's output is shown above. With Unix part, I could not identify Peer IP. Could some expert give me some guidance to list Peer IP. I am doing network service topology diagram for this purpose.










share|improve this question













In Linux, I could use ss or netstat -anp command to see TCP and Unix communication. In TCP communication, I could see localIP, Local port, Peer IP and Peer port. What's more, I could see PID and program name. But when I see netstat -anp with Unix part, I could not identify the peer IP. I know Unix does not use port. But it shall shows Peer IP in some linux commands.



[k8s@k8s config]$ netstat -anp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:10251 0.0.0.0:* LISTEN -
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 100174318 - @/containerd-shim/moby/ebde2be0a20ea82431e38a9af5222540ad86a3049a7896646273783e8e5616dd/shim.sock
unix 2 [ ACC ] STREAM LISTENING 95532948 - @/containerd-shim/moby/d02dca7b9146fb4cbca3eb26f0a666b5999922c7803d81b28281d9604bb32249/shim.sock


The linux command netstat -anp's output is shown above. With Unix part, I could not identify Peer IP. Could some expert give me some guidance to list Peer IP. I am doing network service topology diagram for this purpose.







networking






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 at 9:01









user84592

1064




1064




migrated from askubuntu.com Nov 29 at 1:38


This question came from our site for Ubuntu users and developers.






migrated from askubuntu.com Nov 29 at 1:38


This question came from our site for Ubuntu users and developers.










  • 2




    Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
    – PerlDuck
    Nov 28 at 9:15










  • What operating system are you using?
    – terdon
    Nov 28 at 9:34










  • @terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
    – user84592
    Nov 29 at 1:23














  • 2




    Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
    – PerlDuck
    Nov 28 at 9:15










  • What operating system are you using?
    – terdon
    Nov 28 at 9:34










  • @terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
    – user84592
    Nov 29 at 1:23








2




2




Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
– PerlDuck
Nov 28 at 9:15




Unix domain sockets don't have an IP address. They have a file path instead and work only locally. Read en.m.wikipedia.org/wiki/Unix_domain_socket for example.
– PerlDuck
Nov 28 at 9:15












What operating system are you using?
– terdon
Nov 28 at 9:34




What operating system are you using?
– terdon
Nov 28 at 9:34












@terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
– user84592
Nov 29 at 1:23




@terdon CentOS 7.4, but we concern Ubuntu, CentOS,and other major Linux version at this moment. In future, we will consider Solaris。
– user84592
Nov 29 at 1:23















active

oldest

votes











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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
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%2f484809%2funix-socket-communication-how-to-see-the-relationship-of-the-nodes%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f484809%2funix-socket-communication-how-to-see-the-relationship-of-the-nodes%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt