🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #620

Re: nlist - getting it to work

#620
From: Vic Abell
Date: Thu, 07 Jan 1993 19:42
24 lines
1705 bytes
In article <1ig7qaINNh1b@DIALix.oz.au> mah@DIALix.oz.au (Marcus Hayes) writes:
>The problem is that I'm converting ofiles to work on the
>sequents (running ptx) but the nlist calls succeeds but
>no values are returned for symbols proc and nproc,

Those symbols may not exist in the SYSV-based PTX kernel's name list.  The
"nproc" symbol is often replaced by the v_proc element of the var structure
(see <sys/var.h>), usually named "v" by the kernel.

I don't know how PTX defines and addresses the process table.  You might be
able to find out by running nm on /dynix or /unix or /vmunix or whatever PTX
calls the kernel file and looking for symbols with "proc" in them.  Look for
variants, too, like "_proc" -- DYNIX 3.0.x uses it and "_nproc".

Discovering the way a kernel describes its process table is always an
adventure.  You should look for special functions to read the process (and
even user) table.  SGI IRIX, for example, has syssgi; and SunOS, of course,
has the kvm_* functions.

Finally, you might try porting lsof instead of ofiles.  Lsof (for LiSt Open
Files) is my version of a multi-platform ofiles successor.  It's available
via anonymous ftp from ftp.cc.purdue.edu (128.210.24.1) in pucc/lsof2.tar.Z.

Vic Abell -- a contributor to ofiles
Technical Details
Message-ID: <C0I1EI.6zo@mentor.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe
References: <1ig7qaINNh1b@DIALix.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe
From: abe@mace.cc.purdue.edu (Vic Abell)
Newsgroups: comp.sys.sequent
Subject: Re: nlist - getting it to work
Message-ID: <C0I1EI.6zo@mentor.cc.purdue.edu>
Date: 7 Jan 93 19:42:17 GMT
References: <1ig7qaINNh1b@DIALix.oz.au>
Sender: news@mentor.cc.purdue.edu (USENET News)
Organization: Purdue University
Lines: 24