[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How Can I develop a process monitor?

Abel Mu?oz Alcaraz wrote:
> Hi everybody,
> 	I want to develop a process monitor (like TOP) in a kernel module.
> 	I think I must get the '/proc' superblock and replace the
> inode_operations->mkdir,rmdir,create and open.
> 	Is this correct?
> 	Can I get the /proc superbloc with 'struct super_block * get_super(kdev_t
> dev' function?
> 	I am going to develop this module in C.
> Thanks in advance.
> -Abel.

A kernel module? So basically... you would insert the module and
your app would appear on a unused virtual console? Or is this just
a interface to /proc that you are building, and then a separate
app to talk to it?

(for those in a hurry, the point is in the next paragraph)
I'm working on a process manager for school. I plan on releasing
mine if it will be of any use [1]. The basic requirements of my
assignment is to write a process manager that is interactive and
console-based where you can mark processes and kill them etc. The
requirements call for SVR4 proc support, so a Linux port is not
required, but I'll be supporting it after I turn in the lab. The
SVR4 support is slow, because I haven't root access on school
computer....so there's some complications there.

Anyway, to get to the point, I had some questions regarding libproc
as a way of interfacing the /proc filesystem. I think it's great to
have openproc/closeproc etc...but the way my app is built, using
openproc is inefficient...I want to know whether or not I should
replace my process cache with a simple interface to libproc, or to
leave libproc out all together and write my own interface? So far,
based on my experience with the libproc in stable, my plan is to
leave libproc out. But I'll be trying the unstable libproc tonight..


[1] http://wsmake.org/~mike/software/dwnlds/pm/

( Mike Brownlow | http://wsmake.org/~mike/ | http://wsmake.org/ )
( "A scorner seeketh wisdom, and findeth it not: but knowledge  )
( is easy unto him that understandeth." Proverbs 14:6           )

Reply to: