Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!ukma!rutgers!att!whuts!homxb!homxc!dwc From: dwc@homxc.UUCP (Malaclypse the Elder) Newsgroups: comp.unix.questions Subject: Re: How do you find the user structure? Message-ID: <4549@homxc.UUCP> Date: 12 Dec 88 17:53:21 GMT References: <214@fesk.UUCP> <13232@ncoast.UUCP> Organization: Legion of Dynamic Discord Lines: 31 In article <13232@ncoast.UUCP>, allbery@ncoast.UUCP (Brandon S. Allbery) writes: > As quoted from <214@fesk.UUCP> by sverre@fesk.UUCP (Sverre Froyen): > +--------------- > | I have tried to get Brandon's sysV version of w to work on my > | National Semiconductor ICM3216 running SysV.2.2. This is a > | demand paged system and, as Brandon points out in the documentation, > | w is unable to locate the user structure. I have looked through > | the system documentation and various include files but I am unable > | to find the solution (I have no source). I suspect I must start > +--------------- > > I've been trying to find it myself, via trial-and-error; I want to use it on > a few demand-paged System V-based machines myself. Anyone know what V.2.2 > and V.3.1 do with the ublock? > > Thanks in advance, all. > it will all depend on the architecture of the machine that it is running on. but in the proc structure for each process (look in /usr/include/sys/proc.h), there should be entries for copies of the page table entries for the u_area. look in the comments for any hints. once you get the entry, just look for the physical page frame that the pages of the u_area is in (they are not necessarily contiguous). you can take it from there. another alternative, if the system also uses segments, is to look at the segment table for the page table of the u_area. this too, should be kept in the proc structure. danny chen att!homxc!dwc