NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: unable to use lsof on NetBSD 5



matthew sporleder wrote:

> NetBSD fester 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Jul 30 01:39:11 UTC
> 2009  
> builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-1-RELEASE/i386/200907292356Z-obj/home/builds/ab/netbsd-5-0-1-RELEASE/src/sys/arch/i386/compile/GENERIC
> i386

Using the same kernel it does not work for me. The differences to a
working lsof starts here:

working:
   918      1 lsof     open("/dev/kmem", 0, 0)     = 5
   918      1 lsof     fcntl(0x5, 0x2, 0x1)        = 0
   918      1 lsof     open("/dev/drum", 0, 0)     = 6
   918      1 lsof     fcntl(0x6, 0x2, 0x1)        = 0
   918      1 lsof     pread(0x6, 0xbfbfe878, 0x20, 0, 0, 0) = 32
   .....

failing:
  1848      1 lsof     open("/dev/kmem", 0, 0)     = 5
  1848      1 lsof     fcntl(0x5, 0x2, 0x1)        = 0
  1848      1 lsof     open("/dev/drum", 0, 0)     Err#6 ENXIO
  1848      1 lsof     issetugid()                 = 1
  1848      1 lsof     issetugid()                 = 1
  1848      1 lsof     open("/dev/ksyms", 0, 0xbfbfd884) Err#2 ENOENT
 
What is /dev/drum and why can the call to open() fail?
I read drum(4) but it does not really tell me anything I understand. The
other resource I found [1] does not apply here.

  # ls -al /dev/drum
  crw-r-----  1 root  kmem  4, 0 Oct 30 19:20 /dev/drum

open(2) says
     [ENXIO]         The named file is a character special or block special
                     file, and the device associated with this special file
                     does not exist, or the named file is a FIFO,
                     O_NONBLOCK and O_WRONLY is set and no process has the
                     file open for reading.

From this I conclude the "device" associated with /dev/drum does not
exist. Could this be related to
  # swapctl -l
  Device      1K-blocks     Used    Avail Capacity  Priority
  /dev/raid0b   1048576        0  1048576     0%    0
?

ciao
     Klaus


[1] http://www.netfunny.com/rhf/jokes/91q1/devdrum.html


Home | Main Index | Thread Index | Old Index