- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Capture output from REPLY/STATUS
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-24-2007 07:43 PM
06-24-2007 07:43 PM
This may be an old one, but I have not been able to find the answer as yet.
How can we capture the output of the REPLY/STATUS command. It seems that it does not write to sys$output (or sys$error).
For example ...
$ reply/enable=tape
$ define sys$output x.tmp
$ reply/status
%%%%%%%%%%% OPCOM 22-JUN-2007 15:22:13.68 %%%%%%%%%%%
Operator status for operator _AUC052$TNA156:
TAPES
$ deass sys$output
$ dir/siz/dat x.tmp
Directory DISK1:[SITE.MANAGER]
X.TMP;1 0 22-JUN-2007 15:22:10.55
Total of 1 file, 0 blocks.
Or ...
$ ty replystatus.com
$reply/status
$exit
$
$ @replystatus.com/out=x.tmp
%%%%%%%%%%% OPCOM 22-JUN-2007 17:06:39.82 %%%%%%%%%%%
Operator status for operator _AUC052$TNA156:
TAPES
$ dir/siz/dat x.tmp
Directory DISK1:[SITE.MANAGER]
X.TMP;2 0 22-JUN-2007 17:06:39.82
X.TMP;1 0 22-JUN-2007 15:22:10.55
Total of 2 files, 0 blocks.
Why? Thought we might DCL script a reply to some backup-related OPCOM messages, and expected this to be briefer than parsing operator.log, and simpler than intercepting OPCOM events.
Platform?
HP TCP/IP Services for OpenVMS Industry Standard 64 Version V5.6
on an HP rx3600 (1.59GHz/9.0MB) running OpenVMS V8.3
Thanks and regards,
Lester
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 08:18 PM
06-24-2007 08:18 PM
Re: Capture output from REPLY/STATUS
I have a similar problem I'm working on, just now.
One possibility to capture Opcom Messages is as follows:
- Create a Terminal with the PTD (Pseudo Terminal Driver)
- Create a Mailbox
- use $Assign to assoziate the ptd with the mailbox
- Issue repl/enable within the pseudo terminal
- ...and read the Opcom Messages from the mailbox
If you have enoug time, I can supply some example code in C within this week I hope
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 08:39 PM
06-24-2007 08:39 PM
Re: Capture output from REPLY/STATUS
there is an OPCOM-TO-PTD C source code example at:
http://wwwvms.mppmu.mpg.de/vmssig/src/c/OPCOM-TO-PTD.C
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 08:50 PM
06-24-2007 08:50 PM
Re: Capture output from REPLY/STATUS
thanks for the example. I have some problems with reading the example, because it's all on one line and several #include statements are empty (there is nothing behind #include)
Is it possible to supply the example in a more readable format?
thanks
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 08:54 PM
06-24-2007 08:54 PM
Re: Capture output from REPLY/STATUS
go to
http://wwwvms.mppmu.mpg.de/vmssig/src/C/
and find the line with the URL to OPCOM-TO-PTD
Download the file as .C and open with notepad. It works for me.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 08:52 AM
06-25-2007 08:52 AM
Re: Capture output from REPLY/STATUS
I went and looked at some of those
modules, there are all unreadable from a
browser. What can Geni use to retrieve it
in a readable format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 09:25 AM
06-25-2007 09:25 AM
Re: Capture output from REPLY/STATUS
Yes they seem unreadable from limited functionality windoze browsers.
But do as Volker told you. Go to the directory above it, find the line with opcom-to-ptd (alphabetic), right click "Save Target as". Now open and voila.
From VMS the LYNX browser has no problem directly displaying the file and print --> save-to-file--> be happy.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 10:36 AM
06-25-2007 10:36 AM
Re: Capture output from REPLY/STATUS
See what you think. I posted this to dcl.OpenVMS.org as well.
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 10:39 AM
06-25-2007 10:39 AM
Re: Capture output from REPLY/STATUS
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 08:07 PM
06-25-2007 08:07 PM
Re: Capture output from REPLY/STATUS
$ DEFINE SYS$COMMAND TNA0:
$ REPLY /ENABLE /TEMP
$ REPLY /STATUS
The log file can then be interrogated.
For a much more fluid solution, use IAM:Consoles from Itheon, which you can script to take specific actions dependent on the text it sees.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 09:57 PM
06-25-2007 09:57 PM
Re: Capture output from REPLY/STATUS
Robert A,
That is as simple as I hoped it to be! But those commands don't work for me in a batch job. I've tried it on I64 and Alpha, and for TNA0: and OPA0:. Nothing returned in the log file.
$ exit 1 !SYLOGIN
$ SHOW QUEUE SYS$BATCH
Batch queue SYS$BATCH, available, on AUC051::
Entry Jobname Username Status
----- ------- -------- ------
79 REPLY_STATUS SYSTEM Executing
$ DEFINE SYS$COMMAND TNA0:
$ REPLY /ENABLE /TEMP
$ REPLY /STATUS
$ WAIT 00:01:00
SYSTEM job terminated at 26-JUN-2007 19:06:15.05
Robert B,
Nice and simple, but I'm looking for the request text, not a reply.
Volker,
I understand now that we may need a pseudo-terminal to do this. The code compiles with warnings on our system, but still runs. It needs to be running before the a request is posted, rather than obtain the current status of outstanding requests as per "reply/status".
Geni,
I'd be interested in how you go as I'm not a C programmer.
Thanks,
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 10:20 PM
06-25-2007 10:20 PM
Re: Capture output from REPLY/STATUS
did you look at the $SNDOPR system service ?
This service can send an OPC$_RQ_STATUS request and receive a list of outstanding requests in a mailbox.
There does not seem to be an example around for this type of operation.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 10:40 PM
06-25-2007 10:40 PM
Solutionthere is an example available:
Search for OPC$_RQ_STATUS in Google Groups
and look at the thread from 21-SEP-2000 titled:
Alternative to REPLY/ENABLE=TAPES ?
http://groups.google.de/group/comp.os.vms/browse_frm/thread/8577108b24e58802/80ca0b0a765b501d?lnk=st&q=OPC%24_RQ_STATUS&rnum=2&hl=de#80ca0b0a765b501d
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 11:11 PM
06-25-2007 11:11 PM
Re: Capture output from REPLY/STATUS
Thanks. I found that example today, but I was still wondering why it doesn't quite work for me.
Run gives no output, but it does enable itself ans an operator console. Interesting thing is I do get the output when run in debug mode with "set mode screen" turned on and stepping. But no output when not stepping - seems bizarre, but leads me to think that I have some logical wrong or something. Still working on it.
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 11:16 PM
06-25-2007 11:16 PM
Re: Capture output from REPLY/STATUS
I downloaded, compiled and linked the example. Worked for me, once I turned on OPER privilege ;-)
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 01:38 AM
06-26-2007 01:38 AM
Re: Capture output from REPLY/STATUS
The files are served by a VMS web server (OSU HTTPD), and all source files are correctly sent as text/plain.
There will be no problem downloading the files on a VMS (or Unix) system.
On windows systems there are the usual problems: the mime-type is ignored, so windows handles it according to the filename-extension, not as text files.
After downloading in binary mode, notepad is too simple to handle files of records, which are not
Use a more clever text editor!
All files in /vmssig/... are for VMS, and meant to be used on VMS.
(And although my desktops are all Linux, I have no problems to display the VMSSIG repository with Mozilla/Firefox ...)
Cheers, and enjoy wwwvms.mppmu.mpg.de as long as it exists !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 05:28 PM
06-26-2007 05:28 PM
Re: Capture output from REPLY/STATUS
And yes, it works for me on Alpha VMS V7.3-1. A perfect solution if I can get it to go on I64 VMS V8.3. Working on it.
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007 08:12 PM
07-03-2007 08:12 PM
Re: Capture output from REPLY/STATUS
The code example (attached) now works on I64, when it includes a printf statement immediately before the sys$qiow call.
Code snippet ...
for (;;) {
printf ("%s\n", ""); /* makes it work on I64, VMS V8.3, HP C V7.2-001-50G14 */
status = sys$qiow (0, mbx_chan, IO$_READVBLK|IO$M_NOW, &iosb, 0, 0,
&reply, OPC_BUFSIZ, 0, 0, 0, 0);
printf ("%s %i\n", "..status ",status);
printf ("%s %i\n", "..iosb ",iosb[0]);
Without this printf, sys$qiow immediately returns %SYSTEM-W-ENDOFFILE, end of file ...
$ run OPCOM_STATUS
..status 1
..iosb 2160
$
With this printf, it works as expected ...
$ run OPCOM_STATUS
..status 1
..iosb 1
%%%%%%%%%%% OPCOM 4-JUL-2007 17:10:59.89 %%%%%%%%%%%
Operator _AUC051$FTA95: has been enabled, username SYSTEM
..status 1
..iosb 1
%%%%%%%%%%% OPCOM 4-JUL-2007 17:10:59.89 %%%%%%%%%%%
Operator status for operator _AUC051$FTA95:
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY
..status 1
..iosb 1
%%%%%%%%%%% OPCOM 4-JUL-2007 17:10:59.89 %%%%%%%%%%%
Operator status for operator _AUC051$FTA95:
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER, SECURITY
..status 1
..iosb 2160
$
Not being a C programmer, I can't see what difference it should make. But, no doubt there is an explanation.
Platform: I64, VMS V8.3, HP C V7.2-001-50G14
Regards,
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007 08:38 PM
07-03-2007 08:38 PM
Re: Capture output from REPLY/STATUS
I think the problem you have is the qio
Exchange
IO$_READVBLK|IO$M_NOW
with IO$_READVBLK|IO$M_WRITERCHECK,
This may solve the problem
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2007 05:28 AM
07-04-2007 05:28 AM
Re: Capture output from REPLY/STATUS
I just removed the '|IO$M_NOW' modifier and it works fine for me on OpenVMS I64 V8.2.
You want to wait for a MBX message, so why specify IO$M_NOW, which will terminate the QIOW, if no message is available.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2007 10:20 PM
07-18-2007 10:20 PM
Re: Capture output from REPLY/STATUS
Removing IO$M_NOW causes the code to loop and wait for future requests, like the OPCOM-TO-PTD eaxample, rather than display the current reply/status and then exit.
Regards,
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2007 11:51 PM
07-18-2007 11:51 PM
Re: Capture output from REPLY/STATUS
just capturing the 'current status' may need some mechanism with a timer, as you cannot rely on the number of OPCOM messages shown as a result of REPLY/STATUS.
You could try to put a wait instead of the printf.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2007 02:09 PM
07-19-2007 02:09 PM
Re: Capture output from REPLY/STATUS
I'm continuing to work with the code examples.
Lester
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2007 05:47 PM
07-19-2007 05:47 PM
Re: Capture output from REPLY/STATUS
as I mentioned before, I wrote now a program which is capturing Opcom messages and transfer them to a Unix Syslog Server. Because we will use it on many machines, I created a VMSINSTALable Kit. If you are interested I can post the kit here. The problem will be that the Release Notes, the helpfile and the comments in the startup/shutdown commanfile is in german.
Let me know if you are interested
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2007 06:41 PM
07-19-2007 06:41 PM
Re: Capture output from REPLY/STATUS
Sounds a lot simpler than most of these ideas.
Starting LAT is not such a big deal.