cgd@typhoon.Berkeley.EDU (Chris Demetriou) (12/04/90)
I'm sure someone can help me with this: I'm trying to write a program (in some ways similar to ps) for Apollo DN3500s and DN4500s running DomainOS 10.2 (soon 10.3) which needs to get a list of running processes (and their pids). Apollo's documentation on this subject is, umm, not quite decipherable and/or existent. I was wondering if someone out there know what calls can be made, and how to call them to get the desired information. If it makes a difference, the program making the calls will be run as root. Thanks in advance. Chris Demetriou OCF Staff/Root Please reply to: cgd@ocf.berkeley.edu
krowitz@RICHTER.MIT.EDU (David Krowitz) (12/04/90)
You can try using the Apollo-specific call proc2_$list. Documentation is available in the Aegis environment under "help calls proc2", or in the BSD environment under "man proc2". As you have noticed undoubtably, /dev/kmem is not part of Domain/OS. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter.mit.edu@eddie.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)
rees@pisa.ifs.umich.edu (Jim Rees) (12/05/90)
In article <9012041351.AA02186@richter.mit.edu>, krowitz@RICHTER.MIT.EDU (David Krowitz) writes:
You can try using the Apollo-specific call proc2_$list. Documentation
is available in the Aegis environment under "help calls proc2", or in
the BSD environment under "man proc2".
It's nice that this interface has finally been released, but I noticed that
they haven't released any of the good stuff. In particular, the info struct
given in the include file doesn't even have the Unix process IDs in it! Rest
assured that there is all kinds of interesting stuff in there if you pass in
a big enough info struct. A little detective work will reveal it to you.
Among other things:
vmstat stuff (number of page faults, disk io, etc)
Unix process IDs for self, parent, pgroup
process name
cpu usage
rees@pisa.ifs.umich.edu (Jim Rees) (12/05/90)
In article <4e65b29e.1bc5b@pisa.ifs.umich.edu>, rees@pisa.ifs.umich.edu (Jim Rees) writes:
It's nice that this interface has finally been released...
A former Apollo employee has pointed out to me that the proc2_$info
interface has always been released. I should know better, since my name is
even in the change log at the top of proc2.ins.pas, from December 1983.
krowitz@RICHTER.MIT.EDU (David Krowitz) (12/05/90)
Yeah, but since HP is dumping the entire Aegis environment, it doesn't make a lot of sense for a user to build anything other than a quick and dirty program around it. The trick is to get similar interfaces built into OSF and/or SYS V Unix so we can quit mucking about the kernal's address space with /dev/kmem. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter.mit.edu@eddie.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)
rtaylor@tron.UUCP (Randy Taylor) (12/06/90)
In article <1990Dec4.103434.28962@agate.berkeley.edu> cgd@typhoon.Berkeley.EDU (Chris Demetriou) writes: >I'm sure someone can help me with this: > >I'm trying to write a program (in some ways similar to ps) >for Apollo DN3500s and DN4500s running DomainOS 10.2 (soon 10.3) >which needs to get a list of running processes (and their pids). > >Apollo's documentation on this subject is, umm, not quite >decipherable and/or existent. > >I was wondering if someone out there know what calls can be made, >and how to call them to get the desired information. >If it makes a difference, the program making the calls will be >run as root. > >Thanks in advance. > >Chris Demetriou >OCF Staff/Root > >Please reply to: >cgd@ocf.berkeley.edu Chris - Yes indeed there is a way to get pids AND corresponding process names. I recently copyrighted a program that monitors users activity. It they don't do anything for 15 minutes or so, the program logs them out. Part of the program is a process monitor that gets process ID's and matches them against both process owners and process names. Unfortunately, I can't divulge any more than this because the company I work for (Westinghouse) has copyrighted the program and I can't violate our technology transfer rules. Needless to say, what you want to do CAN be done ! Just play with the calls and read the HP/Apollo "Programming with Domain/OS Calls" manual. Many clues lie within. Also, don't expect much help from Apollo on some of the stickier issues. The automatic log-out program I wrote could have been *easily* done better with a simple mod to the scrto (screen time-out) program, but we could not get Apollo (Corporate level) to give us the time of day. There is a wealth of undocumented system calls that perform a *wide* range of things that could easily do what both you and I want. Apollo *will not* even discuss the calls. Ask them about "rm" & "idm" calls and see what happens ! Randy Taylor
cgd@ocf.Berkeley.EDU (Chris Demetriou) (12/06/90)
In article <667@tron.UUCP> rtaylor@tron.UUCP (Randy Taylor) writes: > Needless to say, what you want to do CAN be done ! Just play with the > calls and read the HP/Apollo "Programming with Domain/OS Calls" manual. > Many clues lie within. That manual would be handy, I suppose... Unfortunately, the people who were supposed to keep our documentation stuff in order let it slip through the cracks. That was nothing that a printer, and the files in /usr/include/apollo couldn't fix though. Thank you to all who replied for lending a hand. It worked out very nicely. If anybody'd be interested in some of the undocumented things i've found, feel free to ask - i'll send you the source... Chris Demetriou cgd@ocf.berkeley.edu Replies to: cgd@ocf.berkeley.edu
rtaylor@tron.UUCP (Randy Taylor) (12/11/90)
Chris - I'm ALWAYS interested in the undocumented. Please send me what you have. Thanks, Randy Taylor PS - Just in case my .signature is still hosed : rtaylor@sky00.bwi.wec.com from an Internet site (preferred) rtaylor@tron.bwi.wec.com from an Internet site (alternate) "...you know I have the greatest enthusiam for the mission." HAL 9000 -- rtaylor@sky00.bwi.wec.com from an Internet site (preferred) rtaylor@tron.bwi.wec.com from an Internet site (alternate) "...you know I have the greatest enthusiam for the mission." HAL 9000