Process Monitor
- From: m.katheeja@xxxxxxxxx
- Date: Thu, 30 Aug 2007 21:07:56 -0700
I want to do process montoring for a list of processes in Linux.
I am using proc file system to get the snapshot of all the running
processes. I do the following procedure to find the process IDs for
the list of process names
1. Get the process snapshot from proc filesystem
2. Read the status file from each process directory
3. Get the process name from status file
4. Map the process name with the list of processes which needs to be
monitored.
In the above procedure the performance will be degraded since the
status file for all the processes running in the system has to be
opened to read the process name.
The other method to get the process snapshot is by using kvm_* library
functions. As I understood kvm_getproc function gets the process
snapshot by reading the kernel virtual memory(/dev/kmem).
Queries:
1. How to map the process name with the process ID using kvm_*
functions?
2. The linux kernel 2.6.2 supports kvm. Is the kvm_* library functions
supported by this version of linux.
3.One more method is to get the process snapshot by reading the kernel
memory.Which among the above three methods is better in terms of
functionality, performance and scalability for monitoring a list of
processes
.
- Prev by Date: Re: Dan C., you're right about leafnode and cable (and some slrn stuff)
- Next by Date: Where the F**K do I begin?
- Previous by thread: What's this?
- Next by thread: Where the F**K do I begin?
- Index(es):
Relevant Pages
|