Find the answer to your Linux question:
Results 1 to 8 of 8
hi i want to make a process manager in linux which shows all current processes its users,applications running them,cpu usage and can kill them...hw shld i proceed??plzzz help...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    4

    process manager in linux??


    hi i want to make a process manager in linux which shows all current processes its users,applications running them,cpu usage and can kill them...hw shld i proceed??plzzz help

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Install htop.
    Which distro are you using?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    There are already many apps that do that. Top, htop, ksysguard etc. I personally prefer ksysguard and htop.

  4. #4
    Just Joined!
    Join Date
    Dec 2006
    Posts
    4
    i knw them but i wnt 2 make a s/w myself which does all dis so in dat context hw shld i proceed languages i knw c,c++ and python

  5. #5
    Just Joined!
    Join Date
    Sep 2007
    Location
    Lafayette, IN
    Posts
    83
    If you want to write your own, the easiest way to do that would probably be to take the source code of one you like and re-write it to act how you want.

  6. #6
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    If you want to write your own from scratch (as some sort of exercise or whatever), the problem reduces to "how can I figure out what processes are active, and information about them?".

    The answer, dear reader, is the proc filesystem. Under /proc you will find lots of information for every process: there are a bunch of numbered directory: each of these represents a process (the number is the PID). In this directory, you can find information about memory and CPU usage, amongst other things.

    So I suggest you read up on proc. It has a man page, and I'm sure there are many guides online.

  7. #7
    Just Joined!
    Join Date
    Dec 2006
    Posts
    4
    thnx but wld it betta to use system calls or shell commands in the code???

  8. #8
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by samk_2104 View Post
    thnx but wld it betta to use system calls or shell commands in the code???
    System calls, and /proc fs is all you need.

    It's not a good idea to fork shell commands from a program to monitor processes, because then you will be getting more useless processes in the monitor.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •