Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Memory consideration' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Memory consideration
Authored by: henry on Feb 11, '04 08:19:53AM

Taken from the lsof man page, regarding the +D option:

lsof may process this option slowly and require a large amount of dynamic memory to do it. This is because it must descend the entire directory tree, rooted at [the specified directory], calling stat(2) for each file and directory, building a list of all the files it finds, and searching that list for a match with every open file. When [the specified directory] is large, these steps can take a long time, so use this option prudently.

Although the supplied script runs pretty quickly on my music library, I don't have that much music (~10GB). If you have a large music library, this script could use a lot of memory. That said, it's probably not much of a concern, I just thought people should be aware of it.



[ Reply to This | # ]