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

Re: determing number of open streams/files

 Here is one way to compute the number of number of file descriptors
currently in use:

(defun numopen () 
    (let ((count 0)) 
        (dotimes (i 32) 
            (cond ((excl::filesys-filestat i) (incf count))))

 The constant '32' should be replaced by a number greater than
or equal to one less than the maximum number of open file 
descriptors your unix permits.

 You could also advise the open and close functions and keep a running
count of files opened (although you may miss some file descriptor 
creation due to functions such as run-shell-command).

			-- john foderaro
			   franz inc.