At 09:42 AM 1/16/03 -0500, you (Felix Miata) wrote:

>1505 (64 second last non-root login; 9.0; users
501,502,503,551,553,555,556,587; all group 501; 550Mhz)
>1562 (89 second last non-root login; 9.0; users
500,501,502,503,504,505,506,507; all group 500; 500Mhz)
>1470 (5.5 second last non-root login; rc3; users 501,502,503; 550Mhz)
>
>LSI 53c8xx /dev/sdc7 / on first machine, /dev/hda7 / on the others.

I think to understand that you have around 1500 entries in your /dev directory.
That's about as much as my installation.
I don't have much knowledge about devfs; based on another post, it seems that
opening a file under /dev can load a kernel module, something that can
be more or less slow. One possibility could be that on your system a 
particular module is very slow at initialization.

I have attached a little script to try to test for such behaviour.
Run it as 

python test.py

as root, under a console (X Window not started), with a floppy in
the drive, and report the result. 
The script reports any open/close taking more than 0.1 seconds. 
On my system only /dev/psaux is reported (the script reports also
numerous open errors)

Gerard Patel
import os
import sys
import time

def f(arg, dir, fnames):
        for n in fnames:
                sname = dir + '/' + n
                tbegin = time.time()
                try:
                        h = os.open(sname, os.O_RDONLY)
                        os.close(h)
                except:
                        exc_type, exc_value, exc_trace = sys.exc_info()
                        print str(exc_value)
                tend = time.time()
                if ((tend-tbegin) > 0.1):
                        print sname + ' ' + str(tend-tbegin)
        
if __name__ == '__main__':
        os.path.walk('/dev', f, None)



Reply via email to