Are you sure you want to cancel your subscription?

If you cancel, your subscription will remain active through the paid term. You will be able to reactivate the subscription until that date.

Sorry to see you go

Your subscription will remain active until . If you change your mind, you may rectivate your subscription anytime before that date.

Are you sure you want to reactivate?
Welcome Back!

Your subscription has been reactivated and you will continue to be charged on .

Reactivate Subscription

Thank you for choosing to reactivate your subscription. In order to lock in your previous subscription rate, you owe: .

Your Subscription term is from - .

Questions? Call Sales.

541-284-5522
Payment Due:

OK
Auto-Renew Subscription

To auto-renew your subscription you need to select or enter your payment method in "Your Account" under Manage Payments.

Click continue to set up your payments.

CBT Nuggets License Agreement


Unless otherwise stated all references to “training videos” or to “videos” includes both individual videos within a series, entire series, series packages, and streaming subscription access to CBT Nuggets content. All references to CBT or CBT Nuggets shall mean CBT Nuggets LLC, a Delaware limited liability company located at 44 Country Club Road, Ste. 150, Eugene, Oregon.


A CBT Nuggets license is defined as a single user license. Accounts may purchase multiple users, and each user is assigned a single license.


  • GRANT OF LICENSE. CBT Nuggets grants you a non-transferable, non-exclusive license to use the training videos contained in this package or streaming subscription access to CBT content (the “Products”), solely for internal use by your business or for your own personal use. You may not copy, reproduce, reverse engineer, translate, port, modify or make derivative works of the Products without the express consent of CBT. You may not rent, disclose, publish, sell, assign, lease, sublicense, market, or transfer the Products or use them in any manner not expressly authorized by this Agreement without the express consent of CBT. You shall not derive or attempt to derive the source code, source files or structure of all or any portion of the Products by reverse engineering, disassembly, decompilation or any other means. You do not receive any, and CBT Nuggets retains all, ownership rights in the Products. The Products are copyrighted and may not be copied, distributed or reproduced in any form, in whole or in part even if modified or merged with other Products. You shall not alter or remove any copyright notice or proprietary legend contained in or on the Products.
  • TERMINATION OF LICENSE. Once any applicable subscription period has concluded, the license granted by this Agreement shall immediately terminate and you shall have no further right to access, review or use in any manner any CBT Nuggets content. CBT reserves the right to terminate your subscription if, at its sole discretion, CBT believes you are in violation of this Agreement. CBT reserves the right to terminate your subscription if, at its sole discretion, CBT believes you have exceeded reasonable usage. In these events no refund will be made of any amounts previously paid to CBT.
  • DISCLAIMER OF WARRANTY AND LIABILITY. The products are provided to you on an “as is” and “with all faults” basis. You assume the entire risk of loss in using the products. The products are complex and may contain some nonconformities, defects or errors. CBT Nuggets does not warrant that the products will meet your needs, “expectations or intended use,” that operations of the products will be error-free or uninterrupted, or that all nonconformities can or will be corrected. CBT Nuggets makes and user receives no warranty, whether express or implied, and all warranties of merchantability, title, and fitness for any particular purpose are expressly excluded. In no event shall CBT Nuggets be liable to you or any third party for any damages, claim or loss incurred (including, without limitation, compensatory, incidental, indirect, special, consequential or exemplary damages, lost profits, lost sales or business, expenditures, investments, or commitments in connection with any business, loss of any goodwill, or damages resulting from lost data or inability to use data) irrespective of whether CBT Nuggets has been informed of, knew of, or should have known of the likelihood of such damages. This limitation applies to all causes of action in the aggregate including without limitation breach of contract, breach of warranty, negligence, strict liability, misrepresentation, and other torts. In no event shall CBT Nuggets’ liability to you or any third party exceed $100.00.
  • REMEDIES. In the event of any breach of the terms of the Agreement CBT reserves the right to seek and recover damages for such breach, including but not limited to damages for copyright infringement and for unauthorized use of CBT content. CBT also reserves the right to seek and obtain injunctive relief in addition to all other remedies at law or in equity.
  • MISCELLANEOUS. This is the exclusive Agreement between CBT Nuggets and you regarding its subject matter. You may not assign any part of this Agreement without CBT Nuggets’ prior written consent. This Agreement shall be governed by the laws of the State of Oregon and venue of any legal proceeding shall be in Lane County, Oregon. In any proceeding to enforce or interpret this Agreement, the prevailing party shall be entitled to recover from the losing party reasonable attorney fees, costs and expenses incurred by the prevailing party before and at any trial, arbitration, bankruptcy or other proceeding and in any appeal or review. You shall pay any sales tax, use tax, excise, duty or any other form of tax relating to the Products or transactions. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. Any notice to CBT under this Agreement shall be delivered by U.S. certified mail, return receipt requested, or by overnight courier to CBT Nuggets at the following address: 44 Club Rd Suite 150, Eugene, OR 97401 or such other address as CBT may designate.

CBT Nuggets reserves the right, in its sole discretion, to change, modify, add, or remove all or part of the License Agreement at any time, with or without notice.

Billing Agreement


  • By entering into a Billing Agreement with CBT Nuggets, you authorize CBT Nuggets to use automatic billing and to charge your credit card on a recurring basis.
  • You agree to pay subscription charges on a monthly basis, under the following terms and conditions:
    • CBT Nuggets will periodically charge your credit card each monthly billing cycle as your subscription charges become due;
    • All payments are non-refundable and charges made to the credit card under this agreement will constitute in effect a "sales receipt" and confirmation that services were rendered and received;
    • To terminate the recurring billing process and/or arrange for an alternative method of payment, you must notify CBT Nuggets at least 24 hours prior to the end of the monthly billing cycle;
    • You will not dispute CBT Nugget’s recurring billing charges with your credit card issuer so long as the amount in question was for periods prior to the receipt and acknowledgement of a written request to cancel your account or cancel individual licenses on your account.
  • You guarantee and warrant that you are the legal cardholder for the credit card associated with the account, and that you are legally authorized to enter into this recurring billing agreement.
  • You agree to indemnify, defend and hold CBT Nuggets harmless, against any liability pursuant to this authorization.
  • You agree that CBT Nuggets is not obligated to verify or confirm the amount for the purpose of processing these types of payments. You acknowledge and agree that Recurring Payments may be variable and scheduled to occur at certain times.
  • If your payment requires a currency conversion by us, the amount of the currency conversion fee will be determined at the time of your payment. You acknowledge that the exchange rate determined at the time of each payment transaction will differ and you agree to the future execution of payments being based on fluctuating exchange rates.

CBT Nuggets reserves the right, in its sole discretion, to change, modify, add, or remove all or part of the Billing Agreement at any time, with or without notice.

LPI Linux LPIC-1 101 and CompTIA Linux+

Create, Monitor, and Kill Processes

This video is only available to subscribers.
Start your 7-day free trial today.

A free trial includes:

  • Unlimited 24/7 access to our entire IT training video library.
  • Ability to train on the go with our mobile website and iOS/Android apps.
  • Note-taking, bookmarking, speed control, and closed captioning features.

LPIC1 & CompTIA Linux+ Intro

Hardware Settings

Boot the System

Change Runlevels and Reboot or Shutdown the System

Design Hard Disk Layout

Install a Boot Manager

Manage Shared Libraries

Debian Package Management

RPM & YUM Package Management

Work on the Command Line

Process Text Streams Using Filters

Perform Basic File Management

Use Streams, Pipes, and Redirects

Create, Monitor, and Kill Processes

00:00:00 - Okay, this is section 103.5, where we talk
00:00:03 - about creating, monitoring and killing, which sounds much more
00:00:07 - morbid than it really is, processes that are running
00:00:10 - on your system. This section has a weight of four and we're going to talk about
00:00:13 - basically backgrounding and foregrounding processes, what
00:00:17 - we mean by a persistent process, one that'll stay running if you log
00:00:20 - out, how to interact with processes that are running on
00:00:23 - the computer. And how to sort processes, so you can see the
00:00:26 - processes as they run. All right, so let's look at a computer
00:00:29 - and get started.
00:00:31 - Okay, so the first thing we're going to talk about is foregrounding
00:00:34 - and backgrounding processes. Let's say we run a command like
00:00:38 - sleep 1000. Now what sleep does and this is just an example,
00:00:42 - I mean, you wouldn't normally just put your computer to sleep for
00:00:45 - a 1000 seconds, but basically this is running and you
00:00:48 - see it's captured control of our terminal. So we can't enter
00:00:52 - new commands, it just doesn't work because the computer is doing
00:00:55 - what it's told, it's sleeping.
00:00:57 - Well, that's really no good if you want to have that do it in the
00:01:00 - background, because we don't just want to wait around. So we'll do
00:01:02 - Ctrl C to cancel that, all right, so sleep is no longer running,
00:01:06 - we canceled the process. If you want to have that run in the
00:01:09 - background, I mean again, this is a computer it does multitasking,
00:01:12 - right? We would add an ampersand at the end. And what that does
00:01:16 - it starts the process and it's running just like it was before,
00:01:19 - but it's given us back control of the terminal, all right. And it
00:01:23 - told us a couple things, it says, all right, it's in the background,
00:01:25 - its job number one in the background and it has a PID or a
00:01:30 - process ID of 2625, all right. So it told us those
00:01:34 - things, and now if we want to see it running in the background,
00:01:36 - we'll type jobs and, oh, look at that, sure enough job number one is running
00:01:41 - and this is what job number one is. So let's do another thing,
00:01:45 - let's do sleep 999, just so we can tell the difference,
00:01:50 - put that in the background, okay. So now you see the difference
00:01:53 - here, now is job number two. So if we type jobs, you'll see there's two
00:01:57 - jobs, sleep 1000, sleep 999, all right. Now how do you interact
00:02:02 - with those two things? Well, what you would do is run foreground, okay.
00:02:08 - Well foreground is going to bring back one of those so that we can
00:02:11 - use it. Now how do you specify which one, by the job number, all right,
00:02:15 - So we'll say foreground one, we're gonna say foreground one and then there we have
00:02:20 - control of sleep 1000 again, all right? Now I want to control
00:02:24 - job number two, but I'm kind of in a pickle, because we're running sleep 1000
00:02:28 - and we don't have any control over this terminal, see.
00:02:31 - So what you can do is, it's a two-step process to put something
00:02:36 - in the background, like if we wanted to put this in the
00:02:38 - background instead of canceling it and starting over, if we
00:02:41 - decided, you know what I don't want to wait around for a 1000
00:02:44 - seconds, so you suspend the process with the Ctrl Z and that stops
00:02:50 - the process or suspends it, puts it in the background. Now you'll
00:02:53 - see it's still run, it's still a job, it's just stopped right
00:02:58 - now, in suspended mode, so it's not going to keep counting. So
00:03:01 - then, what you can do is you type background, again, we typed
00:03:08 - foreground, to get it out of the job queue into our terminal. So you're
00:03:12 - going to type background and then job number one
00:03:17 - and now what it's done, it's put that in the background, but
00:03:20 - running, okay. So if we type jobs,
00:03:23 - see now they're both running in the background. So that BG command
00:03:27 - took our suspended job, that was kind of paused and had it run in
00:03:30 - the background. So BG puts it in the background, foreground takes
00:03:34 - it out of the background or takes it out of the jobs queue
00:03:37 - and brings it up, so that we can interact with it. All right, so
00:03:40 - that's, that's how those things run. Now there is a problem.
00:03:44 - Now, right now, since they're running in the background, if we
00:03:47 - close this terminal or exit out of this terminal,
00:03:50 - we're still logged into the computer. So if we bring up another
00:03:53 - terminal, if we type something like ps, which is to look at the
00:03:57 - the processes that are running, so let's say PS,
00:04:01 - a is going to list all of the processes that are accessible to
00:04:05 - us. I like to do a u flag, which shows what user is running
00:04:10 - the process and then we have to run x, because x will show
00:04:14 - us all the commands that are running, even if they're outside of the
00:04:17 - current terminal that we're in. So again, these are
00:04:20 - some pretty common flags, ps, aux is a pretty common thing
00:04:24 - that you're going to run, we'll type that and it shows all the processes that I'm
00:04:28 - running. Now, if we look close enough, in all of our processes, we have to scroll up
00:04:33 - here because there's a bunch, you'll see there's still those two jobs
00:04:36 - running, hey, cool. Very,
00:04:38 - very cool. Now they're not jobs running in our terminal right
00:04:42 - now, they're just running in the background. So if we type jobs,
00:04:46 - there's not going to be any, see that's an issue. We could start
00:04:49 - another one, but we can't interact with that anymore, because we've
00:04:53 - closed that terminal. So there's no way for us to interact with that.
00:04:56 - So if we want to stop them now, what we have to do is run a
00:04:59 - kill command, all right. So we've done piping and grepping,
00:05:04 - so let's do this, let's do ps aux. We're going
00:05:08 - to pipe that through grep sleep, so that we just see those commands,
00:05:12 - all right? Of course, that grep sleep we see, because we just did that,
00:05:15 - but here are the two commands. Now, if you need to stop that command, again
00:05:20 - we can't do Ctrl C because we can't get control of it again.
00:05:24 - So we'll type kill,
00:05:26 - and then the process ID or the PID of that number. So we'll
00:05:31 - say 2625,
00:05:33 - kill 2625
00:05:36 - and now let's see,
00:05:39 - you see, now that 2625 command completely stopped. Now
00:05:43 - there is a trick. Let's say we did this, I don't know why a person
00:05:47 - would do this, but let's say that there's a bunch of these running
00:05:49 - in the background, we'll do sleep 790 in the background,
00:05:55 - sleep, that, in the background, sleep 2222 in the background.
00:06:04 - So now, you'll see, all these sleep commands
00:06:08 - that are running in the background, right? Well, we could go through
00:06:11 - and run kill on that process ID to stop it or you can
00:06:15 - use this nice little trick,
00:06:18 - killall and then the name of the command. Now you have to
00:06:22 - be really careful here, we'll do killall sleep
00:06:26 - and it told us that it terminated all these jobs, right, all these sleep
00:06:30 - commands. Now the scary thing there is, if you do it as root,
00:06:34 - you can kill everybody's commands. So like, if you type killall
00:06:38 - firefox and you do it as root, well you're going to just kill everybody's
00:06:41 - Firefox session. If you do it as a user, like I'm just spowers,
00:06:46 - you're only going to be able to kill those that you have the
00:06:48 - ability to kill, you know, you have permission to kill. But killall's kind of
00:06:52 - a shortcut if you don't want to bother with the process
00:06:54 - IDs, all right?
00:06:58 - Now there is still a problem, if you want to run a process after
00:07:01 - you log out, because if we run sleep and I like sleep 1000, put it in
00:07:09 - the background, that's going to stay running if we cleanly
00:07:12 - exit this terminal, right. And we know if we go here
00:07:17 - we can,
00:07:19 - look and the sleep command is still running that we just started,
00:07:22 - right, but if we were to log out of the system,
00:07:27 - Log Out, then, here if we exit out of here,
00:07:31 - if we were to log all the way out, what would happen is that
00:07:34 - process would die, because as our log in session is terminated,
00:07:38 - it's going to kill the process, all right.
00:07:41 - Now, I won't log out because it takes a long time, but just believe me that
00:07:43 - if you log out, it's going to kill all those processes running
00:07:46 - in the background. So let's kill
00:07:51 - 3102,
00:07:54 - make sure it's killed, yep, it is, it's gone, all right. So what you want to do, if
00:07:58 - you type nohup, now this is a new command, nohup means
00:08:03 - don't intercept the shut down signal on log out, right. So nohup sleep
00:08:11 - in the background. So what we have here, again, we know the sleep
00:08:15 - 1000 part, we know that that's going to run, and it's going
00:08:17 - to run in the background, but nohup means run it in a way
00:08:21 - that won't intercept the hang up signal, because hup is a hang up, okay.
00:08:26 - When you log out, it sends all of your processes this hang up signal
00:08:29 - to stop, you know, to quit, because a person's logging out.
00:08:33 - If you run that, it won't, all right. And it even tells you, ignoring input and
00:08:37 - appending output to 'nohup.out.' So what that does, you're going to log
00:08:41 - out, right. If this command has any output, sleep doesn't actually
00:08:45 - have any output, but if was like text or something that was
00:08:47 - running, it would create a file called nohup.out and write
00:08:51 - the output to that and also you can't input to it anymore, all right. So if
00:08:55 - we look, now it's going to be running.
00:08:58 - See it's running right there and it doesn't look any different,
00:09:01 - except that if we were to log out and actually just closing this
00:09:04 - prematurely, would be like logging out, it's the parent process.
00:09:09 - If we run that it's still
00:09:11 - going to be running, all right, still running. If we log out, log in as a
00:09:15 - different user, it will still show up. So nohup is a way to
00:09:18 - keep that running. Now it will still accept, oop, a kill signal.
00:09:22 - So kill 3157
00:09:26 - and see, it's going to die, all right. So that's nohup, it's a way
00:09:29 - that you can keep a process running in the background, even
00:09:32 - if you log out. You would want to do that like if you started a screen
00:09:35 - session, which is a way to run a terminal and have stuff keep
00:09:39 - going or if you have a long process that's going to take longer
00:09:43 - than the time you're going to be at the computer, it's
00:09:45 - a great way to keep things running after you log out, all right,
00:09:49 - so that is nohup.
00:09:52 - We've talked a lot about ps and grep and all these different ways
00:09:56 - to find our processes, but honestly when you're on the command
00:09:59 - line, the tool that you're probably going to use the most is
00:10:01 - top, t-o-p. Now what this does it gives you a whole bunch of information.
00:10:06 - Now a lot of this information is going to show up in the command
00:10:10 - I'm going to show you in a minute, so I won't go over that right now.
00:10:12 - But one of the big things it shows you is a big refreshing
00:10:17 - list of processes. Now it's a great way to see all the things
00:10:20 - that are running and it's a great way to sort them, that's the
00:10:23 - big thing with ps, it's hard to sort them based on different categories,
00:10:27 - not impossible, but hard. For example, what top does by default,
00:10:31 - it sorts all this data by which is the most CPU intensive,
00:10:36 - which one is using the most of your processor right now. So
00:10:40 - for example, Xorg or, you know, the X server on Linux box, was using
00:10:44 - that percentage and it changes in real time here. So it's using.3%
00:10:48 - of my processor. Now if you press the h key,
00:10:52 - you can see that top can be used to do all sorts of different
00:10:55 - things. You can sort it by different things, you can change color
00:10:58 - mappings, you can do all sorts of things. What I would suggest
00:11:02 - is what I do here, this greater than and less than sign, allows
00:11:08 - you to sort by different fields. So, for example, let's press any key
00:11:11 - to get back to the top screen, this is the main screen. Now like
00:11:14 - I said, by default it's sorting by the CPU column. If we were
00:11:18 - to press greater than, you'll see everything changed and now
00:11:22 - it's being sorted by the memory usage. So nautilus is currently
00:11:27 - using the most memory, 3.7% of the memory of
00:11:30 - the system is being used by nautilus and so it's sort by that.
00:11:33 - Now you can use the greater than and less than to go back and forth,
00:11:36 - so this is, again, sorting by the CPU.
00:11:40 - We can sort by any column, go back through, we're going to talk about
00:11:44 - the nice levels, which are like this level, we're going to talk
00:11:48 - about that in the next nugget. But basically it's a way you can
00:11:51 - go through and change what field is being sorted by, all right.
00:11:55 - So that is top. Now we're going to talk about some of these, woo,
00:12:00 - oh my goodness, come on, fix yourself
00:12:02 - here. We're going to talk about these things on the top,
00:12:06 - but we're going to talk about different commands that'll give
00:12:08 - that information. Just know that that information is the top of the
00:12:11 - top screen. Now one more thing you can do, let's see if we can sort
00:12:16 - by memory, okay. Now we'll use this as an example, mixer_applet2,
00:12:22 - I just happen to know that this is this little volume mixer up on
00:12:25 - our task bar up there. So one thing you can do
00:12:30 - from inside the top command, is kill the process. So we
00:12:34 - type kill or press k for kill and it asks for the process
00:12:38 - ID that we want to kill. Well you can see here, the process
00:12:41 - ID for the mixer applet is 2254. So we'll take 2254,
00:12:46 - press enter and what it asks then for is, okay, you
00:12:51 - want to kill process ID 2254. What signal do
00:12:55 - you want to send it? Well
00:12:58 - signal 15 is basically the sig term, which says it just
00:13:04 - tells the program, okay mixer_applet2, I need you to
00:13:08 - stop now. It sends the standard terminate signal, sig term and what
00:13:12 - that does, a program should then say, okay, you want me to shut down and if it
00:13:16 - has a process it goes through when it shuts down, it does that.
00:13:20 - And this probably will, this is like the cleanest way to kill
00:13:23 - a process. So you press that and you see it stopped, in fact,
00:13:26 - GNOME is now telling us, whoa, something happened, I didn't expect
00:13:29 - that to quit and it did. So we'll press reload. It's going to restart
00:13:33 - the process and you'll see it restarted the process, with a
00:13:36 - different process ID, all right. So let's say we wanted to kill
00:13:40 - that process, 2941. So we'll type 2941
00:13:46 - and we wanted to use a different signal. Now 15 is
00:13:51 - sigterm or the signal terminate. And that's like I said the cleanest
00:13:55 - way to stop it, but sometimes if a program is locked up, it
00:13:59 - won't quit when you send it that signal 15 or that sigterm.
00:14:02 - So that's where you want to send signal 9, okay. This is
00:14:07 - just saying, in the brackets here, this is the default, it's
00:14:09 - going to do 15, that's why it's telling us in the
00:14:12 - brackets, that's the default. But if you want to change that to
00:14:14 - nine, which is sigkill, now that, of course, the same thing's
00:14:20 - going to happen, it's just going to completely croak,
00:14:22 - right, it's going to die, it's not running.
00:14:25 - We can reload it, but the difference is signal 15 told it to quit
00:14:29 - cleanly, whereas signal 9, sigkill, told it to die right
00:14:33 - away, bam. No matter what the programmer wants, you can't stop
00:14:36 - a sigkill signal from coming in, all right.
00:14:40 - If that's a little confusing, that's okay, but when you have
00:14:42 - a process that you just can't get to stop like that, if you
00:14:46 - kill it with sigkill, which is the -9 or pressing
00:14:51 - nine in here on top, that'll tell it, it has to stop no matter what. It's
00:14:54 - like the all powerful kill -9, like we need a t-shirt or something
00:14:58 - that says, I have kill -9 power or something like that. All right,
00:15:02 - anyway, let's move on to a couple other tools I want to show
00:15:06 - you. The first one I want to show you is called uptime.
00:15:13 - Now uptime does exactly what you think, it'll tell you the time, it
00:15:16 - will tell you how long it's been running, how long the system's
00:15:20 - been up. Now this is where you can start bragging to people, oh my goodness,
00:15:24 - my system's been up for like
00:15:26 - 892 days, et cetera, et cetera. How many users
00:15:29 - are currently logged in, but the other thing that's kind of
00:15:32 - a important, I mean this is great for bragging rights, not only
00:15:34 - just days you've been running, but if you're trying to
00:15:37 - figure out what's going wrong with the system, you want to look
00:15:40 - at the load average. Now I'll admit load average is a very, very complicated
00:15:45 - equation that it comes up with the load averages. But I
00:15:49 - can explain to you that these three different numbers, with
00:15:53 - commas, this is a sampling of the load average over the last
00:15:57 - one minute, the past five minutes, an average and then the past
00:16:01 - 15 minutes. So if you look and you have a very high load
00:16:05 - average, you're going to know that something is going wrong on
00:16:08 - your computer. It doesn't necessarily just mean the CPU, it
00:16:12 - means that the CPU is having issues getting commands or
00:16:15 - it could have something to do with
00:16:19 - more with, like disk i/o, although it doesn't really measure
00:16:22 - disk i/o. This system load is kind of a combination of
00:16:27 - a whole bunch of different things and much more than we're
00:16:30 - going to explain this nugget. The important thing to know in this
00:16:32 - nugget, that when this number starts to get high
00:16:36 - and this number and this number, you know that you have a problem.
00:16:39 - And if one of them, like say for the past minute, this was up
00:16:43 - to like two, well then you know that in the last minute you've
00:16:47 - had an extremely high load average on your computer. And then
00:16:50 - if this is down pretty low and this is pretty low, you can guess
00:16:53 - that that was just a bump. But if over the past five minutes, it's
00:16:57 - been high or over the past 15 minutes it's been high,
00:17:01 - but this one is low, you'll know that, oh, you have a high system
00:17:04 - load, but it appears to be over now, because for the past minute
00:17:09 - it's been low. So this is a nice way to look at trends on your computer
00:17:13 - or if you remember, up in top, it showed us the CPU times,
00:17:17 - but that was real time, that was like as a snapshot. Whereas this will give you
00:17:21 - an average of the load. And how high this number can get will vary
00:17:25 - based on the number of CPUs or the number of cores you
00:17:28 - have on your computer, all right. So a little bit confusing, but
00:17:31 - load average, know that it's one minute, five minutes and 15
00:17:35 - minutes and the higher the load, the worse it is for your computer
00:17:39 - or it just means the more work it's doing, all right. The one other
00:17:42 - command that I want to show you is simply free. Now again this
00:17:47 - should look familiar at the top of the
00:17:50 - top command, because it shows the memory.
00:17:54 - Now this is, you can probably figure out that this computer,
00:17:57 - this virtual machine I'm running, has half a gig of RAM or
00:18:01 - 512 megabytes of RAM. It's currently using that much, which means
00:18:05 - this much is free. So if you add this to this, you should end
00:18:10 - up with this, right.
00:18:12 - Okay, and then over here, how many shared megabytes of memory this
00:18:16 - is talking about, like if two people are running Open Office, a lot
00:18:19 - of times it would be shared memory, where they share the same bits
00:18:22 - of memory, because it's the same program running. And then on buffers
00:18:26 - and the cache, it keeps a lot of things in cache in case
00:18:29 - it has to reuse it, so it doesn't have to write it into memory again. But
00:18:33 - this is actual RAM, like actual memory sticks in
00:18:37 - your computer. And then under here, we have the swap file. Now
00:18:40 - if you're a Windows user and you're familiar with the idea
00:18:43 - of a page file, basically if your RAM completely fills
00:18:47 - up and a program has to write something to RAM, it's going to
00:18:50 - crash. So what the computer does and Linux supports this,
00:18:54 - most operatings support this, is a swap space. Basically it uses
00:18:58 - your hard drive as if it were RAM chips. Now there's definite
00:19:02 - disadvantages to that, it's much, much, you know, several orders
00:19:06 - of magnitude slower than RAM. So it's not something that you
00:19:10 - want to use on a regular basis. But if you have a process that's
00:19:13 - taking up a whole bunch of RAM for, you know, just a minute or
00:19:17 - two, it's okay if writes some of it to swap, like a big, if
00:19:21 - you're sorting some big database or something, perhaps it'll write something
00:19:24 - into RAM and then it'll empty it out of, it'll write it into RAM, fill up your RAM,
00:19:29 - write it into your swap space, but then after that you're done.
00:19:32 - Right, so you want to be able to have the safety net, but it's
00:19:35 - always good to see the amount of swap space used as zero or
00:19:39 - very low, all right. So that's what the free command does, but remember
00:19:44 - if we type top, that stuff shows right up top here, all right. So
00:19:48 - that information is all available from right inside the top command.
00:19:53 - Okay, this nugget we learned about processes. We learned about
00:19:56 - foreground and background and the ampersand, that's not
00:20:01 - a bad ampersand. We learned about controlling those with jobs. And
00:20:06 - we learned about running them in the in the background when you
00:20:09 - exit the terminal they keep running. But then even if
00:20:12 - we log out and want to keep an application running, we learned to run
00:20:15 - the nohup
00:20:18 - command with our
00:20:21 - whatever, you know, whatever command we want to run after that. And then
00:20:24 - it's going to run in the background as long as we put in the
00:20:26 - background and it's not going to stop, even if we log out. So if there's
00:20:30 - a process we want to run after we leave, that's how we run it.
00:20:33 - We also learned about killing, in the process sense, not on a
00:20:39 - homicidal sense. We also learned killall
00:20:44 - and we talked about signals. Now we talked about them briefly,
00:20:47 - so I'll just really quick remind you. Two of the most commonly used signals,
00:20:51 - the default is going to be sigterm,
00:20:55 - which is 15, okay. That's the signal number 15,
00:21:03 - for sigterm, that's the cleanest way to exit, that's to tell the program,
00:21:07 - okay, I want you to terminate now please.
00:21:10 - The other one that you commonly use, is sigkill. And
00:21:16 - that has a process or that has the number nine, all right. Now you
00:21:19 - can do those inside the top command or you can do it right at the command
00:21:23 - line, like kill -9 and then the PID.
00:21:28 - That is going to send it the sigkill command for that process
00:21:32 - ID. Same thing with killall, by default, they use sigterm,
00:21:35 - but you can add the -9 if you want to make it a
00:21:37 - sigkill and really kill a stuck process, all right. We also learned
00:21:41 - about uptime, a little bit about load balance. And
00:21:48 - let's see, we learned
00:21:51 - about ps, but we also learned that while ps is handy a lot of times
00:21:56 - you might want to use
00:21:58 - top instead, all right. And last but not least, we also learned
00:22:05 - about, anything else we learned there?
00:22:08 - Oh, free, yes, I knew there was one more, free.
00:22:12 - Apparently I didn't have or I have some free memory, because I forgot
00:22:15 - that. Anyway, free talks about the memory usage that we
00:22:19 - have on the system. All right, so that's creating, monitoring,
00:22:22 - killing processes. So I hope this has been informative for you
00:22:25 - and I'd like to thank you for viewing.

Process Priorities

Search Text Files with Regular Expressions

Perform Basic File Editing Operations Using vi

Create Partitions and Filesystems

Maintain the Integrity of Filesystems

Control Mounting and Unmounting of Filesystems

Manage Disk Quotas

Manage File Permissions and Ownership

Create and Change Hard and Symbolic Links

Find System Files and Place Files in the Correct Location

This forum is for community use – trainers will not participate in conversations. Share your thoughts on training content and engage with other members of the CBT Nuggets community. For customer service questions, please contact our support team. The views expressed in comments reflect those of the author and not of CBT Nuggets. We reserve the right to remove comments that do not adhere to our community standards.

comments powered by Disqus
Community Standards

We encourage you to share your wisdom, opinions, and questions with the CBT Nuggets community. To keep things civil, we have established the following policy.

We reserve the right not to post comments that:
contain obscene, indecent, or profane language; contain threats or defamatory statements; contain personal attacks; contain hate speech directed at race, color, sex, sexual orientation, national origin, ethnicity, age, religion, or disability; contributes to a hostile atmosphere; or promotes or endorses services or products. Non-commercial links, if relevant to the topic, are acceptable. Comments are not moderated, however, all comments will automatically be filtered for content that might violate our comment policies. If your comment is flagged by our filter, it will not be published.

We will be continually monitoring published comments and any content that violates our policies will be removed. Users who repeatedly violate our comments policy may be prohibited from commenting.

Course Features

Speed Control

Play videos at a faster or slower pace.

Bookmarks

Pick up where you left off watching a video.

Notes

Jot down information to refer back to at a later time.

Closed Captions

Follow what the trainers are saying with ease.

MP3 Downloads

Listen to videos anytime, anywhere

Annual Course Features

Transcender Practice Exams

These practice tests help you review your knowledge and prepare you for exams.
Available only with the annual subscription.
Shawn Powers

Shawn Powers

CBT Nuggets Trainer

Certifications:
LPIC-1; CompTIA Linux+, A+; Cisco CCNA

Area Of Expertise:
Linux

Add training to a playlist
or create a new list
Add to current playlist
or add to an existing list
Add to new playlist
Add New Bookmark

Create, Monitor, and Kill Processes
Bookmark Title:
Whoops

Login is required to access this feature.

Your browser cannot access Virtual Labs
Video Options

This advanced buffering is applied to all streams regardless if you installed the doublespeed control or not. Sometimes the advanced buffering causes the video to hang or behave erratically. If you are experienceing issues with video playback please disable the doublespeed buffer.

Remember to re-enable the buffer if you want to use the doublespeed control.

If you are experiencing problems with our content delivery, please click here to switch to our alternate content delivery network or go to our network FAQ.
For other common video playback issues, including firewall and corporate network issues, please visit our Tech Support forum.