Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Feb 2026 12:23:43 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Doug Hardie <bc979@lafn.org>
Cc:        questions@freebsd.org
Subject:   Re: Strange sockstat entries
Message-ID:  <864insbxvk.fsf@ltc.des.dev>
In-Reply-To: <2133E787-9AF9-4999-83DC-83B4C0CABD32@lafn.org> (Doug Hardie's message of "Fri, 6 Feb 2026 12:05:59 -0800")
References:  <2133E787-9AF9-4999-83DC-83B4C0CABD32@lafn.org>

index | next in thread | previous in thread | raw e-mail

Doug Hardie <bc979@lafn.org> writes:
> I am seeing a number of unusual sockstat entries that look like:
>
> ??       ??            ??    ?? tcp4    10.0.1.230:587        178.16.54.22:63001
>
> The occur at the end of the output.  Often there are about 10 or so
> entries.  Most of them vanish after a few seconds.  However, two are
> quite persistent.  What causes this type of entry?

sockstat works by retrieving and cross-referencing information from two
separate lists, one that ties sockets to processes and another that ties
sockets to connections.  If a socket is opened or closed while sockstat
is working, it may show up in one list but not in the other.  It might
be better to drop incomplete entries by default.

Note that sockets owned by the kernel (e.g. NFS) will never show up in
the list of processes.  Perhaps we should arrange things so they show up
with PID and UID 0.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?864insbxvk.fsf>