Finding the process that is using a file - OS2

This is a discussion on Finding the process that is using a file - OS2 ; Hello, Occasionally I get the message: "SYS0032: The process cannot access the file because it is being used by another process." Or in C-library: "Text file busy." Is there a utility that shows the process(es) bound to a file? Theseus ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Finding the process that is using a file

  1. Finding the process that is using a file

    Hello,
    Occasionally I get the message:
    "SYS0032: The process cannot access the file because it is being used by
    another process." Or in C-library: "Text file busy."
    Is there a utility that shows the process(es) bound to a file?
    Theseus does not. Nor does pstat.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  2. Re: Finding the process that is using a file

    On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    wrote:

    > Hello,
    > Occasionally I get the message:
    > "SYS0032: The process cannot access the file because it is being used by
    > another process." Or in C-library: "Text file busy."
    > Is there a utility that shows the process(es) bound to a file?
    > Theseus does not. Nor does pstat.


    psfiles

    --
    Bob Eager



  3. Re: Finding the process that is using a file

    Bob Eager wrote:
    > On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    > wrote:
    >
    >>Hello,
    >> Occasionally I get the message:
    >>"SYS0032: The process cannot access the file because it is being used by
    >>another process." Or in C-library: "Text file busy."
    >> Is there a utility that shows the process(es) bound to a file?
    >> Theseus does not. Nor does pstat.

    >
    > psfiles


    There's also a utility called "lsof" ported from the *nix world. Both
    are basically the same.

    --
    [Reverse the parts of the e-mail address to reply.]

  4. Re: Finding the process that is using a file

    On Tue, 2 Oct 2007 20:24:22 UTC, Marty wrote:

    > Bob Eager wrote:
    > > On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    > > wrote:
    > >
    > >>Hello,
    > >> Occasionally I get the message:
    > >>"SYS0032: The process cannot access the file because it is being used by
    > >>another process." Or in C-library: "Text file busy."
    > >> Is there a utility that shows the process(es) bound to a file?
    > >> Theseus does not. Nor does pstat.

    > >
    > > psfiles

    >
    > There's also a utility called "lsof" ported from the *nix world. Both
    > are basically the same.


    But psfiles is already there, which is a slight advantage...

    --
    Bob Eager



  5. Re: Finding the process that is using a file

    Bob Eager wrote:
    >> Occasionally I get the message:
    >> "SYS0032: The process cannot access the file because it is being used by
    >> another process." Or in C-library: "Text file busy."
    >> Is there a utility that shows the process(es) bound to a file?

    >
    > psfiles
    >

    Thank you! This helped solve a longstanding file access problem I was
    having.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  6. Re: Finding the process that is using a file

    Bob Eager wrote:
    > On Tue, 2 Oct 2007 20:24:22 UTC, Marty wrote:
    >
    >> Bob Eager wrote:
    >>> On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    >>> wrote:
    >>>
    >>>> Hello,
    >>>> Occasionally I get the message:
    >>>> "SYS0032: The process cannot access the file because it is being used by
    >>>> another process." Or in C-library: "Text file busy."
    >>>> Is there a utility that shows the process(es) bound to a file?
    >>>> Theseus does not. Nor does pstat.
    >>> psfiles

    >> There's also a utility called "lsof" ported from the *nix world. Both
    >> are basically the same.

    >
    > But psfiles is already there, which is a slight advantage...
    >


    Interesting. I tried it on my system redirecting the output to a file. The
    result was 579 lines consisting of 1 header line:

    pid Hdl SFN refs flags mode size hvpb attr name

    88 instances of

    no MFT (probably a pipe)

    and 490 references to files or devices (many of them NUL) with numerous
    duplications. Fully 282 of these belonged to process 0000 which I presume is
    the kernel.

    The meanings of pid, Hdl, size, attr, and name are obvious although some
    detective work is required to decode attr. I presume refs is some sort of
    reference count but it isn't clear exactly how the references are counted, and
    what of the rest? I can find no documentation on my system. The only mention is
    in REXX tips and tricks which says it comes from Warp4 fixpack 13 and is not as
    convenient as lsof. Is there documentation somewhere?

    Thanks.

  7. Re: Finding the process that is using a file

    On Wed, 3 Oct 2007 22:34:00 UTC, "James J. Weinkam"
    wrote:

    > Bob Eager wrote:
    > > On Tue, 2 Oct 2007 20:24:22 UTC, Marty wrote:
    > >
    > >> Bob Eager wrote:
    > >>> On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    > >>> wrote:
    > >>>
    > >>>> Hello,
    > >>>> Occasionally I get the message:
    > >>>> "SYS0032: The process cannot access the file because it is being used by
    > >>>> another process." Or in C-library: "Text file busy."
    > >>>> Is there a utility that shows the process(es) bound to a file?
    > >>>> Theseus does not. Nor does pstat.
    > >>> psfiles
    > >> There's also a utility called "lsof" ported from the *nix world. Both
    > >> are basically the same.

    > >
    > > But psfiles is already there, which is a slight advantage...
    > >

    >
    > Interesting. I tried it on my system redirecting the output to a file. The
    > result was 579 lines consisting of 1 header line:
    >
    > pid Hdl SFN refs flags mode size hvpb attr name
    >
    > 88 instances of
    >
    > no MFT (probably a pipe)
    >
    > and 490 references to files or devices (many of them NUL) with numerous
    > duplications. Fully 282 of these belonged to process 0000 which I presume is
    > the kernel.
    >
    > The meanings of pid, Hdl, size, attr, and name are obvious although some
    > detective work is required to decode attr. I presume refs is some sort of
    > reference count but it isn't clear exactly how the references are counted, and
    > what of the rest? I can find no documentation on my system. The only mention is
    > in REXX tips and tricks which says it comes from Warp4 fixpack 13 and is not as
    > convenient as lsof. Is there documentation somewhere?


    Not seen any. It's mentioned briefly in technote.txt in the root of the
    boot drive after installation.

    --
    Bob Eager



  8. Re: Finding the process that is using a file

    Bob Eager wrote:
    > On Wed, 3 Oct 2007 22:34:00 UTC, "James J. Weinkam"
    > wrote:
    >
    >> Bob Eager wrote:
    >>> On Tue, 2 Oct 2007 20:24:22 UTC, Marty wrote:
    >>>
    >>>> Bob Eager wrote:
    >>>>> On Tue, 2 Oct 2007 19:03:24 UTC, Jim Moe
    >>>>> wrote:
    >>>>>
    >>>>>> Hello,
    >>>>>> Occasionally I get the message:
    >>>>>> "SYS0032: The process cannot access the file because it is being used by
    >>>>>> another process." Or in C-library: "Text file busy."
    >>>>>> Is there a utility that shows the process(es) bound to a file?
    >>>>>> Theseus does not. Nor does pstat.
    >>>>> psfiles
    >>>> There's also a utility called "lsof" ported from the *nix world. Both
    >>>> are basically the same.
    >>> But psfiles is already there, which is a slight advantage...
    >>>

    >> Interesting. I tried it on my system redirecting the output to a file. The
    >> result was 579 lines consisting of 1 header line:
    >>
    >> pid Hdl SFN refs flags mode size hvpb attr name
    >>
    >> 88 instances of
    >>
    >> no MFT (probably a pipe)
    >>
    >> and 490 references to files or devices (many of them NUL) with numerous
    >> duplications. Fully 282 of these belonged to process 0000 which I presume is
    >> the kernel.
    >>
    >> The meanings of pid, Hdl, size, attr, and name are obvious although some
    >> detective work is required to decode attr. I presume refs is some sort of
    >> reference count but it isn't clear exactly how the references are counted, and
    >> what of the rest? I can find no documentation on my system. The only mention is
    >> in REXX tips and tricks which says it comes from Warp4 fixpack 13 and is not as
    >> convenient as lsof. Is there documentation somewhere?

    >
    > Not seen any. It's mentioned briefly in technote.txt in the root of the
    > boot drive after installation.
    >

    On my system technote.txt is in \os2\book. I didn't find the reference because
    I was searching the inf and hlp files. What is there isn't very informative.

    Perhaps someone who knows how to interpret the other fields would be kind enough
    to post the information?

    Thanks.

  9. Re: Finding the process that is using a file

    On Thu, 4 Oct 2007 04:57:54 UTC, "James J. Weinkam"
    wrote:

    > > Not seen any. It's mentioned briefly in technote.txt in the root of the
    > > boot drive after installation.
    > >

    > On my system technote.txt is in \os2\book. I didn't find the reference because
    > I was searching the inf and hlp files. What is there isn't very informative.


    I'm pretty sure it starts off in the root; perhaps you moved it..!

    > Perhaps someone who knows how to interpret the other fields would be kind enough
    > to post the information?


    I said it wasn't very informative...
    --
    Bob Eager



  10. Finding the process that is using a file

    JJW> and what of the rest?

    They are various fields from a Master File Table entry, which you can
    find documented in the "OS/2 System Control Block" section of the _The
    OS/2 Debugging Handbook_ volume #4, IBM Redbook SG24-4643-00.

    http://publib-b.boulder.ibm.com/Redb...bookAbstracts/
    sg244643.html>


  11. Re: Finding the process that is using a file

    J de Boyne Pollard wrote:
    > JJW> and what of the rest?
    >
    > They are various fields from a Master File Table entry, which you can
    > find documented in the "OS/2 System Control Block" section of the _The
    > OS/2 Debugging Handbook_ volume #4, IBM Redbook SG24-4643-00.
    >
    > http://publib-b.boulder.ibm.com/Redb...bookAbstracts/
    > sg244643.html>
    >

    Thanks

  12. Re: Finding the process that is using a file

    On Thu, 4 Oct 2007 06:31:22 UTC, "Bob Eager" wrote:

    > > On my system technote.txt is in \os2\book.

    >
    > I'm pretty sure it starts off in the root; perhaps you moved it..!


    eCS moves all the IBM documentation to \os2\book.

    --
    Alex Taylor
    http://www.cs-club.org/~alex

    Please take off hat when replying.

+ Reply to Thread