- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: OPERATOR.LOG flush interval or unpriv user tri...
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
Discussions
Discussions
Forums
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
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
тАО08-11-2010 03:16 AM
тАО08-11-2010 03:16 AM
OPERATOR.LOG flush interval or unpriv user triggers
http://h71000.www7.hp.com/wizard/wiz_7763.html
but it doesn't help much.
Basically, I need an unprivileged user to be able to trigger an event after an error.
Users will typically have TMPMBX, NETMBX and cannot have write access to files/directories they do not own.
I've dedicated an OPCOM class and have the DCL sending REQUEST messages to this class. then I have abatch job running under a priileged account which interrogates the OPERATOR.LOG for actions whcih it then completes.
The "problem" is that the OPERATOR.LOG file only seems to get flushed periodically (however, it seems to be more often than the every 5 minutes mention in the original article).
This delay isn't the end of the world but I'd like to reduce it if at all possible so was wondering if there have been any developments in this area in recent years (we are running OpenVMS v8.3 on Alpha) or whether the folks here have any other ideas on how an unprivileged user can send trigger events.
In any event both the trigger code and the listener code needs to be in DCL.
Cheers
Craig A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 04:26 AM
тАО08-11-2010 04:26 AM
Re: OPERATOR.LOG flush interval or unpriv user triggers
A much simpler solution could be:
The privileged process (request receiver) establishes a permanent mailbox.
Then it loops to read the mailbox and filters/executes the requests message.
The unprivileged processes (requesters) do a write to the permanent mailbox.
The mailbox-write can be in the simplest case a DCL WRITE.
Mailbox I/O doing e.g. non-blocking read/write can be found in Ian Miller's MBU utility (freeware archives),
or in my MBX routines
http://wwwvms.mpp.mpg.de/~huber/util/main/mbx.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 06:51 AM
тАО08-11-2010 06:51 AM
Re: OPERATOR.LOG flush interval or unpriv user triggers
You mentioned in your response that
> The mailbox-write can be in the simplest case a DCL WRITE.
What would be the sequence of DCL commands to achieve this? Similarly, what would be the sequence to retrieve the message?
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 07:32 AM
тАО08-11-2010 07:32 AM
Re: OPERATOR.LOG flush interval or unpriv user triggers
OPEN/READ/WRITE mbx MBAnnn: (or RQMBX:)
READ/ERROR=RFAIL mbx symbol
WRITE mbx "my request"
DCL mailbox read/write is synchronous, i.e. it does not return from read until a message is written into it.
If kind of async write/read is needed (queuing for several writers), then non-blocking write (and/or read) has to be done using QIOs as in the programs I mentioned in my previous reply.
In fairly recent VMS versions (I think 7.3-2 and later), permanent mailboxes can be created by CREATE/MAILBOX commands.
In earlier versions, one needs a program like my CREMBX, or a trick (I think it is described in the VMS FAQ): create a subprocess, which creates a temporary mailbox, then defines a group or system logical to point to it for the users.
An example of a mailbox-creating subprocess is e.g.
http://www.mpp.mpg.de/~huber/vmssig/src/COM/CREATE_MBX.COM CREA_MAILBOX_FROM_DCL.COM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 07:51 AM
тАО08-11-2010 07:51 AM
Re: OPERATOR.LOG flush interval or unpriv user triggers
An example of a mailbox-creating subprocess is e.g.
http://www.mpp.mpg.de/~huber/vmssig/src/COM/CREA_MAILBOX_FROM_DCL.COM
Here replace the define/job by define/group or define/system if the mailbox should be accessible outside a job tree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 08:19 AM
тАО08-11-2010 08:19 AM
Re: OPERATOR.LOG flush interval or unpriv user triggers
if You create the mailbox using the above sub-process method, and if creator and user (request writer) is not the same UIC, then the protection of the mailbox must be set to allow writing and logical IO:
set protection=G:RWL/device MBAnnn:
or
set protection=W:RWL/device MBAnnn:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 03:08 PM
тАО08-11-2010 03:08 PM
Re: OPERATOR.LOG flush interval or unpriv user triggers
V8 and above can do this all from DCL.
Your action process runs with whatever privilges are needed to perform the actions, plus SYSNAM anmd PRMMBX. It starts with:
$ CREATE/MAILBOX/PERMANENT TRIGGER_EVENT
$ OPEN/READ TRIGGER TRIGGER_EVENT
its event loop looks like:
$ Loop: READ TRIGGER EVENT
$ parse and execute event
$ GOTO Loop
You should have a "terminate" event, which does:
$ CLOSE TRIGGER
$ DELETE/MAILBOX TRIGGER_EVENT
You should also set protection and/or ACL on TRIGGER_EVENT so only authorized users can send messages. I'd suggest using an identifier GRANTed to authorized users.
Note that TRIGGER_EVENT becomes a SYSTEM logical name, so make sure whatever name you choose doesn't clash with anything else.
From your unprivileged users you could OPEN the mailbox, WRITE then CLOSE, but my preference would be a one liner:
$ PIPE WRITE SYS$OUTPUT "Some Event" > TRIGGER_EVENT
This avoids the issue of the mailbox being left open, which would prevent the action process from closing and deleting it, since it's a single PIPE command it executes in the context of the current process, so there's no process creation cost.
A safer version of the user side would be:
$ PIPE WRITE SYS$OUTPUT "Some Event" > 'F$TRNLNM("TRIGGER_EVENT")'
The difference is the first would silently create a file in the local directory if the mailbox didn't exist. The second version would fail with:
%DCL-W-INCREDSYN, incomplete redirection syntax; supply missing file parameter
so your sender would know it failed.