Subject: Re: netstat problem with ksyms.
To: Chavdar Ivanov <ci4ic4@gmail.com>
From: Pavel Cahyna <pavel@netbsd.org>
List: current-users
Date: 05/27/2006 17:23:34
On Sat, May 27, 2006 at 01:13:12PM +0100, Chavdar Ivanov wrote:
> Hi,
>
> It seems if one has
>
> pseudo-device ksyms # /dev/ksyms
>
> in one's kernel, netstat refuses to play:
>
> # netstat
> netstat: no namelist
>
> If I take just the above line from the kernel definition, it works
> fine. The ktruss output shows opening of /dev/ksyms if the option is
> enabled, but fails further:
>
> ...
> 12117 1 netstat open("/dev/kmem", 0, 0) = 5
> 12117 1 netstat fcntl(0x5, 0x2, 0x1) = 0
> 12117 1 netstat open("/dev/drum", 0, 0) = 6
> 12117 1 netstat fcntl(0x6, 0x2, 0x1) = 0
> 12117 1 netstat open("/dev/ksyms", 0, 0) = 7
> 12117 1 netstat fcntl(0x7, 0x2, 0x1) = 0
> 12117 1 netstat close(0x7) = 0
> 12117 1 netstat getgid() = 0, 2
> 12117 1 netstat setgid(0) = 0
> 12117 1 netstat open("/dev/ksyms", 0, 0) = 7
> 12117 1 netstat fcntl(0x7, 0x2, 0x1) = 0
> 12117 1 netstat pread(0x7, 0xbfbfaf90, 0x20, 0, 0, 0) = 32
> "\^?ELF\^A\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\^A\0\0\0\0\0\0\0004\0\0\0"
> 12117 1 netstat __fstat30(0x7, 0xbfbfdf40) = 0
> 12117 1 netstat pread(0x7, 0xbfbfdf00, 0x34, 0, 0, 0) = 52
> "\^?ELF\^A\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\^A\0\0\0\0\0\0\0004\0\0\0t\0"
> 12117 1 netstat close(0x7) = 0
> 12117 1 netstat write(0x2, 0xbfbfd6d0, 0x9) = 9
> "netstat: "
> 12117 1 netstat write(0x2, 0xbfbfd6f0, 0xb) = 11
> "no namelist"
> 12117 1 netstat write(0x2, 0x8068f5b, 0x1) = 1
> "\n"
> 12117 1 netstat exit(0x1)
> .....
>
> Obviously with no ksyms in the kernel, it cannot open /dev/ksyms and
> carries on it's work.
>
> Any ideas?
>
> (BTW this is -current from yesterday, i386).
- did it work before yesterday?
- do you have "options MULTIBOOT"?
- what is the version of src/sys/arch/i386/conf/kern.ldscript ?
Pavel