Managing process on linux 000 018 in this

Info icon This preview shows pages 53–55. Sign up to view the full content.

View Full Document Right Arrow Icon
Managing Process on Linux 0:00-0:18 In this demonstration, we're going to practice using the ps utility at the command prompt to view information about the processes currently running on the Linux system. Now before I can do this I do need to switch to my root user account. I need to elevate privileges on this system and I'll provide roots password. ps Command 0:19-1:37 Now ps can be run in many different ways to display different types of information. The most basic way you can use PS is just type ps itself with no options at the command prompt. I'll hit Enter and when I do a list of all the processes that are running within this current shell session are
Image of page 53

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
displayedand that's very important to remember without any options the ps command will simply display the processes that are running inside of this command window which you can see here. First of all we have the su command that I just ran a second ago. We also have the ps command itself.That I just ran to generate this output and we have the bash command here which provides the shell window. Notice when we run ps without any options we have four columns of information displayed.The PID column, or process ID number displays the ID number that's associated to each process. For example the su command had a process ID number assigned to it of 7685. The TTY column displays the name of the shell, the terminal session here that the process is running within and notice they're all the same because they're all running within the same shell window. The time column displays the amount of CPU time that's being used by that particular process and then command the column displays the name of the command that was run in order to create that process. ps Command Options 1:38-5:15 Now notice that ps only displayed three different process, well this system actually has many, many other processes actually running on it. However those processes were not run within this shell session. Instead they are running in the background, they were automatically loaded when the system booted up. To see all of these processes you need to run PS with -e option. Now notice when we do that, the output is quite a bit longer then it was with just ps alone. Instead of just displaying the processes running within this current shell window, all of the processes running on this system are displayed instead. Now the number of columns is the same, we have the PID column, the TTY column, the time column and the command column. Just like we saw with the standard ps command. Now notice over here in the TTY column that most of these processes have a question mark under TTY and that's because they're not associated with a particular shell session, they were loaded when the system booted up, they're running in the background. They're not being run out of a shell window. Now we can tell the ps command to display even more details about each process running on the system.
Image of page 54
Image of page 55
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern