Page MenuHomeFreeBSD

sockstat: Attach to jail if in new vnet
ClosedPublic

Authored by freqlabs on Apr 14 2020, 7:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 9, 10:58 AM
Unknown Object (File)
Sun, Mar 8, 11:46 AM
Unknown Object (File)
Sat, Mar 7, 4:42 PM
Unknown Object (File)
Sat, Feb 28, 12:23 PM
Unknown Object (File)
Sat, Feb 28, 6:28 AM
Unknown Object (File)
Fri, Feb 27, 1:12 AM
Unknown Object (File)
Feb 8 2026, 8:42 AM
Unknown Object (File)
Feb 8 2026, 7:13 AM

Details

Summary

Attach sockstat to the specified jail if the jail is in a new vnet.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bcr added a subscriber: bcr.

OK from manpages.

It may be a better user interface if "-j" automatically did the right thing - limit output to the specified jail for traditional jails, and attach to vnet jails. So after the jail_getid(), a jail_get() or jail_getv() to fetch the jail's vnet parameter. Then the jail_attach() can happen if the vnet is JAIL_SYS_NEW.

That's not quite perfect, as it wouldn't detect a non-vnet jail that's a child of a vnet jail. But it would seamlessly cover the common cases.

freqlabs retitled this revision from sockstat: Add an option for attaching to a jail to sockstat: Attach to jail if in new vnet.
freqlabs edited the summary of this revision. (Show Details)

Integrate with existing -j option, per suggestion by @jamie

This revision is now accepted and ready to land.Apr 24 2020, 3:50 PM
This revision was automatically updated to reflect the committed changes.