Messages in this thread | | | Date | Mon, 23 Aug 1999 13:03:02 +0100 (BST) | From | Tigran Aivazian <> | Subject | Re: accessing kernel structures |
| |
Hi,
you wrote:
> I want to make a program that gives system information by > directly accessing kernel structures. Very good idea. To access kernel data structures you have the following options:
1. Write crash(1) utility for Linux. While you are at it, please also implement crashdump mechanism in the kernel so one can browse not only live system but do post-mortem analysis as well.
2. Use KME - Kernel Memory Editor. Available under:
http://robertl.freeservers.com/kme/
3. Use plain old gdb(1) on the core file in /proc. Well, using the standard /proc/kcore won't work because it is in old aout format so you will need this patch:
http://www.ocston.org/~tigran/patches/elf-kcore-2.3.3.patch
(it is for 2.3.3 but you will trivially update it for 2.3.15-pre2 which is what you ought to be running at this time). This patch (by David Howells) will give you /proc/kcore_elf which is same as /proc/kcore but in ELF format.
> 1) One way is to make my own system calls and link it to > kernel. no good. Things change quickly and you will have to keep changing your kernel patches to catch up. It would be easier to keep crash(1) up to date, but even that is so horrendously complex that no one (to my knowledge) ever attempted this so far. Be thou the first and fail, that others following you, may succeed :)
> 2) Another way is to make a kernel module and link it by > insmod. also no good. For the same reason as above.
> Is there any other way to access kernel information. Yes, using /dev/kmem and the system map to convert symbols to addresses - this is how crash(1) works.
> I do not want to use the proc file system. Ok.
Regards. ------ Tigran A. Aivazian | http://www.sco.com Escalations Research Group | tel: +44-(0)1923-813796 Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |