Page MenuHomeFreeBSD

Hide struct unpcb under #ifdef _KERNEL.
AbandonedPublic

Authored by glebius on Jun 9 2017, 7:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 27 2023, 2:17 PM
Unknown Object (File)
Dec 22 2023, 11:52 AM
Unknown Object (File)
Nov 22 2023, 6:12 PM
Unknown Object (File)
Sep 13 2023, 3:03 PM
Unknown Object (File)
Sep 1 2023, 10:57 PM
Unknown Object (File)
Aug 27 2023, 1:37 AM
Unknown Object (File)
Aug 12 2023, 9:12 PM
Unknown Object (File)
Aug 2 2023, 9:58 AM
Subscribers

Details

Reviewers
bz
Group Reviewers
network
Summary

Provide all necessary fields in struct xunpcb. Adjust netstat(1) and
sockstat(1) accordingly. Drop kvm(3) support from netstat(1) UNIX
printing.

In unp_pcblist() put single struct xunpcb on stack, to avoid extra
allocation.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9753
Build 10192: arc lint + arc unit

Event Timeline

if you drop support from netstat what's the alternative to get this information out of crashdumps then?

I'm going to write python scripts for gdb.

bz requested changes to this revision.Jun 10 2017, 3:00 PM

Well a python script won't help me with a base system crashdump on boot if it's not installed.

The other problem I think I generally have is that your description does not give me a reason on why it has to go?

This revision now requires changes to proceed.Jun 10 2017, 3:00 PM

I had this dialogue with jhb@ before. To not repeat myself, please read these two emails.

https://lists.freebsd.org/pipermail/svn-src-head/2015-April/070483.html
https://lists.freebsd.org/pipermail/svn-src-head/2017-March/098796.html

The base system is no longer helpful with crashdumps at all, since there is no longer debugger in the base system. What are you going to do with crashinfo output on a bare base system?

However, now that kgdb has python support, I will create scripts, that will restore functionality of crashinfo. Yes, I am absolutely sure that they won't be used by anyone, but looks like this functionality is sacred.

I am very much with @jhb in this case. Having written DDB and netstat support to easily, quickly, and without the need to think debug problems without having to switch the tool I normally use for system administration is a big plus.

Reading your original email and the historic behaviour of netstat using kvm for certain functionality by default, I agree with you, is less preferred and a proper API is good, but for things that poke /dev/mem (such as kvm/libkvm) or an equivalent crashdump there is no API. It's best effort as a gdb, lldb, or other tool of choice support would be. I would very much like not to lose the ability to just type the normal netstat command lines w/ -M -N.