CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    dehli
    Posts
    3

    how can i check the running processes on linux

    hi...
    i m a newbie on linux. i want to ask that how can i check the processes runing on my system at a time. or to check how many programs running on my system. tell me the command. i mean i want to look the names of processes running on my system. thanku.
    anjlee sharma

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    You need to use the ps command. ps will give you, by default,
    only the list of programs running under your account ... and you
    probably want to know ALL programs running. ps comes to the
    rescue, though: I frequenly use -ef to show all fields and for all
    users. If you're looking for all programs of a particular name,
    filter through ps's output by piping it to grep. If you want to count
    the number of programs that match a particular grep filter, pipe
    grep's output to wc -l. Here are some examples:
    Code:
    ps // show all programs running under your login
    ps -ef // show all programs running on the system
    ps -ef | grep apache // show all programs running that have the
                                     // phrase 'apache' 
    ps -ef | grep apache | wc -l  // show the count of above
    The | is just a Shift+\.

    --Paul

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured