Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!spool.mu.edu!sdd.hp.com!wuarchive!udel!haven!adm!news From: arcege@golem.usmsas.maine.edu (Michael P. Reilly) Newsgroups: comp.unix.wizards Subject: Re: daemon help Message-ID: <25872@adm.brl.mil> Date: 6 Feb 91 19:27:00 GMT Sender: news@adm.brl.mil Lines: 24 Some systems allow a program to access kernal memory (through kmem and possibly swap) for process information. The C routine would be nlist(3), on SunOS, System V, and Ultrix at least. This returns the addresses (in memory) of variables in the executable. Then you can lseek into /dev/kmem to find the process table entry and look for the information there (you may have to lseek into swap as well in the process is swapped out of memory. The command nm(1), also on SunOS, System V and Ultrix, displays the symbol table of the executable to help find which variable names to search for. The system may have /dev/kmem and /dev/swap permissions set for no other access, but since this is a daemon, root ownership would allow access. I would suggest comparing values in the process table (for example, cpu-time, priority, nice-value, etc.) to determine what the process is doing relative to others and your desired values; also check the timing values of the process. I hope this helps! --Michael P. Reilly +=======================================+=====================================+ |Michael Reilly | Inter: arcege@cs.usmsas.maine.edu | |Unix Systems Admin/Analyst | BITNet: arcege@portland.bitnet | |Computer Science Dept. | ip60401@portland.bitnet | |University of Southern Maine | UUCP: (links temporarily down) | |96 Falmouth Street, Portland, ME 04103 | BellNet: (207) 780-4515 | +---------------------------------------+-------------------------------------+