Re: set audit/listener
- From: Pierre <pierre.bru@xxxxxxxxx>
- Date: Thu, 10 Apr 2008 18:18:20 -0700 (PDT)
thanks Jim.
I think DCL will be to slow in case of huge flow of audit. I will
have to write a program ;)
for the language, C examples are fine, but I prefer to write Pascal
Pierre.
On Apr 11, 2:25 am, Jim Duff <spam.t...@xxxxxxxxx> wrote:
Pierre wrote:
hi,
as far as I understand the help, I may redirect audit events to a
device, say a mailbox.
With SET AUDIT/LISTENER, you are not redirecting, merely asking the
audit server to send you a copy of audit messages.
just not to reinvent the wheel, does anyone have an example of a
program which "listen" such events thru a mailbox ?
I don't have one off hand (I do, but I can't post it here), but it's a
very simple bit of code.
- Set up a permanent mailbox with a call to SYS$CREMBX().
- Arm an AST to fire when a message is delivered to the mailbox that
reads the message, does something with it, and re-arms the AST.
- Issue your SET AUDIT/LISTENER command.
To interpret the information in the audit message, you need to see the
"Systems Management Utilities Reference Manual" here:
<http://h71000.www7.hp.com/doc/83final/6048/6048pro_090.html#
audit_record_format>
You don't mention what language you'd like an example written in.
Here's an example of creating (and deleting) a permanent mailbox in C:
<http://www.eight-cubed.com/examples/framework.php?file=sys_delmbx.c>
To arm a read attention AST for the mailbox, see the mailbox chapter in
the "I/O User's Reference Manual" here (I'm using the old version of the
manual because PDF sucks):
<http://h71000.www7.hp.com/doc/732FINAL/aa-pv6sf-tk/00/00/36-con.html#
mailboxessetattentionastfunction>
An example of reading from a mailbox using SYS$QIO() can be seen here:
<http://www.eight-cubed.com/examples/framework.php?file=sys_sndopr.c>
Now, in DCL :-)
Session 1> create/mailbox/perm audit_mbx
Session 1> open/read audit_mbx audit_mbx
Session 1> read audit_mbx record
Session 2> set audit/listen=audit_mbx
Session 2> ! Cause an audit event which will cause the read in session 1
Session 2> ! to complete.
Session 1> close audit_mbx
Session 2> set audit/nolisten=audit_mbx
Session 1> delete/mailbox audit_mbx
HTH,
Jim.
--www.eight-cubed.com
.
- Follow-Ups:
- Re: set audit/listener
- From: P. Sture
- Re: set audit/listener
- References:
- set audit/listener
- From: Pierre
- Re: set audit/listener
- From: Jim Duff
- set audit/listener
- Prev by Date: Re: Immediate:TOLAS Programmer in McHenry, IL - DIRECT CLIENT Requirement
- Next by Date: Re: Php invented by a former DECcie ?
- Previous by thread: Re: set audit/listener
- Next by thread: Re: set audit/listener
- Index(es):
Relevant Pages
|