我有一组应用程序,它们都绑定到一台Linux机器上的同一个多播UDP端口。 (在这种情况下为23003)。该应用程序是多线程的,因此,在某些情况下,它可能会在不同线程中的同一应用程序中多次绑定到同一端口。
也就是说,当我执行lsof时,我看到从单个pid到多个inode的引用都引用了相同的UDP端口。没关系;但是,当我查看多个应用程序时,有时候这个inode编号是唯一的,这是我所期望的,有时它并不是唯一的;意味着多个应用程序指的是同一个套接字inode。
我会期待一个或另一个,但不是两个。见下面的输出。在第一个输出中,PID 18774和其他有两个不同的inode(一个28267669,另一个每个应用程序的唯一)都引用端口20003.在第二个命令中,您可以看到所有正在查看inode 28267669的应用程序。谁能解释一下?为什么我看到了唯一的AND非唯一的inode引用?
[root@v20z5 log]# grep ChangeLogLevelMsg foo.log | sort | uniq -c 1 15:55:24: PNUFR::pre: PID 18771, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18774, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18774, INODE 28267759, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18776, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18776, INODE 28267747, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18781, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18781, INODE 28267769, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18782, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18782, INODE 28267915, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18784, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18784, INODE 28267907, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18786, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18786, INODE 28267997, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18789, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18789, INODE 28267935, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18790, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18790, INODE 28267996, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18792, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18792, INODE 28267952, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18793, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18793, INODE 28268096, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18795, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18795, INODE 28268057, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18798, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18798, INODE 28267964, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18803, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18803, INODE 28268173, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18804, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18804, INODE 28268071, PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18831, INODE , PORT 23003 => TAG 3 ChangeLogLevelMsg 1 15:55:24: PNUFR::pre: PID 18831, INODE 28268071, PORT 23003 => TAG 3 ChangeLogLevelMsg [root@v20z5 log]# grep ChangeLogLevelMsg foo.log | grep 669 15:55:24: PNUFR::pre: PID 18771, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18774, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18776, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18781, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18782, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18784, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18786, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18789, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18790, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18792, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18793, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18795, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18798, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18803, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18804, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18831, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg [root@v20z5 log]# grep ChangeLogLevelMsg foo.log 15:55:24: PNUFR::pre: PID 18771, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18774, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18774, INODE 28267759, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18776, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18776, INODE 28267747, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18781, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18781, INODE 28267769, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18782, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18782, INODE 28267915, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18784, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18784, INODE 28267907, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18786, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18786, INODE 28267997, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18789, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18789, INODE 28267935, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18790, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18790, INODE 28267996, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18792, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18792, INODE 28267952, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18793, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18793, INODE 28268096, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18795, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18795, INODE 28268057, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18798, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18798, INODE 28267964, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18803, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18803, INODE 28268173, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18804, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18804, INODE 28268071, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18831, INODE 28267669, PORT 23003 => TAG 3 ChangeLogLevelMsg 15:55:24: PNUFR::pre: PID 18831, INODE 28268071, PORT 23003 => TAG 3 ChangeLogLevelMsg