pjy100@csc.anu.oz (07/13/90)
Can anyone help ???? I wish to obtain information about every process currently on the system from the two data structures "proc" and "user" (see /usr/include/sys/proc.h & /usr/include/sys/user.h) from within a "c" program, but I cannot find a system call that will retrieve this information from the system tables. How can this be done? (pstat & ps must use the method I require). SunOS provides the calls "kvm_nextproc" & "kvm_getu" for doing what I need, is there an equivalent method for Ultrix 3.1 on a DS3100. Peter Young (systems prog. Mt Stromlo Observatory)
alan@shodha.dec.com ( Alan's Home for Wayward Notes File.) (07/13/90)
In article <2371.269db532@csc.anu.oz>, pjy100@csc.anu.oz writes: > Can anyone help ???? > > I wish to obtain information about every process currently on the system > from the two data structures "proc" and "user" (see /usr/include/sys/proc.h > & /usr/include/sys/user.h) from within a "c" program, but I cannot find a > system call that will retrieve this information from the system tables. > How can this be done? (pstat & ps must use the method I require). SunOS > provides the calls "kvm_nextproc" & "kvm_getu" for doing what I need, is there > an equivalent method for Ultrix 3.1 on a DS3100. Pstat, ps, top, monitor, etc all do it basically the way; open /dev/kmem, seek to an interesting place and read the data. Getting the proc structure is pretty easy. Getting a copy of the user structure is harder because you have to deal with the fact that it might swapped out. I'd suggest looking for a copy of top or monitor that you can copy and borrow from them. I think monitor can be found on gatekeeper.dec.com. If you think having a system call interface to some of these data structures would make your life so much easier please submit an SPR with the suggestion. If there is sufficient popular interest it might get added someday. > Peter Young (systems prog. Mt Stromlo Observatory) -- Alan Rollow alan@nabeth.enet.dec.com
dob@tws1.Berkeley.EDU (David L. Brooks) (07/15/90)
In article <2371.269db532@csc.anu.oz>, pjy100@csc.anu.oz writes: |>Can anyone help ???? |> |>I wish to obtain information about every process currently on the system |>from the two data structures "proc" and "user" (see /usr/include/sys/proc.h |>& /usr/include/sys/user.h) from within a "c" program, but I cannot find a |>system call that will retrieve this information from the system tables. |>How can this be done? (pstat & ps must use the method I require). SunOS |>provides the calls "kvm_nextproc" & "kvm_getu" for doing what I need, is there |>an equivalent method for Ultrix 3.1 on a DS3100. |> |>Peter Young (systems prog. Mt Stromlo Observatory) if you get some good info, would you consider posting, or sending me a copy, please? sorry fellow netters, i tried email to Mr. Young, but it was bounced. also please excuse the *long* disclaimer. it originates with our legal department; at least they now let us post. ------------------------------------------------------------------------------ David L. Brooks Idaho National Engineering Lab. INTERNET: dob@INEL.GOV POB 1625 M.S. 1206 Phone: (208) 526-0826 Idaho Falls, Id. 83415 FAX: (208) 526-1419 ------------------------------------------------------------------------------ Neither the United States Government nor the Idaho National Engineering Laboratory nor any of their employees, makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the Idaho National Engineering Laboratory. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government nor the Idaho National Engineering Laboratory, and shall not be used for advertising or product endorsement purposes.