From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,cdff7239340b3d51 X-Google-Attributes: gid1164f8,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: How to get digital-unix kernel address memory map ? Date: 2000/02/01 Message-ID: <87783k$8cd$1@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 580436198 Distribution: world References: <38965ADD.36EE90E1@klnet.co.kr> X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 949429172 8589 16.82.16.67 (1 Feb 2000 18:19:32 GMT) Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) NNTP-Posting-Date: 1 Feb 2000 18:19:32 GMT Newsgroups: comp.sys.dec In article <38965ADD.36EE90E1@klnet.co.kr>, Kim CheaKyu writes: >I want to write program like monitor, top.. etc. >These programs use /dev/kmem device file. kmem device file map into >kernel address space. >I want to know kernel address map. You want to either get a copy of the system sources so that you can look at the all the drivers and subsystems to see what data structures are available and what they're called, or look at the suite of existing programs to see what they use. Many kernel data structures do have documented, callabale interfaces to get information from them. Take a look at the getsysinfo(2) system call and the include files it uses. Other callable interfaces are not documented, making them subject to change. For those you need example programs or kernel sources. You can expect a kernel source license to be fairly expensive. Some interesting data structures don't have callable interfaces. In these cases you need to know the structure of the data and the name of the data structure. Many data structures are defined in system include files and you may be able to derive the name from a nm(1) listing of the kernel. Using dbx(1) or a custom program, you can look at the data and see whether it is interesting. The programs you mentioned can serve as example of how to translate data structure names to addresses and how to access those addresses within kernel memory. -- Alan Rollow alan@nabeth.cxo.dec.com