LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2009, 08:48 AM   #1
rheosiva
LQ Newbie
 
Registered: Jan 2008
Location: india
Distribution: Fedora
Posts: 17

Rep: Reputation: 0
using lsof command


I want to know how lsof command to be used to get the file descriptors leak and memory leak...
I looked in the man pages but i could nt able to predict..

Please help with this...
Thanks in advance..
 
Old 04-01-2009, 02:58 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 68
The problem is that you cannot determine leaks by observations made only from outside the program. lsof will show you all the open files. You may want to find all directories with more than 25 links in them in /proc/*/fd/. But that doesn't mean you will find a leak. By definition the leak occurs when program don't need the resource, but fails to release it; or - by other definition - if it loses proper tracking of that resource. Unfortunately, lsof - being an external entity and not knowing inner workings of a program - cannot reliably determine if a program needs the resource. Imaging watching a HTTP server. It keeps open connections to DB. lsof has no way of knowing whether they are abandoned or just waiting the peak load from clients to be used.
 
Old 04-02-2009, 01:36 AM   #3
rheosiva
LQ Newbie
 
Registered: Jan 2008
Location: india
Distribution: Fedora
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks It really helps me to understand the things better..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lsof redirect WRXSTi Programming 8 10-02-2006 03:45 PM
What to do when lsof fails.... SpacedCowboy Linux - Security 2 10-29-2005 02:39 PM
Lsof Is Useless?? Philip_38 Linux - Software 3 01-30-2005 09:24 AM
C Library for lsof loki.guz_BR Linux - Security 1 05-19-2004 02:19 PM
lsof: command not found ionian2k Linux - Newbie 1 12-26-2002 08:59 PM


All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration