issue146:certifie_linux
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
issue146:certifie_linux [2019/07/02 16:27] – auntiee | issue146:certifie_linux [2019/07/05 11:51] – andre_domenech | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
Many of you will know lsof. If you do not, head over to the man page. I can see frowns appearing - how can a command that lists open files tell us anything about availability and troubleshooting a disk? I will tell you, lsof is like second tier support, once you have identified you actually have an issue. We are starting with something really easy, then easing you into more complex commands. Let’s assume you used something like sar or iostat to identify that something is amiss. Remember Linux treats everything like a file. When you are troubleshooting, | Many of you will know lsof. If you do not, head over to the man page. I can see frowns appearing - how can a command that lists open files tell us anything about availability and troubleshooting a disk? I will tell you, lsof is like second tier support, once you have identified you actually have an issue. We are starting with something really easy, then easing you into more complex commands. Let’s assume you used something like sar or iostat to identify that something is amiss. Remember Linux treats everything like a file. When you are troubleshooting, | ||
- | Okay we identified an issue, and we use lsof to see which files are using the disk. As you know lsof run as root gives you information overload, so we have to filter that. You can use “-u” to specify a user, so, if it is a web server, you can see which files Apache has open, for instance. If you have only desktop Linux, don’t worry, this will work just as well with your user, try it now. Have a look at my output on my laptop: | + | Je salue le retour des apprenants et j' |
+ | |||
+ | Beaucoup d' | ||
+ | |||
+ | **Okay we identified an issue, and we use lsof to see which files are using the disk. As you know lsof run as root gives you information overload, so we have to filter that. You can use “-u” to specify a user, so, if it is a web server, you can see which files Apache has open, for instance. If you have only desktop Linux, don’t worry, this will work just as well with your user, try it now. Have a look at my output on my laptop: | ||
Now if you look at my “device” column, you will see 8,2. If you have a blank stare right now, I did too, the first time I saw it. Looking for the device is not simple either as ls -l /dev | grep 8,2 brings up no results! Do not wildcard it (ls -l /dev | grep 8,*) as it will just list anything with an 8 in it, instead, just use 8. Please try all three ways on your system now using YOUR device number, to see why. | Now if you look at my “device” column, you will see 8,2. If you have a blank stare right now, I did too, the first time I saw it. Looking for the device is not simple either as ls -l /dev | grep 8,2 brings up no results! Do not wildcard it (ls -l /dev | grep 8,*) as it will just list anything with an 8 in it, instead, just use 8. Please try all three ways on your system now using YOUR device number, to see why. | ||
- | Now, how do we bring it together? Well let’s say top or htop is giving you excessive usage in one of our resources, lsof will list the PID too and you need to match the two up. Then, from that bit of information, | + | Now, how do we bring it together? Well let’s say top or htop is giving you excessive usage in one of our resources, lsof will list the PID too and you need to match the two up. Then, from that bit of information, |
- | How easy was that? I told you Linux was not difficult! Remember, LPI wants to know you can diagnose performance issues as it helps you plan for the future. I refer you back to the very first link about exam objectives. The key words are “measure” and “troubleshoot” and “capacity planning”. | + | Bon. Nous venons d' |
+ | |||
+ | Si vous regardez ma colonne « device » (dispositif), | ||
+ | |||
+ | Bon. Comment rassembler le tout ? Disons que top ou htop vous donne un usage excessif dans l'une de vos ressources ; lsof listera le PID aussi et vous devez accorder les deux. Ensuite, à partir de cette information, | ||
+ | |||
+ | **How easy was that? I told you Linux was not difficult! Remember, LPI wants to know you can diagnose performance issues as it helps you plan for the future. I refer you back to the very first link about exam objectives. The key words are “measure” and “troubleshoot” and “capacity planning”. | ||
Let us look at a typical exam question: In capacity planning exercises, which tools assist in listing and identifying processes of interest? (Choose TWO correct answers): | Let us look at a typical exam question: In capacity planning exercises, which tools assist in listing and identifying processes of interest? (Choose TWO correct answers): | ||
Ligne 16: | Ligne 26: | ||
C. pstree | C. pstree | ||
D. telinit b | D. telinit b | ||
- | Since it cannot be A or D, it must be B and C. See how easy that was? acpid is not a command but an event notifier, and telinit tells your computer which runlevel you want to move to. Try them all in a terminal if you like. | + | Since it cannot be A or D, it must be B and C. See how easy that was? acpid is not a command but an event notifier, and telinit tells your computer which runlevel you want to move to. Try them all in a terminal if you like.** |
- | If you would like to jump ahead, or test your skills at an LPI exam, do a test paper here: https:// | + | C' |
+ | |||
+ | Regardons une question typique de l' | ||
+ | A. acpid | ||
+ | B. lsof | ||
+ | C. pstree | ||
+ | D. telinit b | ||
+ | |||
+ | Puisque A ou D ne vont pas du tout, la réponse doit être B et C. Vous voyez combien c' | ||
+ | |||
+ | **If you would like to jump ahead, or test your skills at an LPI exam, do a test paper here: https:// | ||
These were once valid LPI questions and will ease you into the format. | These were once valid LPI questions and will ease you into the format. | ||
Ligne 25: | Ligne 45: | ||
*The site does require signing up, but sign up with a temporary email, not your real email. | *The site does require signing up, but sign up with a temporary email, not your real email. | ||
- | Let us know how you did – good or bad, it does not matter. Good means you are ready to write and confident in your skills. | + | Let us know how you did – good or bad, it does not matter. Good means you are ready to write and confident in your skills. |
+ | |||
+ | Si vous voulez aller rapidement plus loin, ou tester vos compétences à un examen du LPI, vous pouvez passer un examen type ici : https:// | ||
+ | |||
+ | Il y a quelque temps c' | ||
+ | |||
+ | * Le nouveau numéro d' | ||
+ | * Le site nécessite une inscription, | ||
+ | |||
+ | Partagez vos résultats avec nous - bons ou mauvais, ce n'est pas important. Bon signifie que vous êtes prêt à passer l' | ||
issue146/certifie_linux.txt · Dernière modification : 2019/07/11 08:07 de d52fr