Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Chandigarh, India
    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
    West Yorks
    There are already many apps that do that. Top, htop, ksysguard etc. I personally prefer ksysguard and htop.

  4. $spacer_open
  5. #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

  6. #5
    Just Joined!
    Join Date
    Sep 2007
    Lafayette, IN
    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.

  7. #6
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    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.

  8. #7
    thnx but wld it betta to use system calls or shell commands in the code???

  9. #8
    Linux Guru
    Join Date
    Nov 2007
    Córdoba (Spain)
    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