Detecting file descriptor leak

At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does anyone what
command to use to retrieve information about the number of file descriptors
associated/opened by a process?

Thanks
Jens

Jens H Jorgensen <jhj@remove-nospam-videk.com> wrote:

At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does anyone what
command to use to retrieve information about the number of file descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

I thought also that it was sin that I used previous, but here is the output
from “use sin”:

use ./sin

sin - This is a QNX/Photon Application.
sin [options]

Options:
-s server Server node or device name
-x x Initial x position
-y y Initial y position
-h h Initial h dimension
-w w Initial w dimension
-S i|m|n Initial window state: i=iconified, m=maximized, n=normal

Examples:
sin -s4
Run using Photon server on node 4

sin -s//4/dev/photon
Same as above

sin -x10 -y10 -h200 -w300
Run at initial position 10,10 with initial
dimension of 200x300.


That does not seem to be the right sin???

\

Jens

“Robert Krten” <nospam88@parse.com> wrote in message
news:ab8ljt$hqq$1@inn.qnx.com

Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does anyone
what
command to use to retrieve information about the number of file
descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.

Jens H Jorgensen <jhj@remove-nospam-videk.com> wrote:

I thought also that it was sin that I used previous, but here is the output
from “use sin”:

use ./sin

sin - This is a QNX/Photon Application.
sin [options]

Options:
-s server Server node or device name
-x x Initial x position
-y y Initial y position
-h h Initial h dimension
-w w Initial w dimension
-S i|m|n Initial window state: i=iconified, m=maximized, n=normal

Examples:
sin -s4
Run using Photon server on node 4

sin -s//4/dev/photon
Same as above

sin -x10 -y10 -h200 -w300
Run at initial position 10,10 with initial
dimension of 200x300.


That does not seem to be the right sin???

Did you actually try “sin fd” ??? :slight_smile:

Granted, the usage message sucks!

-RK


Jens

“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab8ljt$hqq$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does anyone
what
command to use to retrieve information about the number of file
descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Jens H Jorgensen <jhj@remove-nospam-videk.com> wrote:

Sorry - yes I did from console mode, and it simply just hangs. I haven’t
tried it from Photon yet, but I need it to work in console mode. I am pretty
sure that I previously had a console application which would do what I
wanted - could it have been spin?

Huh; mine works from a pterm in Photon, but it should be just a regular text
app. Perhaps you have a “stuck” file somewhere, on some removable or networked
media that’s taking a while to spin up or timeout…

Then I will have to download spin again.

Dunno if spin does that; never used it :frowning:

Cheers,
-RK

Thanks
Jens
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab91n0$qdo$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
I thought also that it was sin that I used previous, but here is the
output
from “use sin”:

use ./sin

sin - This is a QNX/Photon Application.
sin [options]

Options:
-s server Server node or device name
-x x Initial x position
-y y Initial y position
-h h Initial h dimension
-w w Initial w dimension
-S i|m|n Initial window state: i=iconified, m=maximized, n=normal

Examples:
sin -s4
Run using Photon server on node 4

sin -s//4/dev/photon
Same as above

sin -x10 -y10 -h200 -w300
Run at initial position 10,10 with initial
dimension of 200x300.


That does not seem to be the right sin???

Did you actually try “sin fd” ??? > :slight_smile:

Granted, the usage message sucks!

-RK


Jens

“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab8ljt$hqq$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does
anyone
what
command to use to retrieve information about the number of file
descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


\

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Sorry - yes I did from console mode, and it simply just hangs. I haven’t
tried it from Photon yet, but I need it to work in console mode. I am pretty
sure that I previously had a console application which would do what I
wanted - could it have been spin?

Then I will have to download spin again.

Thanks
Jens
“Robert Krten” <nospam88@parse.com> wrote in message
news:ab91n0$qdo$1@inn.qnx.com

Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
I thought also that it was sin that I used previous, but here is the
output
from “use sin”:

use ./sin

sin - This is a QNX/Photon Application.
sin [options]

Options:
-s server Server node or device name
-x x Initial x position
-y y Initial y position
-h h Initial h dimension
-w w Initial w dimension
-S i|m|n Initial window state: i=iconified, m=maximized, n=normal

Examples:
sin -s4
Run using Photon server on node 4

sin -s//4/dev/photon
Same as above

sin -x10 -y10 -h200 -w300
Run at initial position 10,10 with initial
dimension of 200x300.


That does not seem to be the right sin???

Did you actually try “sin fd” ??? > :slight_smile:

Granted, the usage message sucks!

-RK


Jens

“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab8ljt$hqq$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
At one time I figured out how to view the number of file descriptors
associated to a process, but I can’t remember how I did it. Does
anyone
what
command to use to retrieve information about the number of file
descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


\

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.

“Robert Krten” <nospam88@parse.com> wrote in message
news:ab937q$rh4$1@inn.qnx.com

Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
Sorry - yes I did from console mode, and it simply just hangs. I haven’t
tried it from Photon yet, but I need it to work in console mode. I am
pretty
sure that I previously had a console application which would do what I
wanted - could it have been spin?


Huh; mine works from a pterm in Photon, but it should be just a regular
text
app. Perhaps you have a “stuck” file somewhere, on some removable or
networked
media that’s taking a while to spin up or timeout…

Then I will have to download spin again.

Dunno if spin does that; never used it > :frowning:

I decided to download spin (http://home.attbi.com/~kovalenko/qnx/spin/) it
actually does give the number of file descriptor information for each
process.

Jens

Cheers,
-RK

Thanks
Jens
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab91n0$qdo$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
I thought also that it was sin that I used previous, but here is the
output
from “use sin”:

use ./sin

sin - This is a QNX/Photon Application.
sin [options]

Options:
-s server Server node or device name
-x x Initial x position
-y y Initial y position
-h h Initial h dimension
-w w Initial w dimension
-S i|m|n Initial window state: i=iconified, m=maximized,
n=normal

Examples:
sin -s4
Run using Photon server on node 4

sin -s//4/dev/photon
Same as above

sin -x10 -y10 -h200 -w300
Run at initial position 10,10 with initial
dimension of 200x300.


That does not seem to be the right sin???

Did you actually try “sin fd” ??? > :slight_smile:

Granted, the usage message sucks!

-RK


Jens

“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab8ljt$hqq$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
At one time I figured out how to view the number of file
descriptors
associated to a process, but I can’t remember how I did it. Does
anyone
what
command to use to retrieve information about the number of file
descriptors
associated/opened by a process?

sin fd

will get you at least partway there…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


\

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.


\

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.

“Jens H Jorgensen” <jhj@remove-nospam-videk.com> wrote in message
news:ab96qf$pc$1@inn.qnx.com

“Robert Krten” <> nospam88@parse.com> > wrote in message
news:ab937q$rh4$> 1@inn.qnx.com> …
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
Sorry - yes I did from console mode, and it simply just hangs. I
haven’t
tried it from Photon yet, but I need it to work in console mode. I am
pretty
sure that I previously had a console application which would do what I
wanted - could it have been spin?


Huh; mine works from a pterm in Photon, but it should be just a regular
text
app. Perhaps you have a “stuck” file somewhere, on some removable or
networked
media that’s taking a while to spin up or timeout…

Then I will have to download spin again.

Dunno if spin does that; never used it > :frowning:


I decided to download spin (> http://home.attbi.com/~kovalenko/qnx/spin/> ) it
actually does give the number of file descriptor information for each
process.

Yes and you can sort by number of fds used, easily putting leakers on top of
the list.

– igor