Negative values for peer inodes in ss -x output

Hi all,

Long time no see, love what you've done with the place, been a while and asked this in the wrong forum initially...

I'm wondering how to interpret negative values for local and peer inode values for Unix sockets?

Netid  State      Recv-Q Send-Q Local Address:Port                 Peer Address:Port
...
u_str  ESTAB      0      0      /var/run/docker.sock -1847002447           * -1846996756

I can trace the local/peer relationship in the ss -xpan output for example...
grepping out known a negative inode id I get

# ss -xp | grep --  -1841560902
u_str  ESTAB      0      0      /var/run/docker.sock -1841556763           * -1841560902           users:(("dockerd",pid=29490,fd=276))
u_str  ESTAB      0      0      *                    -1841560902           * -1841556763           users:(("metricbeat",pid=5712,fd=94)

Then looking at the proc entry for the metricbeat process I get a non-negative inode for fd 94.

# ls -l /proc/5712/fd/
...
lrwx------ 1 root root 64 Apr 28 12:00 94 -> socket:[2453406394]

I'm curious as to the relationship (if any) between the "real" inode value and the negative value used for the inode in the ss output , what circumstances this value is used in (despite there being an inode for the symlink in /proc ) and general wisdom on the subject.

Thanks, Skrynesaver

32 bit overflow? Calculate

2^32 - 1841560902 = 2453406394

.

1 Like