issue185:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | Prochaine révisionLes deux révisions suivantes | ||
issue185:c_c [2022/10/03 07:03] – d52fr | issue185:c_c [2022/10/03 19:46] – d52fr | ||
---|---|---|---|
Ligne 6: | Ligne 6: | ||
Know that you can run top without elevated privileges, but to get the most out of it, rather use elevated privileges; it just ensures that you have access to everything. Here is a quick factoid, it is called top as it sorts the most CPU intensive PID to the top. The main place top and htop differ is in the header. This is the other place you can find the load average, other than uptime (a favourite LPI question). That load average can be good or bad, depending on the amount of CPUs you have in your system. For you to see the CPUs in top, you need to press “1”. This goes for other tools too, like glances, I want to see ‘at a glance’ what my CPUs (plural) are doing, I don’t want to remember key bindings. ** | Know that you can run top without elevated privileges, but to get the most out of it, rather use elevated privileges; it just ensures that you have access to everything. Here is a quick factoid, it is called top as it sorts the most CPU intensive PID to the top. The main place top and htop differ is in the header. This is the other place you can find the load average, other than uptime (a favourite LPI question). That load average can be good or bad, depending on the amount of CPUs you have in your system. For you to see the CPUs in top, you need to press “1”. This goes for other tools too, like glances, I want to see ‘at a glance’ what my CPUs (plural) are doing, I don’t want to remember key bindings. ** | ||
+ | |||
+ | Nous étions en train de discuter d'un problème sur l'un des pods (groupe de conteneurs) au travail, lorsque mon collègue a fait un commentaire avec lequel j' | ||
+ | |||
+ | Dans mon activité quotidienne, | ||
+ | |||
+ | Tout cela mis à part, top est une de ces choses que vous DEVEZ connaître, que ce soit pour le travail ou pour ce bel examen du LPI que vous allez passer. Désolé d' | ||
+ | |||
+ | Sachez que vous pouvez exécuter top sans privilèges élevés, mais pour en tirer le meilleur parti, utilisez plutôt les privilèges élevés ; cela vous assure simplement d' | ||
+ | |||
**That second line gets important when you have a laptop, where you do not want processes burning battery, otherwise more running tasks are not a problem. The abbreviations are usually a sticking point for newbies. I will run through them here quickly, there are screenshots if you don’t want to open top on your system. (I’ll probably steal it off the Internet as it is a lot of typing). | **That second line gets important when you have a laptop, where you do not want processes burning battery, otherwise more running tasks are not a problem. The abbreviations are usually a sticking point for newbies. I will run through them here quickly, there are screenshots if you don’t want to open top on your system. (I’ll probably steal it off the Internet as it is a lot of typing). | ||
Ligne 19: | Ligne 28: | ||
True story, I installed Ubuntu Budgie on my cousin’s PC as it was slow as molasses with Windows, and I noticed a value in ‘wa’. Now this can happen if your system is low on memory, when it constantly writes to the drive, but in his case it was that his BIOS was incorrectly configured and the SATA channel was in “compatible” / “legacy” mode and not AHCI. ** | True story, I installed Ubuntu Budgie on my cousin’s PC as it was slow as molasses with Windows, and I noticed a value in ‘wa’. Now this can happen if your system is low on memory, when it constantly writes to the drive, but in his case it was that his BIOS was incorrectly configured and the SATA channel was in “compatible” / “legacy” mode and not AHCI. ** | ||
+ | |||
+ | Cette deuxième ligne devient importante lorsque vous avez un ordinateur portable, où vous ne voulez pas que les processus grillent la batterie ; sinon, plus de tâches en cours ne sont pas un problème. Les abréviations sont généralement un point difficile pour les débutants. Je vais les parcourir ici rapidement ; il y a des captures d' | ||
+ | |||
+ | ••us : user cpu time (ou) % de temps CPU passé dans l' | ||
+ | ••sy : system cpu time (ou) % de temps CPU passé dans l' | ||
+ | ••ni : user nice cpu time (ou) % de temps CPU passé sur des processus de basse priorité | ||
+ | ••id : idle cpu time (ou) % du temps CPU passé en inactivité | ||
+ | ••wa : io wait cpu time (ou) % de temps CPU passé en attente (sur le disque) | ||
+ | ••hi : hardware irq (ou) % du temps CPU passé à gérer les interruptions matérielles | ||
+ | ••si : software irq (ou) % du temps CPU consacré à gérer des interruptions logicielles | ||
+ | ••st : steal time - - % de temps CPU en attente involontaire par le processeur virtuel pendant que l' | ||
+ | |||
+ | Histoire vraie : j'ai installé Ubuntu Budgie sur le PC de mon cousin car il était très lent avec Windows, et j'ai remarqué une valeur dans « wa ». Maintenant, cela peut arriver si votre système est faible en mémoire, quand il écrit constamment sur le disque, mais dans son cas, c'est que son BIOS était mal configuré et le canal SATA était en mode « compatible »/« legacy » et non AHCI. | ||
+ | |||
**The MIB mem and the MIB swap line, is the same as the free command (hello, LPI questions). As you can see from my screenshot, I have 4GB memory in my laptop, with 400MB free and about 1.6GB in use and cache. I recently opened my music player; it usually takes a second or two to open, but the second time around it is greased lightning as it is in that buff/cache. If you noticed, you would see my swap is starting to be used, which will slow my system down soon. :/ I say soon as usually it is inactive memory pages that get inserted first (my old man gripe about the new programming paradigm where “unused memory is wasted memory” comes into play here). | **The MIB mem and the MIB swap line, is the same as the free command (hello, LPI questions). As you can see from my screenshot, I have 4GB memory in my laptop, with 400MB free and about 1.6GB in use and cache. I recently opened my music player; it usually takes a second or two to open, but the second time around it is greased lightning as it is in that buff/cache. If you noticed, you would see my swap is starting to be used, which will slow my system down soon. :/ I say soon as usually it is inactive memory pages that get inserted first (my old man gripe about the new programming paradigm where “unused memory is wasted memory” comes into play here). | ||
Ligne 26: | Ligne 49: | ||
Sorry newbies, you just have to shoulder through it. The selector is your space bar (“Space toggles display”, this meant pudding to me when I first saw it). You can select what you want (and do not want) with it. This becomes important when you need to see more in your limited display window. If you un-select what you don’t need, what is left will have more space to display information (so don’t select everything, OK?). Just hit the escape key when you are done and your new layout will await you. This is all controllable via a .rc file if you want persistence. Keep in mind that if you ran top with sudo and you run it again without, it will be default. As for the color difference between top and htop, you can use the “z” key to inject some color, but it is red and pink, not something I care about. As you can see, I/O granularity is sorely lacking at a glance, you don’t know what program is grinding your disk. Something Linux really needs in top, and yes I know about iotop, but again, not available in a vanilla container.** | Sorry newbies, you just have to shoulder through it. The selector is your space bar (“Space toggles display”, this meant pudding to me when I first saw it). You can select what you want (and do not want) with it. This becomes important when you need to see more in your limited display window. If you un-select what you don’t need, what is left will have more space to display information (so don’t select everything, OK?). Just hit the escape key when you are done and your new layout will await you. This is all controllable via a .rc file if you want persistence. Keep in mind that if you ran top with sudo and you run it again without, it will be default. As for the color difference between top and htop, you can use the “z” key to inject some color, but it is red and pink, not something I care about. As you can see, I/O granularity is sorely lacking at a glance, you don’t know what program is grinding your disk. Something Linux really needs in top, and yes I know about iotop, but again, not available in a vanilla container.** | ||
+ | |||
+ | Les lignes MIB mem et MIB Éch sont les mêmes qu' | ||
+ | |||
+ | Bref, il est temps de faire travailler Top pour nous. Ouvrez top et appuyez sur « f » pour voir les options. | ||
+ | Vous devriez voir cette sortie se charger - elle peut effrayer les nouveaux venus. | ||
+ | |||
+ | Désolé les nouveaux, vous devez juste vous y faire. Le sélecteur est votre barre d' | ||
+ | |||
**The last thing is the mouse support for those key shortcuts at the bottom of top. Sometimes, when F10 press does not work, or you have a keyboard without F-keys, you can click on the F10 for it to exit. This is actually handier than you think and has saved me many times before. This is sorely missing on top. (That sounds weird; it’s not inside, it’s on top!). | **The last thing is the mouse support for those key shortcuts at the bottom of top. Sometimes, when F10 press does not work, or you have a keyboard without F-keys, you can click on the F10 for it to exit. This is actually handier than you think and has saved me many times before. This is sorely missing on top. (That sounds weird; it’s not inside, it’s on top!). | ||
Ligne 32: | Ligne 63: | ||
Did I make a mistake? Something unclear? misc@fullcirclemagazine.org** | Did I make a mistake? Something unclear? misc@fullcirclemagazine.org** | ||
+ | |||
+ | La dernière chose est le support de la souris pour ces raccourcis clavier en bas de top. Parfois, lorsque la touche F10 ne fonctionne pas, ou que vous avez un clavier sans touches F, vous pouvez cliquer sur la touche F10 pour qu' | ||
+ | |||
+ | Je n'ai jamais eu besoin de faire en sorte que top ait un aspect persistant, la valeur par défaut est très bien, mais ce sont ces étapes supplémentaires qui me dérangent. Pourquoi utiliser trois étapes, là où cinq suffisent ? | ||
+ | |||
+ | Ai-je fait une erreur ? Quelque chose de pas clair ? misc@fullcirclemagazine.org |
issue185/c_c.txt · Dernière modification : 2022/10/04 17:24 de andre_domenech