- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to find the command line of a process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 06:43 PM
06-26-2007 06:43 PM
How to find the command line of a process
So, a process that does
$ @wim.com
and wim.com contains
$ show time
$ wait 01:00
would be shown as
1) @wim.lis
2) wait 01:00
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 06:58 PM
06-26-2007 06:58 PM
Re: How to find the command line of a process
Do you mean that you want to see what is executing inside the command procedure? In other words, you want to see more than what is kept in the command recall buffer?
Regards,
Bart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 06:59 PM
06-26-2007 06:59 PM
Re: How to find the command line of a process
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 07:23 PM
06-26-2007 07:23 PM
Re: How to find the command line of a process
I've pointed to this article recently:
http://h71000.www7.hp.com/openvms/journal/v1/dcl.html
An Inside Look at DCL by Guy Peleg in the OpenVMS Technical Journal V1.
It has information on how to access the 'expansion buffer' with SDA.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 07:37 PM
06-26-2007 07:37 PM
Re: How to find the command line of a process
virtaual locations ... are not accessible
unable to access ...
unknown symbol prc_g_commands
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 07:37 PM
06-26-2007 07:37 PM
Re: How to find the command line of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 07:39 PM
06-26-2007 07:39 PM
Re: How to find the command line of a process
I think so. But a stack would even be better.
(i'm out of unix since 1994)
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 08:07 PM
06-26-2007 08:07 PM
Re: How to find the command line of a process
it works for me (on V7.3-1 and V8.2), if you use the following SDA command to define the address of the WRK data structure:
SDA> def wrk=@(prc+prc_l_curwrk)
The expansion buffer WRK_G_BUFFER just provides the most recently executed DCL command as a zero-terminated string.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 08:22 PM
06-26-2007 08:22 PM
Re: How to find the command line of a process
But a freeware program would still be nicer.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 08:29 PM
06-26-2007 08:29 PM
Re: How to find the command line of a process
how about writing your own DCL$SDA SDA extension ? You now have all the necessary information.
But the only information readily available would be:
- the DCL recall buffer (showing @WIM.COM)
=> this is available from SDA> CLUE PROC/RECALL
- the most recent DCL command issued (WAIT 01:00)
=> this is available from the instructions given
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 08:31 PM
06-26-2007 08:31 PM
Re: How to find the command line of a process
Write a Sda extension, like this, if there is a bug, you will crash your process, not the system !
You may have a look at sys$examples:mbx$sda, for a basic and simple sda extension
You have modes$sda ( I do not remember where I saw it), which does some sums from the cpu ticks of a process in the 4 modes (kernel, exec, super, user, see
exam pcb+pcb$l_kernel_counter
and the 3 others)
and ctlpa$sda, procio$sda, s0s1$sda...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 09:54 PM
06-26-2007 09:54 PM
Re: How to find the command line of a process
http://eisner.encompasserve.org/~miller/
An SDA extension would be the simpler way of implementing this although it could be done in other ways but they would be more problematic.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 10:02 PM
06-27-2007 10:02 PM
Re: How to find the command line of a process
Is this what you had in mind (My applogies to the original author - I can't remember where I got this)
Watch for wrapping
Paul
DCL_NUMBERING.COM
$! Run this proc against DCL source
$! 2. output will be named proc.post_com
$! 3. execute proc.post_com instead of source
$! 4. source line nr will be recorded in local symbol "L" for each DCL line
$! interpreted
$! 5. write error handler to display/print last line number when triggered.
$ v=f$v(0)
$ on warning then exit
$ if p1 .eqs. "" then inq p1 "Input file"
$ if p1 .eqs. "" then exit
$ if f$search(p1) .eqs. ""
$ then
$ write sys$output p1," not found"
$ exit
$ endif
$ out_file = f$parse(p1,,,"name") + ".POST_COM"
$ write sys$output "Resulting file is ",f$dir(),out_file
$ close/nolog ch
$ close/nolog ch2
$ open/read ch 'p1'
$ open/write ch2 'out_file'
$ i=0
$ skip="NO"
$LOOP:
$ read/end=EOF ch line
$ write ch2 line
$ i=i+1
$ rec = "$L=''i'"
$! what are the lines that we don't want to mess up
$ line2=f$edit(line,"UPCASE,COLLAPSE")
$ if f$extract(0,3,line2) .eqs. "$!#" .or. - !metadata
f$extract(0,4,line2) .eqs. "$SQL" .or. - !interactive
f$extract(0,5,line2) .eqs. "$DECK" .or. - !(obvious?)
f$extract(0,7,line2) .eqs. "$CREATE" .and. - !idem $DECK
f$extract(7,1,line2) .nes. "/" then skip = "YES" !others are good
$!
$ if f$extract(0,8,line2) .eqs. "$CREATE=" then skip = "NO" !assignment
$!
$ if f$extract(0,3,line2) .eqs. "$!&" .or. - !metadata
f$extract(0,4,line2) .eqs. "$EOD" then skip = "NO" !end of $DECK
$!
$ if f$extract(0,2,line2) .nes. "$!"
$ then
$ line2=f$edit(line,"COLLAPSE,UNCOMMENT")
$ if f$extract(f$len(line2)-1,1,line2) .nes. "-" !don't mess it..
$ then !..if cont line
$ if skip .eqs. "NO" then write ch2 rec !write line nr
$ i=i+1 !inc line nr
$ endif
$ endif
$ goto LOOP
$EOF:
$ close ch
$ close ch2
$ v=f$v(v)
$ write sys$output "Done"
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 12:53 AM
06-28-2007 12:53 AM
Re: How to find the command line of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 02:00 AM
06-28-2007 02:00 AM
Re: How to find the command line of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 09:43 AM
06-28-2007 09:43 AM
Re: How to find the command line of a process
more nice stuff, I could use this
but where is prc, prc_l_curwrk defined? is prc a phd,pcb?
>def wrk=@(prc+prc_l_curwrk)<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 10:37 AM
06-28-2007 10:37 AM
Re: How to find the command line of a process
SYS$SYSTEM:DCLDEF.STB
$ ANALYZE/SYSTEM
SDA> READ DCLDEF
SDA> SHOW SYMBOL/ALL PRC
Used in a program you'd just link with DCLDEF.STB included. If you have the VMS source code, take a look at the DCL directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 03:29 PM
06-28-2007 03:29 PM
Re: How to find the command line of a process
In addition, you can set symbols in another process. And you can see the DCL procedures being executed at each level.
It isn't a debugger in the sense that you can trace or see the flow of execution, but being able to see the "call stack" of the DCL procedures is useful if you are attempting to determine what called or @ a command procedure, since DCL only keeps one open at at time (DCL was designed when memory was scarce).
Symbol 5.2 is a free, (no source) download from his site,
http://www.tmesis.com/
Go to the products page, Symbol is at the top. You will have to register and request a PAK for installation, which will be emailed to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:44 AM
06-29-2007 08:44 AM
Re: How to find the command line of a process
I can't get it to work, not sure what
volker meant by 'prc', I tried the pcb,
this is the phd..
SDA> def wrk=@(8683A000+prc_l_curwrk)
SDA> exam WRK_G_BUFFER
%SDA-E-NOTINPHYS, FFFFFFFF.FFFFF288 : virtual data not in physical memory
SDA> exam wrk
%SDA-W-UNALIGNED, unaligned address 00000000.0026E001; converting to aligned add
ress
00000000.0026E000: 00000000 "...."
SDA> exam 0026E000
00000000.0026E000: 00000000.00000000 "........"
it looks like a nice way to see what command
was issued on a hung process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 04:22 PM
06-29-2007 04:22 PM
Re: How to find the command line of a process
please read the article posted above and then use:
SDA> def wrk=@(prc+prc_l_curwrk)
instead of
SDA> DEFINE WRK=PRC+PRC_L_SAVFP
when trying to acces the DCL work area on recent versions of OpenVMS.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2007 08:17 PM
07-01-2007 08:17 PM
Re: How to find the command line of a process
( http://vms.process.com/scripts/fileserv/fileserv.com?GETCMD and on the Freeware CD) seems to have the necessary code to access own and other processes recall buffers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2007 08:20 PM
07-01-2007 08:20 PM
Re: How to find the command line of a process
That's the same as CLUE is giving. Thus only for interactive processes.
Wim