issue104:tutoriel4
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édente | ||
issue104:tutoriel4 [2016/01/15 19:24] – d52fr | issue104:tutoriel4 [2016/01/17 17:24] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 13: | Ligne 13: | ||
Qu' | Qu' | ||
- | Un processus est une instance d'une ou plusieurs taches connectées ou « threads » qui sont exécutées par l' | + | Un processus est une instance d'une ou plusieurs taches connectées, ou « threads », qui sont exécutées par l' |
- | Avec l'aide de groupes de contrôle (cgroups), | + | Avec l'aide de groupes de contrôle (cgroups), |
- | Pour identifier, contrôler et manipuler les processus, le système d' | + | Pour identifier, contrôler et manipuler les processus, le système d' |
**The program ‘top’ | **The program ‘top’ | ||
Ligne 33: | Ligne 33: | ||
Le programme « Top » | Le programme « Top » | ||
- | Pour démarrer top, bous devons ouvrir un terminal et taper simplement « top ». Là, les écrans sont remplis avec des tas de données. Pour les rendre compréhensibles, | + | Pour démarrer top, nous devons ouvrir un terminal et taper simplement « top ». Maintenant, l' |
top - 20:14:42 up 57 min : donne l' | top - 20:14:42 up 57 min : donne l' | ||
Ligne 39: | Ligne 39: | ||
1 user (utilisateur) : nombre d' | 1 user (utilisateur) : nombre d' | ||
- | load average (charge moyenne) : 0.97, 1.11, 1.08 : montre la charge moyenne du CPU pendant les dernières 1,5 et 15 minutes. Pour une meilleure précision, divisez-le par le nombre de cœurs | + | load average (charge moyenne) : 0.97, 1.11, 1.08 : montre la charge moyenne du CPU pendant les dernières 1,5 et 15 minutes. Pour une meilleure précision, divisez-le par le nombre de cœurs |
- | Tasks (taches) : 140 total, 1 running (en cours), 138 sleeping (dormante), 0 stopped (arrêtée), | + | Tasks (tâches) : 140 total, 1 running (en cours), 138 sleeping (dormante), 0 stopped (arrêtée), |
**The third row shows the CPU workload for different clients: | **The third row shows the CPU workload for different clients: | ||
Ligne 54: | Ligne 54: | ||
The fourth and the fifth rows show the usage of the memory and swap - the amount in use and the amount that’s still free.** | The fourth and the fifth rows show the usage of the memory and swap - the amount in use and the amount that’s still free.** | ||
+ | |||
+ | La troisième ligne montre la charge des CPU pour différents clients : | ||
+ | |||
+ | « us » l' | ||
+ | « sy » le noyau ; | ||
+ | « ni » des travaux utilisateurs à faible priorité ; | ||
+ | « id » le mode Idle (inactif) (s'il est haut, la charge est faible et vice-versa) ; | ||
+ | « wa » le pourcentage de travaux attendant du temps de calcul. | ||
+ | Les interruptions sont affichées dans « hi », interruptions matériel et« si », interruptions logiciel | ||
+ | « st » (steal time - temps volé) montre la quantité de puissance CPU utilisée par une machine virtuelle. | ||
+ | |||
+ | Les quatrième et cinquième lignes montrent l' | ||
**Below the system information we find the process list. It is structured in 12 parts: | **Below the system information we find the process list. It is structured in 12 parts: | ||
Ligne 77: | Ligne 89: | ||
• f the user can decide what task details should be displayed by top. | • f the user can decide what task details should be displayed by top. | ||
• o the user may configure the order of the list by his own needs.** | • o the user may configure the order of the list by his own needs.** | ||
+ | |||
+ | Sous les informations système, nous trouvons la liste des processus. Elle est construite en 12 parties : | ||
+ | |||
+ | • PID Identifiant du processus ; | ||
+ | • USER | ||
+ | • PR | ||
+ | • NI | ||
+ | • VIRT | ||
+ | • RES mémoire physique ; | ||
+ | • SHR mémoire partagée ; | ||
+ | • S statut ; | ||
+ | • %CPU | ||
+ | • %MEM | ||
+ | • TIME+ temps écoulé depuis le démarrage du processus ; | ||
+ | • COMMAND | ||
+ | |||
+ | Il y a quelques raccourcis clavier pour personnaliser l' | ||
+ | |||
+ | • t cache/ | ||
+ | • m cache ou affiche les quatrième et cinquième lignes (mémoire, swap, etc.) ; | ||
+ | • A trie la liste des processus par ordre d' | ||
+ | • f l' | ||
+ | • o l' | ||
**Working with top | **Working with top | ||
Ligne 88: | Ligne 123: | ||
If a system is running slowly, top may help to analyze the reason. Mostly it will be sufficient to stop one or more processes to fix the problem. If this is not possible – because none of the running tasks can be terminated – their priority can be reduced and the priority of more important process can be raised. A higher priority means more computing time from the processor, and vice versa.** | If a system is running slowly, top may help to analyze the reason. Mostly it will be sufficient to stop one or more processes to fix the problem. If this is not possible – because none of the running tasks can be terminated – their priority can be reduced and the priority of more important process can be raised. A higher priority means more computing time from the processor, and vice versa.** | ||
+ | |||
+ | Utiliser top | ||
+ | |||
+ | Pour manipuler un processus, top offre deux solutions : | ||
+ | |||
+ | • Pour arrêter un programme dont on n'a plus besoin, ou qui a planté, la commande k (kill - tuer) est très utile. Une fois la commande k envoyée, top nous demande le PID du programme que nous voulons arrêter. Après saisie du PID, top nous demande de confirmer l' | ||
+ | • Pour modifier la priorité d'une tâche, nous utilisons la commande r (renice - renouveler nice). Elle rend possible la réduction et l' | ||
+ | |||
+ | Puisque la commande « r » est peut-être inconnue de beaucoup d' | ||
+ | |||
+ | Si un système tourne lentement, top peut aider à analyser la raison. En général, il suffit d' | ||
**Linux, based on UNIX, works with the UNIX system to determine priorities. The highest level is -20, the lowest 19. That means the more important a process is the lower is the assigned number. This number is called the ‘Nice Value’ and is displayed, as mentioned before, in the column NI in the process list. | **Linux, based on UNIX, works with the UNIX system to determine priorities. The highest level is -20, the lowest 19. That means the more important a process is the lower is the assigned number. This number is called the ‘Nice Value’ and is displayed, as mentioned before, in the column NI in the process list. | ||
Ligne 96: | Ligne 142: | ||
Top is easy to understand, so everybody can use it. It has not only display functions, it also enables the user to intervene in processes.** | Top is easy to understand, so everybody can use it. It has not only display functions, it also enables the user to intervene in processes.** | ||
+ | |||
+ | Basé sur UNIX, Linux travaille avec le système UNIX pour déterminer les priorités. Le plus haut niveau est -20, le plus bas 19. Ceci signifie que, plus le processus est important, plus le nombre attribué est bas. Ce nombre est appelé la « Valeur nice » et est affichée, comme indiqué plus haut, dans la colonne NI de la liste des processus. | ||
+ | |||
+ | Pour augmenter la « valeur nice », top doit démarrer comme root. Il est possible de renouveler le nice d'un processus du propriétaire (l' | ||
+ | |||
+ | Conclusion | ||
+ | |||
+ | Top est facile à comprendre, de sorte que chacun peut l' | ||
**BIO : Jürgen is the former author of the now defunct YALM (Yet Another Linux Magazine) and a Linux user since 2007.** | **BIO : Jürgen is the former author of the now defunct YALM (Yet Another Linux Magazine) and a Linux user since 2007.** | ||
- | Bio : Jurgen est l' | + | Bio : Jurgen est l' |
issue104/tutoriel4.1452882252.txt.gz · Dernière modification : 2016/01/15 19:24 de d52fr