From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8d3a25d5bf9b9cfb,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-01-04 05:54:48 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!lerc.nasa.gov!purdue!mentor.cc.purdue.edu!vic.cc.purdue.edu!abe From: abe@vic.cc.purdue.edu (Vic Abell) Subject: info on DEC OSF/1 V1.3 (112) proc/user structures needed Message-ID: Keywords: lsof, open files Sender: news@mentor.cc.purdue.edu (USENET News) Organization: Purdue University Date: Tue, 4 Jan 1994 13:44:13 GMT I maintain and freely provide a program called lsof -- for LiSt Open Files. It is a descendant of a freely distributed program (found in the comp.sources.unix archive), called ofiles, and the fstat program from 4.2BSD-Tahoe. Lsof displays files open by active processes. It displays information about network files (sockets), NFS files, and regular files, and its filters enable searching for specific instances of open files. Currently lsof runs on a number of Unix OS versions, including AIX for the RISC/System 6000, HP-UX for the HP 700 series, NeXTStep for the NeXT work station, and SunOS and Solaris for Sun work stations. (NeXTStep, by the way, is BSD Unix layered on Mach, so I know that a port to that kind of Unix system is possible.) Now I am trying to port it to OSF/1 for the DEC Alpha series. My development system is running version 1.3 -- uname says "V1.3 112". At the advice of someone already familiar with DEC OSF, I am trying to use the table(2) function to access process and user structure information. The user structure should lead to a list of the files open by the process through its u_ofile[] table of file structure pointers, and the current working and root directory vnode pointers. Unfortunately, the pseudo user structure that the TBL_UAREA option of table(2) returns has values in neither the u_ofile[] table, nor u_cdir, nor u_rdir. Without these file structure and vnode pointers, lsof cannot be ported to DEC OSF. Is there anyone reading this list with sufficient knowledge of the internals of the DEC OSF kernel who can help me find a way that lsof can obtain these values? Should I be trying to read the actual proc table and its associated utask structures via /dev/kmem instead? I would appreciate replies via email to . Thanks in advance. Vic Abell