Dude, I was gonna start teaching a friend at work when I found your videos that he can watch instead and learn faster and better. You did a Hell of a job. Well done!!!
My Notes: Linux Sysadmin Basics -- 6.2 State, Niceness, and How to Monitor Processes 0:43 What is the proc filesystem? Process Filesystem - virtual filesystem the linux kernel mounts to post information about its processes so that applications have easy access to them -- 1:06 Every Process wants what? CPU time -- 1:32 What is responsible for: scheduling what process get CPU time when? The kernel - Determines this based on what state the process is in. -- 2:19 What are the 4 states a process can be in? 1) Run-able - Eligible to be scheduled for CPU time, has all the info it needs 2) Sleeping - Waiting for something 3) Zombie - Finished with what it was doing, waiting to give back info it has come up with & be killed by kernel 4) Stopped - May have been in the middle of doing something BUT received stop signal and is now waiting for the continue signal to resume -- 3:50 If you have a lot of Zombie processes causing an issue, what would be useful to check for? Parent PID (PPID) - the issue could be that the parent hasn't collected finished output of the processes and the children can't die -- 4:16 The most common tool/command to monitor processes is... top (command: automatically sorts by % of cpu use, # of things running, states of processes, etc) -- 5:37 Besides the 'top' command, what command can show you MORE detailed and granular info about processes, resource use and process states? (Hint: features scrolling) htop (command, you may need to install) - nicer interface - allows you to scroll - can scroll to a process and send a signal to it directly - more features, read man page -- 8:16 What should be your first step in exploring any new program? Look at the man page - familiarize yourself with the options available - see if there are any examples at the end -- 8:47 What is Niceness (NI)? A value that determines how 'nice' a process is to other processes (the priority of the process) -- 9:30 With Niceness, the HIGHER the number... ... the LOWER the priority (the #s go from -20 [SUPER HIGH] to 19 [lowest priority]) - Ex: Low priority command: nice - n 15 /backup/not/important/at/all/task -- 10:40 Niceness and Customer facing systems: with anything like this, you want to be careful not to.... ...run things that will run things that will grind everything else to a halt (because you might want to set a lower niceness level) - too great a level might make your system feel like it is freezing up - generally, you don't want to set anything to the minimum niceness/highest priority b/c it will block other stuff -- 11:27 How do you renice (change priority) of a task? Syntax: renice -5 2744 (make sure that you have appropriate privileges) - you can also change it with htop with F7 or F8 -- 13:53 Example Problem: You are on a new system and it has slowed to a craw. What do you do? 1) Open up top (or htop) 2) What is taking up the MOST memory? 3) How much memory is free? 4) What is taking up the highest % of CPU usage? 5) Are there a lot of zombie processes (frozen parent)? Tell me if there is anything I missed. Be safe and enjoy your day.
You are $%&& genius, I am not even a 80% English speaker but I understand everything you say which is hard in most of cases!! Awesome Tutorial Series, Thanks !!! :)
Such awesome tutorial! It easily competes expensive one webminars! It really gave me a better understanding of the Linux systems and a confidence boost for upcoming interviews on Linux Administration and related positions! Awesome videos too on your chanel!
Just a small comment: PR = 20 + NI Therefore value of PR = 20 PLUS (-20 to +19) . This mean 0 to 39 and if we offset that by 100 then it is 100 to 139.
these videos started his channel , he is a great guy , i litterly started learning linux but i was not sure if to countinue till i watched this guys videos
I tried renicing GTA to -20 and my computer refused to turn on for an hour :D Love the guides! Recently started watching them as I want to pursue a career in Linux administration.
Haha, that's great. This is exactly the type of experimentation that I hope people will do with my videos :-D. That's the only way to *really* learn this stuff. Have fun!
tutoriaLinux I agree ! Just learning new things in Linux in general is fun to me so I have no problem with it :^) I already binge watched your entire Linux series and took a ton of notes so now it’s just practice :) thank you for your work!
Some useful information There is three streams always open called the standards Stdout = terminal screen Stdin = the keyboard it will read from the keyboard Stderr = the same as stdout but a different stream This three streams Don't need to be closed because it will close somehow when shutdown the computer The streams also called files or fd(file descriptor) Stdout fd = 1 Stdin = 0 Stderr = 2
All the feels just came back re: how good that first Deus Ex was. Eidos Montreal really nailed stealth in that one. Oh yeah and learning Linux has been awesome too, thanks.
I tried opening up htop and using F8 to increase the niceness, it went up but then when I tried to reduce it nothing happened. I tried a second time from 0 and nothing happened. I assume that it can't be brought below 0 in niceness by default but is there a reason that it can not be reduced via F7? I am on a VM using Ubuntu.
Your videos are great! Have you considered using tmux, so that you don't need to switch terminals? Here, for example, you can keep htop running, switch to another pane, and after running renice the new priority will be visible in an instant
Hey, thanks! In real life (and also in newer videos) I use the i3 tiling window manager for exactly this reason. I do like tmux on remote machines though; I even made a few videos on it. Cheers!
Dude, I was gonna start teaching a friend at work when I found your videos that he can watch instead and learn faster and better. You did a Hell of a job. Well done!!!
My Notes:
Linux Sysadmin Basics -- 6.2 State, Niceness, and How to Monitor Processes
0:43 What is the proc filesystem?
Process Filesystem
- virtual filesystem the linux kernel mounts to post information about its processes so that applications have easy access to them
--
1:06 Every Process wants what?
CPU time
--
1:32 What is responsible for: scheduling what process get CPU time when?
The kernel
- Determines this based on what state the process is in.
--
2:19 What are the 4 states a process can be in?
1) Run-able - Eligible to be scheduled for CPU time, has all the info it needs
2) Sleeping - Waiting for something
3) Zombie - Finished with what it was doing, waiting to give back info it has come up with & be killed by kernel
4) Stopped - May have been in the middle of doing something BUT received stop signal and is now waiting for the continue signal to resume
--
3:50 If you have a lot of Zombie processes causing an issue, what would be useful to check for?
Parent PID (PPID)
- the issue could be that the parent hasn't collected finished output of the processes and the children can't die
--
4:16 The most common tool/command to monitor processes is...
top
(command: automatically sorts by % of cpu use, # of things running, states of processes, etc)
--
5:37 Besides the 'top' command, what command can show you MORE detailed and granular info about processes, resource use and process states?
(Hint: features scrolling)
htop
(command, you may need to install)
- nicer interface
- allows you to scroll
- can scroll to a process and send a signal to it directly
- more features, read man page
--
8:16 What should be your first step in exploring any new program?
Look at the man page
- familiarize yourself with the options available
- see if there are any examples at the end
--
8:47 What is Niceness (NI)?
A value that determines how 'nice' a process is to other processes
(the priority of the process)
--
9:30 With Niceness, the HIGHER the number...
... the LOWER the priority
(the #s go from -20 [SUPER HIGH] to 19 [lowest priority])
- Ex:
Low priority command: nice - n 15 /backup/not/important/at/all/task
--
10:40 Niceness and Customer facing systems: with anything like this, you want to be careful not to....
...run things that will run things that will grind everything else to a halt
(because you might want to set a lower niceness level)
- too great a level might make your system feel like it is freezing up
- generally, you don't want to set anything to the minimum niceness/highest priority b/c it will block other stuff
--
11:27 How do you renice (change priority) of a task?
Syntax:
renice -5 2744
(make sure that you have appropriate privileges)
- you can also change it with htop with F7 or F8
--
13:53 Example Problem: You are on a new system and it has slowed to a craw.
What do you do?
1) Open up top (or htop)
2) What is taking up the MOST memory?
3) How much memory is free?
4) What is taking up the highest % of CPU usage?
5) Are there a lot of zombie processes (frozen parent)?
Tell me if there is anything I missed. Be safe and enjoy your day.
Good stuff. Thanks for posting!
thx man I appreciated it you're very note taking is very engaging
Damn! I've been over here writing down the video number and writing notes. This is WAAAAY BETTER!! Thanks man!
You are $%&& genius, I am not even a 80% English speaker but I understand everything you say which is hard in most of cases!!
Awesome Tutorial Series, Thanks !!! :)
I'm still here! And I'm actually understanding! Currently on Day 3!
Such awesome tutorial! It easily competes expensive one webminars! It really gave me a better understanding of the Linux systems and a confidence boost for upcoming interviews on Linux Administration and related positions! Awesome videos too on your chanel!
11:44 "sudo !!" would've been faster
Niceness? More like “This is”…another amazing video. Thanks for making it!
Just a small comment: PR = 20 + NI Therefore value of PR = 20 PLUS (-20 to +19) . This mean 0 to 39 and if we offset that by 100 then it is 100 to 139.
these videos started his channel , he is a great guy , i litterly started learning linux but i was not sure if to countinue till i watched this guys videos
I tried renicing GTA to -20 and my computer refused to turn on for an hour :D Love the guides! Recently started watching them as I want to pursue a career in Linux administration.
Haha, that's great. This is exactly the type of experimentation that I hope people will do with my videos :-D. That's the only way to *really* learn this stuff. Have fun!
tutoriaLinux I agree ! Just learning new things in Linux in general is fun to me so I have no problem with it :^) I already binge watched your entire Linux series and took a ton of notes so now it’s just practice :) thank you for your work!
Thank you so much for making these videos, they're extremely helpful !
Some useful information
There is three streams always open called the standards
Stdout = terminal screen
Stdin = the keyboard it will read from the keyboard
Stderr = the same as stdout but a different stream
This three streams Don't need to be closed because it will close somehow when shutdown the computer
The streams also called files or fd(file descriptor)
Stdout fd = 1
Stdin = 0
Stderr = 2
All the feels just came back re: how good that first Deus Ex was. Eidos Montreal really nailed stealth in that one. Oh yeah and learning Linux has been awesome too, thanks.
I tried opening up htop and using F8 to increase the niceness, it went up but then when I tried to reduce it nothing happened. I tried a second time from 0 and nothing happened. I assume that it can't be brought below 0 in niceness by default but is there a reason that it can not be reduced via F7?
I am on a VM using Ubuntu.
Occasionally I use xkill to nuke problematic windows but I believe this ONLY kills the x resource and not the underlying process.
Hi. Why did cpu use go hig after you pressed f9 in htop?
so why would it require sudo to renice in the command line, but it allows anyone to do in from htop? weird
thats an interesting question and definitely deserves an answer
Once again a great video lesson.
Nice video :)
Just tried to run kill 17 (SIGSTOP) on htop - my expectation was that it would put it to sleep but instead it just kills it.
Bro u r awesome. Thanks a lot for the video. It is really helpful.
how can I find zombie processes? still awesome series! I'll make notes again on the second pass of everything. Cheers!
In htop there is a column names S for state, so if there is a Z in that column, it's in the Zombue State (or read the manpage to htop)
amazing job done .thank you so much
vasavi patel thanks darling
you have to press fn and f9
Good video.
Your videos are great! Have you considered using tmux, so that you don't need to switch terminals? Here, for example, you can keep htop running, switch to another pane, and after running renice the new priority will be visible in an instant
Hey, thanks! In real life (and also in newer videos) I use the i3 tiling window manager for exactly this reason. I do like tmux on remote machines though; I even made a few videos on it. Cheers!
thank u
hmm