Subject: Re: /kern/msgbuf & less
To: None <port-i386@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-i386
Date: 10/10/2002 23:25:25
[Inadvertently deleted the thread, so sorry for an orhpaned reply.]
I think the problem is that less(1) trusts the file size returned by
stat(2) and, as Simon noted in his reply, it seems that stat(2)
returns the amount of free space in the msgbug, not the amount of
space used.
On my sparc:
$ cat /kern/msgbuf | wc -c
8176
$ ls -l /kern/msgbuf
-r--r--r-- 1 root wheel 5736 Oct 10 23:22 /kern/msgbuf
$ dmesg | wc -c
2434
$ expr 2434 + 5736
8170 # <- ok, ok, it doesn't add up to 8176 ;)
After forcing some kernel output I get
dmesg: 2540
stat: 5630
sum: 8170
And so on.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen