![]() The possible states for a process are R (Running), D (non-interruptible sleep), S (interruptible sleep), Z (Zombie or terminated) or T (stopped). If you just to see the processes that have a specific command name or program name, such as sshd, kate or firefox then you can use the -C option with the ps command.īash$ ps -F -C kate List process by Status/StateĪ process can be in one of the several states which is also referred to as its status. The following command will print process by users who are not root.īash$ ps -u root -F -N List process by Name/Command The effective user is the user whose file access permissions are used by the process, which might be different from the user who owns the process.Īnother option worth mentioning is the -N which can be used to negate the list. U option takes into account the real user of the process, while -u specifies the effective user id. ![]() The difference between -U and -u is that one uses the real user id (RUID) while the other uses the effective user id (EUID). This option allows you to specify a comma-separated list of users. If you want to print out the processes of a particular user, then you can use either the -U or -u option (or both). We will mostly stick with the standard syntax in this post. The command line options without the hypen (-) refers to the BSD syntax. The above command will print all processes using the full display format which includes columns such as process id, user id, parent process id, memory and the command. We use the -F option below to display the extra full format. There are different variations of the command which lists all processes, mostly to control the formatting of the output. In order to list all running processes in the system, use the ps command with the command line option -e. ps is a very versatile command with a lot of options, we will just look at a limited set of popular options that you can use. The ps command offers a whole set of command line options to wilt it down to a manageable set with the optimal format you need. ![]() The list of all processes that are running can be in hundreds and can be overwhelming at times. Another popular command is top and its several different variations. The ps command reports a snapshot of the currently running processes in your system. The most useful and popular command to list processes is ps. You can then find the process and kill them manually if it is using too many resources, for example. This gives you additional information about the processes itself, such as how much memory is being used by each process or which process is using the most CPU etc etc. You might occasionally want to see the list of processes that are running on your system. Technically, all process are children of the root (top-level) process. A child process is a process that is created by another process, referred to as the parent process. In addition to the top level processes, there can also be child processes. Also, you can have multiple instances of the same program running, each of which will have separate processes. All running programs including operating system will have its own process. Processes or Tasks are the executing instances of a particular application or program in an operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |