Usenet comp.sys.vms (1990-2004)
 help / color / mirror / Atom feed
* Files opened by a process (reposting)
@ 1997-10-29  5:00 henry.hoppe
  1997-10-29  5:00 ` Aaron Leonard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: henry.hoppe @ 1997-10-29  5:00 UTC (permalink / raw)



Hello!
There are many articles dealing with the question which processes have
opened a file. But I need information just the other way round: which
files are opened by a given process. Is there a way to get this info
from DCL?
TIA Henry Hoppe

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Files opened by a process (reposting)
  1997-10-29  5:00 Files opened by a process (reposting) henry.hoppe
  1997-10-29  5:00 ` Aaron Leonard
  1997-10-29  5:00 ` Ian Miller
@ 1997-10-29  5:00 ` Arlen Williams
  1997-10-30  5:00 ` PKM
  3 siblings, 0 replies; 5+ messages in thread
From: Arlen Williams @ 1997-10-29  5:00 UTC (permalink / raw)



henry.hoppe@duu.x400.basf-ag.de wrote:
> 
> Hello!
> There are many articles dealing with the question which processes have
> opened a file. But I need information just the other way round: which
> files are opened by a given process. Is there a way to get this info
> from DCL?
> TIA Henry Hoppe
> 
> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet

$ Analyze/System
$ SDA> Show Summary
$ SDA> Show Process/Chan/Index='index from Show Summary'



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Files opened by a process (reposting)
  1997-10-29  5:00 Files opened by a process (reposting) henry.hoppe
  1997-10-29  5:00 ` Aaron Leonard
@ 1997-10-29  5:00 ` Ian Miller
  1997-10-29  5:00 ` Arlen Williams
  1997-10-30  5:00 ` PKM
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Miller @ 1997-10-29  5:00 UTC (permalink / raw)



henry.hoppe@duu.x400.basf-ag.de wrote:
> 
> Hello!
> There are many articles dealing with the question which processes have
> opened a file. But I need information just the other way round: which
> files are opened by a given process. Is there a way to get this info
> from DCL?
> TIA Henry Hoppe
> 
> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet

ANAL/SYSTEM 
SHOW PROC/CHAN for the process in question will show the files.

Theres a program SHOW_FILES by Nick De Simth I think which will show the
files open by a process given a PID.
-- 
---------------------------------------------------------------
Ian Miller
Technical Infrastructure, EMEA
EDS UK
Email: msukhd01.gzf0w4@eds.com

All comments expressed above are personal and do not represent
the position or opinion of my employer.
---------------------------------------------------------------



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Files opened by a process (reposting)
  1997-10-29  5:00 Files opened by a process (reposting) henry.hoppe
@ 1997-10-29  5:00 ` Aaron Leonard
  1997-10-29  5:00 ` Ian Miller
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Aaron Leonard @ 1997-10-29  5:00 UTC (permalink / raw)




In article <878109665.21049@dejanews.com>, henry.hoppe@duu.x400.basf-ag.de writes:
|Hello!
|There are many articles dealing with the question which processes have
|opened a file. But I need information just the other way round: which
|files are opened by a given process. Is there a way to get this info
|from DCL?
|TIA Henry Hoppe

Here's two ways:

$ anal/sys
set proc/ind=PID_OF_INTEREST
show proc/chan

- or -

$ show dev/files/out=foo1.tmp dev1:
$ show dev/files/out=foo2.tmp dev2:
$! ... for each volume mounted on the system
$ search foo%.tmp PID_OF_INTEREST

Aaron



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Files opened by a process (reposting)
  1997-10-29  5:00 Files opened by a process (reposting) henry.hoppe
                   ` (2 preceding siblings ...)
  1997-10-29  5:00 ` Arlen Williams
@ 1997-10-30  5:00 ` PKM
  3 siblings, 0 replies; 5+ messages in thread
From: PKM @ 1997-10-30  5:00 UTC (permalink / raw)





henry.hoppe@duu.x400.basf-ag.de wrote in article
<878109665.21049@dejanews.com>...
> Hello!
> There are many articles dealing with the question which processes have
> opened a file. But I need information just the other way round: which
> files are opened by a given process. Is there a way to get this info
> from DCL?
> TIA Henry Hoppe
> 
> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet
> 
Hi.

I use a command procedure like this:

$ set noon
$ if p1 .nes. ""
$ then
$       pid=p1
$       goto Check_pid
$ endif
$
$Enter_pid:
$ read/end=Finito/prompt="Enter PID: " sys$command pid
$Check_pid:
$ prcnam=f$getjpi(pid,"prcnam")
$ if "''prcnam'" .eqs. "" then goto Enter_pid
$ if prcnam .eqs. "" then goto Enter_pid
$
$ open/write ud sys$login:analsys.com
$ write ud "$ define/user sys$output sys$login:anal.lis"
$ write ud "$ anal/system"
$ write ud "set proc """,prcnam,""""
$ write ud "show proc/channel"
$ write ud "$ exit"
$ close ud
$ @sys$login:analsys
$
$ of=0
$ open/read/error=Finito ind sys$login:anal.lis
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ read/end=Finito ind lin
$ write sys$output "Open files for ",prcnam
$File_loop:
$ read/end=Finito ind lin
$ fil=f$extract(27,999,lin)
$ if f$locate("[",fil) .eq. f$length(fil) then goto File_loop
$ of=of+1
$ write sys$output "    ",f$element(0," ",fil)
$ goto File_loop
$
$Finito:
$ if f$trnlnm("IND") .nes. "" then close ind
$ if of .eq. 0 then -
        write sys$output "      none..."
$ delete/nolog sys$login:anal.lis;*
$ delete/nolog sys$login:analsys.com;*



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-10-30  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-29  5:00 Files opened by a process (reposting) henry.hoppe
1997-10-29  5:00 ` Aaron Leonard
1997-10-29  5:00 ` Ian Miller
1997-10-29  5:00 ` Arlen Williams
1997-10-30  5:00 ` PKM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox