home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!ucbvax!ko.hhs.dk!ARNE
- From: ARNE@ko.hhs.dk (Arne Vajhxj)
- Newsgroups: comp.os.vms
- Subject: Re: Tracing mailbox access
- Message-ID: <214F75A237DF607D4B@sb.hhs.dk>
- Date: 21 Jul 92 17:02:00 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 44
-
- > >>Since it's been a little while since I went tracing through system tables, I'm
- > >>hoping someone has trod this path before me.
- > >
- > >No such hacking is needed.
- > >
- > >>What I have is a process which creates a mailbox with a read attention AST.
- > >>What I want to do is get the PID of the reader. Obviously, the information is
- > >>in VMS since analyze/sys can get it, but what's the best (or any) way to get
- > >>from a mailbox name to a pid of a referencing process? Or would I have to go
- > >>the other way and hunt for a process with an allocated channel?
- > >
- > >When you do a write to a mailbox, the PID of the reader is passed in the IOSB.
- > >When you read a message from a mailbox, the PID of the writer of the message
- > >is passed in the IOSB. Exceptions for writes with IO$M_NOW, etc. Details
- > >in the Grey Wall.
- >
- > I think the intended question was actually "How can I determine who queued the
- > read request that triggered the read attention AST BEFORE I write something to
- > the mailbox?" That WOULD require some hacking.
-
- Well I interpret the original question as: Process with PID xxxxxxxx create
- a mailbox MBAyyyy and queues a read attention AST to it - the question is
- how to "translate" from MBAyyyy to PID xxxxxxx for another user.
-
- My suggestion would be something like:
-
- lock pages in memory
- goto kernel mode
- lock sched (or iosomething ?)
- call ioc$searchdev to translate from device-name to ucb-address
- the mb_r_ast field in the ucb contains an acb-address
- the pid field in the acb contains what we want
- unlock sched (or iosomething ?)
- return
-
- But I have probably missed something ...
-
- Arne Vajhxj
-
- Arne Vajhxj local DECNET: KO::ARNE
- Computer Department PSI: PSI%238310013040::ARNE
- Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
-
-
-