Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
elearning:workbooks:centos:8:junior:l112 [2021/06/02 15:34] – created admin | elearning:workbooks:centos:8:junior:l112 [2023/08/25 01:14] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | Version : **2021.01** | + | Version : **2023.01** |
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF207 | + | ======LCF507 |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF207 | + | * **LCF507 |
* Contenu du Module | * Contenu du Module | ||
* Présentation | * Présentation | ||
* Les Types de Processus | * Les Types de Processus | ||
- | * Les Commandes relatives aux Processus | + | * LAB #1 - Les Commandes relatives aux Processus |
- | * La Commande ps | + | * 1.1 - La Commande ps |
- | * La Commande pgrep | + | * 1.2 - La Commande pgrep |
- | * La Commande pstree | + | * 1.3 - La Commande pstree |
- | * La Commande top | + | * 1.4 - La Commande top |
- | * Les Commandes fg, bg et jobs | + | * 1.5 - Les Commandes fg, bg et jobs |
- | * La Commande wait | + | * 1.6 - La Commande wait |
- | * La Commande nice | + | * 1.7 - La Commande nice |
- | * La Commande renice | + | * 1.8 - La Commande renice |
- | * La Commande nohup | + | * 1.9 - La Commande nohup |
- | * La Commande kill | + | * 1.10 - La Commande kill |
- | * La Commande pkill | + | * 1.11 - La Commande pkill |
=====Présentation===== | =====Présentation===== | ||
Ligne 46: | Ligne 46: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | 1 1347 20 | + | 1 1113 1158 1464 1590 1601 163 |
- | 10 14 21 | + | 10 1125 |
- | 1015 1410 218 2481 28 3076 3160 3256 3395 373 | + | 11 1126 13 15 16 1627 164 |
- | 11 15 22 | + | 1111 1135 14 1585 1600 1628 165 |
- | 12 | + | |
- | 1217 1677 221 259 | + | |
- | 1219 1687 222 26 2902 3092 3219 3285 3434 38 4112 484 509 700 | + | |
- | 1228 1688 223 260 | + | |
- | 1229 17 224 261 | + | |
- | 1231 18 227 262 | + | |
- | 13 19 229 263 | + | |
- | 1327 2 | + | |
</ | </ | ||
Ligne 64: | Ligne 56: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
total 0 | total 0 | ||
- | dr-xr-xr-x. 2 root root 0 Oct 27 16:20 attr | + | dr-xr-xr-x. 2 root root 0 Jun 3 09:01 attr |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 autogroup | + | -rw-r--r--. 1 root root 0 Jun 3 09:02 autogroup |
- | -r--------. 1 root root 0 Oct 27 16:20 auxv | + | -r--------. 1 root root 0 Jun 3 09:02 auxv |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 cgroup | + | -r--r--r--. 1 root root 0 Jun 3 09:01 cgroup |
- | --w-------. 1 root root 0 Oct 27 16:20 clear_refs | + | --w-------. 1 root root 0 Jun 3 09:02 clear_refs |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 cmdline | + | -r--r--r--. 1 root root 0 Jun 3 09:01 cmdline |
- | -rw-r--r--. 1 root root 0 Oct 27 16:06 comm | + | -rw-r--r--. 1 root root 0 Jun 3 09:01 comm |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 coredump_filter | + | -rw-r--r--. 1 root root 0 Jun 3 09:02 coredump_filter |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 cpuset | + | -r--r--r--. 1 root root 0 Jun 3 09:02 cpu_resctrl_groups |
- | lrwxrwxrwx. 1 root root 0 Oct 27 16:20 cwd -> / | + | -r--r--r--. 1 root root 0 Jun 3 09:02 cpuset |
- | -r--------. 1 root root 0 Oct 27 16:06 environ | + | lrwxrwxrwx. 1 root root 0 Jun 3 09:02 cwd -> / |
- | lrwxrwxrwx. 1 root root 0 Oct 27 16:06 exe -> / | + | -r--------. 1 root root 0 Jun 3 09:01 environ |
- | dr-x------. 2 root root 0 Oct 27 16:06 fd | + | lrwxrwxrwx. 1 root root 0 Jun 3 09:01 exe -> / |
- | dr-x------. 2 root root 0 Oct 27 16:20 fdinfo | + | dr-x------. 2 root root 0 Jun 3 09:01 fd |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 gid_map | + | dr-x------. 2 root root 0 Jun 3 09:01 fdinfo |
- | -r--------. 1 root root 0 Oct 27 16:20 io | + | -rw-r--r--. 1 root root 0 Jun 3 09:01 gid_map |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 limits | + | -r--------. 1 root root 0 Jun 3 09:02 io |
- | -rw-r--r--. 1 root root 0 Oct 27 16:06 loginuid | + | -r--r--r--. 1 root root 0 Jun 3 09:02 limits |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 maps | + | -rw-r--r--. 1 root root 0 Jun 3 09:01 loginuid |
- | -rw-------. 1 root root 0 Oct 27 16:20 mem | + | dr-x------. 2 root root 0 Jun 3 09:02 map_files |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 mountinfo | + | -r--r--r--. 1 root root 0 Jun 3 09:01 maps |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 mounts | + | -rw-------. 1 root root 0 Jun 3 09:02 mem |
- | -r--------. 1 root root 0 Oct 27 16:20 mountstats | + | -r--r--r--. 1 root root 0 Jun 3 09:01 mountinfo |
- | dr-xr-xr-x. 6 root root 0 Oct 27 16:06 net | + | -r--r--r--. 1 root root 0 Jun 3 09:01 mounts |
- | dr-x--x--x. 2 root root 0 Oct 27 16:20 ns | + | -r--------. 1 root root 0 Jun 3 09:02 mountstats |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 numa_maps | + | dr-xr-xr-x. 6 root root 0 Jun 3 09:01 net |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 oom_adj | + | dr-x--x--x. 2 root root 0 Jun 3 09:02 ns |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 oom_score | + | -r--r--r--. 1 root root 0 Jun 3 09:02 numa_maps |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 oom_score_adj | + | -rw-r--r--. 1 root root 0 Jun 3 09:02 oom_adj |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 pagemap | + | -r--r--r--. 1 root root 0 Jun 3 09:02 oom_score |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 personality | + | -rw-r--r--. 1 root root 0 Jun 3 09:02 oom_score_adj |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 projid_map | + | -r--------. 1 root root 0 Jun 3 09:02 pagemap |
- | lrwxrwxrwx. 1 root root 0 Oct 27 16:06 root -> / | + | -r--------. 1 root root 0 Jun 3 09:02 patch_state |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 sched | + | -r--------. 1 root root 0 Jun 3 09:02 personality |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 sessionid | + | -rw-r--r--. 1 root root 0 Jun 3 09:02 projid_map |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 smaps | + | lrwxrwxrwx. 1 root root 0 Jun 3 09:01 root -> / |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 stack | + | -rw-r--r--. 1 root root 0 Jun 3 09:01 sched |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 stat | + | -r--r--r--. 1 root root 0 Jun 3 09:02 schedstat |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 statm | + | -r--r--r--. 1 root root 0 Jun 3 09:01 sessionid |
- | -r--r--r--. 1 root root 0 Oct 27 16:06 status | + | -rw-r--r--. 1 root root 0 Jun 3 09:01 setgroups |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 syscall | + | -r--r--r--. 1 root root 0 Jun 3 09:02 smaps |
- | dr-xr-xr-x. 3 root root 0 Oct 27 16:06 task | + | -r--r--r--. 1 root root 0 Jun 3 09:02 smaps_rollup |
- | -rw-r--r--. 1 root root 0 Oct 27 16:20 uid_map | + | -r--------. 1 root root 0 Jun 3 09:02 stack |
- | -r--r--r--. 1 root root 0 Oct 27 16:20 wchan | + | -r--r--r--. 1 root root 0 Jun 3 09:01 stat |
+ | -r--r--r--. 1 root root 0 Jun 3 09:02 statm | ||
+ | -r--r--r--. 1 root root 0 Jun 3 09:01 status | ||
+ | -r--------. 1 root root 0 Jun 3 09:02 syscall | ||
+ | dr-xr-xr-x. 3 root root 0 Jun 3 09:01 task | ||
+ | -r--r--r--. 1 root root 0 Jun 3 09:02 timers | ||
+ | -rw-rw-rw-. 1 root root 0 Jun 3 09:02 timerslack_ns | ||
+ | -rw-r--r--. 1 root root 0 Jun 3 09:01 uid_map | ||
+ | -r--r--r--. 1 root root 0 Jun 3 09:02 wchan | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** - Vous n'avez pas besoin de consulter le contenu des fichiers et des répertoires. Il convient tout simplement de savoir que ces données existent. Naviguez donc à /root en ligne de commande. | + | **Important** - Vous n'avez pas besoin de consulter le contenu des fichiers et des répertoires. Il convient tout simplement de savoir que ces données existent. |
</ | </ | ||
Ligne 136: | Ligne 136: | ||
* //zombie// – le processus a terminé son exécution et est prêt à mourir. | * //zombie// – le processus a terminé son exécution et est prêt à mourir. | ||
- | =====Les Commandes relatives aux Processus===== | + | =====LAB #1 - Les Commandes relatives aux Processus===== |
- | ====La Commande ps==== | + | ====1.1 - La Commande ps==== |
Cette commande affiche les processus de l’utilisateur attaché au terminal : | Cette commande affiche les processus de l’utilisateur attaché au terminal : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 | + | [root@centos8 |
- | PID TTY TIME CMD | + | PID TTY TIME CMD |
- | 4070 pts/0 00:00:00 su | + | 1627 pts/0 00:00:00 su |
- | 4077 pts/0 00:00:00 bash | + | 1634 pts/0 00:00:00 bash |
- | 4285 pts/0 00:00:00 ps | + | 1690 pts/0 00:00:00 ps |
</ | </ | ||
Ligne 154: | Ligne 154: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | F S | + | F S |
- | 4 S | + | 4 S |
- | 4 S | + | 4 S |
- | 0 R | + | 0 R |
</ | </ | ||
Ligne 181: | Ligne 181: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | F | + | F |
- | 4 | + | 4 |
- | --system --deserialize | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 5 0 12 | + | 1 0 12 |
- | 1 0 13 | + | 5 0 13 |
- | 5 0 14 | + | 1 0 14 |
- | 1 | + | 1 |
- | 1 0 16 | + | 5 0 16 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 0 | + | 5 0 |
--More-- | --More-- | ||
</ | </ | ||
Ligne 218: | Ligne 218: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | USER | + | USER |
- | root | + | root |
- | ystem --deserialize | + | root |
- | root | + | root |
- | root | + | root 4 |
- | root 5 | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root 10 0.1 | + | root 10 0.0 |
- | root 11 0.2 | + | root 11 0.0 |
- | root 12 0.0 0.0 0 0 ? S | + | root 12 0.0 0.0 0 0 ? S |
- | root 13 0.0 0.0 0 0 ? S< 16:06 0:00 [khelper] | + | root 13 0.0 0.0 0 0 ? S 09:01 0:00 [watchdog/0] |
- | root 14 0.0 0.0 0 0 ? S | + | root 14 0.0 0.0 0 0 ? S |
- | root 15 0.0 0.0 0 0 ? S< 16:06 0:00 [netns] | + | root 15 0.0 0.0 0 0 ? S 09:01 0:00 [cpuhp/1] |
- | root 16 0.0 0.0 0 0 ? S< 16:06 0:00 [writeback] | + | root 16 0.0 0.0 0 0 ? S 09:01 0:00 [watchdog/1] |
- | root 17 0.0 0.0 0 0 ? S< 16:06 0:00 [kintegrityd] | + | root 17 0.0 0.0 0 0 ? S 09:01 0:00 [migration/1] |
- | root 18 0.0 0.0 0 0 ? S< 16:06 0:00 [bioset] | + | root 18 0.0 0.0 0 0 ? S 09:01 0:00 [ksoftirqd/1] |
- | root 19 0.0 0.0 0 0 ? | + | root 19 0.0 0.0 0 0 ? |
- | root 20 0.0 0.0 0 0 ? | + | root 20 0.0 0.0 0 0 ? |
- | root 21 0.0 0.0 0 0 ? S< 16:06 0:00 [md] | + | root 21 0.0 0.0 0 0 ? S 09:01 0:00 [cpuhp/2] |
- | root | + | root |
--More-- | --More-- | ||
</ | </ | ||
Ligne 250: | Ligne 250: | ||
^ %CPU | Ressources du microprocesseur utilisées par le processus | | ^ %CPU | Ressources du microprocesseur utilisées par le processus | | ||
^ %MEM | Ressources en mémoire vive utilisées par le processus | | ^ %MEM | Ressources en mémoire vive utilisées par le processus | | ||
- | |||
- | ===Options de la commande ps=== | ||
Les options de cette commande sont : | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
Usage: | Usage: | ||
ps [options] | ps [options] | ||
- | Try ' | + | Basic options: |
- | or 'ps --help <s|l|o|t|m|a>' | + | -A, -e all processes |
- | for additional | + | |
+ | a all with tty, including other users | ||
+ | -d all except session leaders | ||
+ | -N, --deselect | ||
+ | r only running processes | ||
+ | T all processes on this terminal | ||
+ | x | ||
+ | |||
+ | Selection by list: | ||
+ | -C <command> command name | ||
+ | -G, --Group < | ||
+ | -g, --group < | ||
+ | -p, p, --pid < | ||
+ | --ppid < | ||
+ | -q, q, --quick-pid < | ||
+ | process id (quick mode) | ||
+ | -s, --sid < | ||
+ | -t, t, --tty < | ||
+ | -u, U, --user < | ||
+ | -U, --User < | ||
+ | |||
+ | The selection options take as their argument either: | ||
+ | a comma-separated list e.g. '-u root, | ||
+ | a blank-separated list e.g. '-p 123 4567' | ||
+ | |||
+ | Output formats: | ||
+ | | ||
+ | | ||
+ | f, --forest | ||
+ | | ||
+ | | ||
+ | j BSD job control format | ||
+ | | ||
+ | l BSD long format | ||
+ | -M, Z add security data (for SELinux) | ||
+ | | ||
+ | O < | ||
+ | -o, o, --format < | ||
+ | user-defined format | ||
+ | | ||
+ | u | ||
+ | v | ||
+ | X | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | set screen width | ||
+ | | ||
+ | set screen height | ||
+ | |||
+ | Show threads: | ||
+ | H as if they were processes | ||
+ | | ||
+ | -m, m after processes | ||
+ | | ||
+ | |||
+ | Miscellaneous options: | ||
+ | | ||
+ | c show true command name | ||
+ | e show the environment after command | ||
+ | k, --sort | ||
+ | L show format specifiers | ||
+ | n | ||
+ | S, --cumulative | ||
+ | | ||
+ | -V, V, --version | ||
+ | -w, w unlimited output width | ||
+ | |||
+ | --help <simple|list|output|threads|misc|all> | ||
+ | | ||
For more details see ps(1). | For more details see ps(1). | ||
</ | </ | ||
- | ====La Commande pgrep==== | + | ====1.2 - La Commande pgrep==== |
La commande **pgrep** permet de rechercher un processus en fonction de son nom et d’autres propriétés puis d' | La commande **pgrep** permet de rechercher un processus en fonction de son nom et d’autres propriétés puis d' | ||
Ligne 275: | Ligne 344: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | 1219 | + | 905 |
+ | 1585 | ||
</ | </ | ||
Ligne 282: | Ligne 352: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
1 | 1 | ||
2 | 2 | ||
3 | 3 | ||
- | 5 | + | 4 |
6 | 6 | ||
7 | 7 | ||
- | 8 | ||
9 | 9 | ||
10 | 10 | ||
Ligne 300: | Ligne 369: | ||
17 | 17 | ||
18 | 18 | ||
- | 19 | ||
20 | 20 | ||
21 | 21 | ||
+ | 22 | ||
+ | 23 | ||
24 | 24 | ||
- | 25 | ||
26 | 26 | ||
+ | 27 | ||
--More-- | --More-- | ||
</ | </ | ||
- | ===Option | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
Usage: | Usage: | ||
Ligne 327: | Ligne 397: | ||
-g, --pgroup < | -g, --pgroup < | ||
-G, --group < | -G, --group < | ||
+ | -i, --ignore-case | ||
-n, --newest | -n, --newest | ||
-o, --oldest | -o, --oldest | ||
Ligne 346: | Ligne 417: | ||
-V, --version | -V, --version | ||
- | For more details see pgrep(1). | + | For more details see pgrep(1) |
</ | </ | ||
- | ====La Commande pstree==== | + | ====1.3 - La Commande pstree==== |
Cette commande affiche les processus en forme d' | Cette commande affiche les processus en forme d' | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | systemd─┬─ModemManager───2*[{ModemManager}] | + | systemd─┬─NetworkManager───2*[{NetworkManager}] |
- | ├─NetworkManager─┬─dhclient | + | ├─agetty |
- | │ └─3*[{NetworkManager}] | + | |
- | ├─3*[VBoxClient───VBoxClient───{VBoxClient}] | + | |
- | ├─VBoxClient───VBoxClient───2*[{VBoxClient}] | + | |
- | ├─VBoxService───7*[{VBoxService}] | + | |
- | ├─2*[abrt-watch-log] | + | |
- | ├─abrtd | + | |
- | ├─accounts-daemon───2*[{accounts-daemon}] | + | |
- | ├─alsactl | + | |
- | ├─at-spi-bus-laun─┬─dbus-daemon───{dbus-daemon} | + | |
- | │ | + | |
- | ├─at-spi2-registr───{at-spi2-registr} | + | |
├─atd | ├─atd | ||
- | ├─auditd─┬─audispd─┬─sedispatch | + | ├─auditd─┬─sedispatch |
- | │ │ | + | │ └─2*[{auditd}] |
- | │ └─{auditd} | + | |
- | ├─avahi-daemon───avahi-daemon | + | |
- | ├─bluetoothd | + | |
├─chronyd | ├─chronyd | ||
- | ├─colord───2*[{colord}] | ||
├─crond | ├─crond | ||
- | ├─cupsd | + | ├─dbus-daemon───{dbus-daemon} |
- | ├─2*[dbus-daemon───{dbus-daemon}] | + | ├─dnsmasq───dnsmasq |
- | ├─dbus-launch | + | |
- | ├─dconf-service───2*[{dconf-service}] | + | |
- | ├─evolution-addre───4*[{evolution-addre}] | + | |
- | ├─evolution-calen───4*[{evolution-calen}] | + | |
- | ├─evolution-sourc───2*[{evolution-sourc}] | + | |
├─firewalld───{firewalld} | ├─firewalld───{firewalld} | ||
- | ├─gconfd-2 | + | ├─gssproxy───5*[{gssproxy}] |
- | ├─gdm─┬─gdm-simple-slav─┬─Xorg | + | ├─irqbalance───{irqbalance} |
- | | + | ├─ksmtuned───sleep |
- | | + | ├─lsmd |
- | | + | ├─mcelog |
- | | + | ├─polkitd───7*[{polkitd}] |
- | | + | ├─rngd───4*[{rngd}] |
- | │ | + | ├─rpcbind |
- | | + | ├─rsyslogd───2*[{rsyslogd}] |
- | │ | + | |
- | | + | |
- | | + | |
- | | + | │ └─sssd_nss |
- | │ | + | ├─systemd───(sd-pam) |
- | ├─gnome-keyring-d───4*[{gnome-keyring-d}] | + | ├─systemd-journal |
- | ├─gnome-shell-cal───4*[{gnome-shell-cal}] | + | ├─systemd-logind |
- | ├─gnome-terminal-─┬─bash───su───bash───pstree | + | ├─systemd-machine |
- | | + | ├─systemd-udevd |
- | | + | └─tuned───3*[{tuned}] |
- | ... | + | |
</ | </ | ||
- | ===Options | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
pstree: unrecognized option ' | pstree: unrecognized option ' | ||
- | Usage: pstree [ -a ] [ -c ] [ -h | -H PID ] [ -l ] [ -n ] [ -p ] [ -g ] [ -u ] | + | Usage: pstree [-acglpsStuZ] [ -h | -H PID ] [ -n | -N type ] |
[ -A | -G | -U ] [ PID | USER ] | [ -A | -G | -U ] [ PID | USER ] | ||
| | ||
Ligne 428: | Ligne 478: | ||
-n, --numeric-sort | -n, --numeric-sort | ||
-N type, | -N type, | ||
- | --ns-sort=type | + | --ns-sort=type |
+ | | ||
-p, --show-pids | -p, --show-pids | ||
-s, --show-parents | -s, --show-parents | ||
-S, --ns-changes | -S, --ns-changes | ||
+ | -t, --thread-names | ||
+ | -T, --hide-threads | ||
-u, --uid-changes | -u, --uid-changes | ||
-U, --unicode | -U, --unicode | ||
-V, --version | -V, --version | ||
- | -Z, | + | -Z, --security-context |
- | | + | |
PID start at this PID; default is 1 (init) | PID start at this PID; default is 1 (init) | ||
USER show only trees rooted at processes of this user | USER show only trees rooted at processes of this user | ||
</ | </ | ||
- | ====La Commande top==== | + | ====1.4 - La Commande top==== |
Cette commande indique les processus en mémoire : | Cette commande indique les processus en mémoire : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | top - 16:28:28 up 21 min, | + | top - 09:10:02 up 8 min, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | KiB Mem : | + | MiB Mem : 3737.7 |
- | KiB Swap: | + | MiB Swap: 2000.0 |
- | | + | |
- | 3249 trainee | + | 1 root 20 |
- | 1410 root 20 | + | 827 polkitd |
- | 3756 trainee | + | 834 dbus 20 |
- | 3883 trainee | + | 1789 root 20 |
- | 4904 root 20 | + | 2 root |
- | | + | 3 root 0 -20 |
- | 525 dbus | + | 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp |
- | | + | |
- | 1 root 20 | + | |
- | 2 root 20 | + | 9 root 0 -20 |
- | | + | 10 root 20 |
- | | + | 11 root |
- | | + | 12 root rt |
- | | + | 13 root rt |
- | | + | |
- | 10 root 20 | + | 15 root 20 |
- | 11 root 20 | + | 16 root rt |
+ | 17 root rt | ||
+ | | ||
+ | 20 root 0 -20 | ||
+ | 21 root 20 | ||
+ | 22 root rt | ||
+ | 23 root rt | ||
+ | | ||
+ | 26 root 0 -20 | ||
+ | 27 root 20 | ||
+ | 28 root rt 0 0 0 0 S | ||
+ | 29 root rt | ||
+ | 30 root 20 0 0 0 0 S | ||
+ | 32 root 0 -20 | ||
+ | | ||
+ | 36 root 0 -20 | ||
+ | | ||
+ | 38 root 20 0 0 0 0 S | ||
+ | 39 root 20 | ||
+ | 40 root 0 -20 | ||
+ | | ||
+ | 42 root 25 | ||
+ | 43 root 39 19 | ||
+ | 44 root 0 -20 | ||
+ | | ||
+ | 46 root 0 -20 0 0 0 I 0.0 | ||
+ | 47 root 0 -20 0 0 0 I 0.0 | ||
+ | 48 root 0 -20 | ||
+ | 49 root 0 -20 | ||
+ | 50 root 0 -20 | ||
+ | 51 root rt | ||
+ | 53 root 0 -20 | ||
+ | 69 root 20 | ||
+ | 162 root 0 -20 | ||
+ | 163 root 0 -20 | ||
... | ... | ||
</ | </ | ||
Ligne 478: | Ligne 565: | ||
< | < | ||
- | Help for Interactive Commands - procps-ng | + | Help for Interactive Commands - procps-ng 3.3.15 |
- | Window 1:Def: Cumulative mode Off. System: Delay 20.0 secs; Secure mode Off. | + | Window 1:Def: Cumulative mode Off. System: Delay 3.0 secs; Secure mode Off. |
Z, | Z, | ||
Ligne 511: | Ligne 598: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
... | ... | ||
- | top - 16:31:05 up 24 min, | + | top - 09:11:24 up 10 min, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | KiB Mem : | + | MiB Mem : 3737.7 |
- | KiB Swap: | + | MiB Swap: 2000.0 |
Change delay from 3.0 to 1 | Change delay from 3.0 to 1 | ||
... | ... | ||
Ligne 525: | Ligne 612: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
... | ... | ||
- | top - 16:32:41 up 26 min, | + | top - 09:12:07 up 10 min, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | KiB Mem : | + | MiB Mem : 3737.7 |
- | KiB Swap: | + | MiB Swap: 2000.0 |
- | | + | |
- | 3249 trainee | + | 874 root |
- | 3883 trainee | + | 875 root |
- | 1410 root 20 | + | |
- | 3873 trainee | + | 827 polkitd |
- | 3359 trainee | + | 884 root 20 |
- | 3144 trainee | + | 866 root |
- | | + | 840 root 20 |
- | 3756 trainee | + | 1 root 20 0 |
- | 3231 trainee | + | 1627 root |
- | | + | |
- | 3418 trainee | + | 1585 root |
- | 1015 root 20 | + | 1590 trainee |
- | | + | 880 root 20 |
- | 3477 trainee | + | |
- | 1217 root 20 | + | 837 root |
- | 3395 trainee | + | |
- | 3460 trainee | + | 847 rngd 20 |
+ | 828 root | ||
+ | 1600 trainee | ||
+ | 1601 trainee | ||
+ | 834 dbus 20 | ||
+ | 1634 root 20 | ||
+ | 791 rpc | ||
+ | | ||
+ | 1113 root 20 | ||
+ | 823 root 20 0 | ||
+ | 1803 root 20 | ||
+ | ... | ||
</ | </ | ||
Ligne 556: | Ligne 654: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
... | ... | ||
- | top - 16:33:45 up 27 min, | + | top - 09:13:01 up 11 min, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | KiB Mem : | + | MiB Mem : 3737.7 |
- | KiB Swap: | + | MiB Swap: 2000.0 |
- | | + | |
- | 3249 trainee | + | 827 polkitd |
- | 1410 root 20 0 | + | 1 root |
- | 3873 trainee | + | |
- | 3756 trainee | + | 1803 root 20 |
- | 4904 root 20 | + | |
- | | + | |
- | 5080 root 20 | + | |
</ | </ | ||
Pour quitter top, appuyez sur la touche **q**. | Pour quitter top, appuyez sur la touche **q**. | ||
- | ===Options | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
top: inappropriate ' | top: inappropriate ' | ||
Usage: | Usage: | ||
- | top -hv | -bcHiOSs | + | top -hv | -bcEHiOSs1 |
</ | </ | ||
- | ====Les Commandes fg, bg et jobs==== | + | ====1.5 - Les Commandes fg, bg et jobs==== |
Normalement les commandes s’exécutent en avant plan. Vous pouvez également lancer des processus en arrière plan (en tâche de fond). Si vous lancez une commande en tâche de fond, il faut rajouter **(espace)& | Normalement les commandes s’exécutent en avant plan. Vous pouvez également lancer des processus en arrière plan (en tâche de fond). Si vous lancez une commande en tâche de fond, il faut rajouter **(espace)& | ||
Ligne 602: | Ligne 697: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [1] 9870 | + | [1] 1865 |
- | [root@centos7 | + | [root@centos8 |
- | [1]+ | + | [1]+ |
</ | </ | ||
Ligne 617: | Ligne 712: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
^Z | ^Z | ||
[2]+ Stopped | [2]+ Stopped | ||
Ligne 625: | Ligne 720: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
[2]+ sleep 1234 & | [2]+ sleep 1234 & | ||
- | [root@centos7 | + | [root@centos8 |
- | [1]- | + | [1]- |
- | [2]+ | + | [2]+ |
</ | </ | ||
Ligne 639: | Ligne 734: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 | + | [root@centos8 |
- | [1]- | + | [1]- |
- | [2]+ | + | [2]+ |
</ | </ | ||
Ligne 648: | Ligne 743: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 | + | [root@centos8 |
- | [1]- | + | [1]- |
- | [2]+ | + | [2]+ |
</ | </ | ||
Ligne 657: | Ligne 752: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [root@centos7 | + | |
- | [1]- | + | [2]+ Stopped |
- | [2]+ | + | [root@centos8 |
- | [root@centos7 | + | [1]- |
+ | [2]+ | ||
+ | [root@centos8 | ||
sleep 1234 | sleep 1234 | ||
^C | ^C | ||
- | [root@centos7 | + | [root@centos8 |
</ | </ | ||
Ligne 670: | Ligne 767: | ||
**Important** - Notez l' | **Important** - Notez l' | ||
</ | </ | ||
- | |||
- | ===Options de la commande jobs=== | ||
Les options de la commande jobs sont : | Les options de la commande jobs sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
jobs: jobs [-lnprs] [jobspec ...] or jobs -x command [args] | jobs: jobs [-lnprs] [jobspec ...] or jobs -x command [args] | ||
Display status of jobs. | Display status of jobs. | ||
Ligne 685: | Ligne 780: | ||
Options: | Options: | ||
-l lists process IDs in addition to the normal information | -l lists process IDs in addition to the normal information | ||
- | -n list only processes that have changed status since the last | + | -n lists only processes that have changed status since the last |
- | notification | + | notification |
-p lists process IDs only | -p lists process IDs only | ||
-r restrict output to running jobs | -r restrict output to running jobs | ||
Ligne 697: | Ligne 792: | ||
Exit Status: | Exit Status: | ||
Returns success unless an invalid option is given or an error occurs. | Returns success unless an invalid option is given or an error occurs. | ||
- | If -x is used, returns the exit status of COMMAND. | + | If -x is used, returns the exit status of COMMAND |
</ | </ | ||
- | ====La Commande wait==== | + | ====1.6 - La Commande wait==== |
Cette commande permet de doter un processus asynchrone du comportement d'un processus synchrone. Elle est utilisée pour attendre jusqu’à ce qu'un processus en tâche de fond soit terminé : | Cette commande permet de doter un processus asynchrone du comportement d'un processus synchrone. Elle est utilisée pour attendre jusqu’à ce qu'un processus en tâche de fond soit terminé : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [1]+ | + | [1]+ |
- | [root@centos7 | + | [root@centos8 |
^C | ^C | ||
- | [root@centos7 | + | [root@centos8 |
- | [1]+ | + | [1]+ |
</ | </ | ||
Ligne 717: | Ligne 812: | ||
</ | </ | ||
- | ====La Commande nice==== | + | ====1.7 - La Commande nice==== |
Cette commande affiche ou modifie la priorité d’un processus. La priorité par défaut de nice est 10. La valeur de nice la plus prioritaire est -20. La valeur la moins prioritaire est 19 : | Cette commande affiche ou modifie la priorité d’un processus. La priorité par défaut de nice est 10. La valeur de nice la plus prioritaire est -20. La valeur la moins prioritaire est 19 : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
^Z | ^Z | ||
[2]+ Stopped | [2]+ Stopped | ||
- | + | [root@centos8 | |
- | [root@centos7 | + | 0 |
- | 0 | + | 0 |
- | 0 | + | 4 |
- | 4 | + | 0 |
- | 0 | + | [root@centos8 |
- | + | ||
- | [root@centos7 | + | |
^Z | ^Z | ||
[3]+ Stopped | [3]+ Stopped | ||
- | + | [root@centos8 | |
- | [root@centos7 | + | 0 |
- | 0 | + | 4 |
- | 4 | + | 0 |
- | 0 | + | 0 |
- | 0 0 10403 4077 | + | 0 |
- | 0 | + | |
</ | </ | ||
Ligne 749: | Ligne 841: | ||
**Important** - Notez que seul root peut lancer des processus avec une valeur négative. | **Important** - Notez que seul root peut lancer des processus avec une valeur négative. | ||
</ | </ | ||
- | |||
- | ===Options de la commande=== | ||
Les options de cette commande sont : | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
Usage: nice [OPTION] [COMMAND [ARG]...] | Usage: nice [OPTION] [COMMAND [ARG]...] | ||
Run COMMAND with an adjusted niceness, which affects process scheduling. | Run COMMAND with an adjusted niceness, which affects process scheduling. | ||
Ligne 770: | Ligne 860: | ||
for details about the options it supports. | for details about the options it supports. | ||
- | GNU coreutils online help: <http:// | + | GNU coreutils online help: <https:// |
- | For complete | + | Full documentation |
+ | or available locally via: info '(coreutils) | ||
</ | </ | ||
- | ====La Commande renice==== | + | ====1.8 - La Commande renice==== |
Cette commande modifie la priorité d’un processus déjà en cours. La valeur de la priorité ne peut être modifiée que par le propriétaire du processus ou par root. | Cette commande modifie la priorité d’un processus déjà en cours. La valeur de la priorité ne peut être modifiée que par le propriétaire du processus ou par root. | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | [1] 9870 Running | + | [1] 1865 Running |
- | [2]- 10283 Stopped | + | [2]- |
- | [3]+ 10403 Stopped | + | [3]+ |
- | [root@centos7 | + | [root@centos8 |
[2]- nice -n -20 sleep 1234 & | [2]- nice -n -20 sleep 1234 & | ||
- | [root@centos7 | + | [root@centos8 |
[3]+ nice -n 19 sleep 5678 & | [3]+ nice -n 19 sleep 5678 & | ||
- | [root@centos7 | + | [root@centos8 |
- | [1] 9870 Running | + | [1] 1865 Running |
- | [2]- 10283 Running | + | [2]- |
- | [3]+ 10403 Running | + | [3]+ |
- | [root@centos7 | + | [root@centos8 |
- | 10283 (process ID) old priority -20, new priority 5 | + | 1999 (process ID) old priority -20, new priority 5 |
- | [root@centos7 | + | [root@centos8 |
- | 10403 (process ID) old priority 19, new priority -5 | + | 2008 (process ID) old priority 19, new priority -5 |
- | [root@centos7 | + | [root@centos8 |
- | 0 | + | 0 |
- | 4 | + | 4 |
- | 0 | + | 0 |
- | 0 | + | 0 |
- | 0 | + | 0 |
</ | </ | ||
Ligne 806: | Ligne 897: | ||
**Important** -Notez que seul root peut décrémenter la valeur de priorité avec la commande renice. | **Important** -Notez que seul root peut décrémenter la valeur de priorité avec la commande renice. | ||
</ | </ | ||
- | |||
- | ===Options de la commande=== | ||
Les options de cette commande sont : | Les options de cette commande sont : | ||
< | < | ||
- | [r[root@centos7 | + | [root@centos8 |
Usage: | Usage: | ||
Ligne 818: | Ligne 907: | ||
| | ||
| | ||
+ | |||
+ | Alter the priority of running processes. | ||
Options: | Options: | ||
- | -g, --pgrp < | ||
-n, --priority < | -n, --priority < | ||
-p, --pid < | -p, --pid < | ||
- | -u, --user < | + | -g, --pgrp < |
- | -h, --help | + | -u, --user <name>|<id> interpret argument as username or user ID |
- | -V, --version | + | |
- | For more information | + | -h, --help |
+ | -V, --version | ||
+ | |||
+ | For more details | ||
</ | </ | ||
- | ====La Commande nohup==== | + | ====1.9 - La Commande nohup==== |
- | Cette commande permet à un processus de poursuivre son exécution après la déconnexion. Un processus enfant meurt quand le processus parent meure ou se termine. Comme une connexion | + | Cette commande permet à un processus de poursuivre son exécution après la déconnexion. Un processus enfant meurt quand le processus parent meure ou se termine. Comme une connexion |
< | < | ||
nohup lp ventes.txt & | nohup lp ventes.txt & | ||
</ | </ | ||
- | |||
- | ===Options de la commande=== | ||
Les options de cette commande sont : | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
Usage: nohup COMMAND [ARG]... | Usage: nohup COMMAND [ARG]... | ||
or: nohup OPTION | or: nohup OPTION | ||
Ligne 851: | Ligne 941: | ||
--version | --version | ||
- | If standard input is a terminal, redirect it from /dev/null. | + | If standard input is a terminal, redirect it from an unreadable file. |
If standard output is a terminal, append output to ' | If standard output is a terminal, append output to ' | ||
' | ' | ||
Ligne 861: | Ligne 951: | ||
for details about the options it supports. | for details about the options it supports. | ||
- | GNU coreutils online help: <http:// | + | GNU coreutils online help: <https:// |
- | For complete | + | Full documentation |
+ | or available locally via: info '(coreutils) | ||
</ | </ | ||
- | ====La Commande kill==== | + | ====1.10 - La Commande kill==== |
La commande kill envoie des signaux aux processus. La liste des signaux possibles peut être afficher avec l' | La commande kill envoie des signaux aux processus. La liste des signaux possibles peut être afficher avec l' | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP | 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP | ||
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 | 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 | ||
Ligne 899: | Ligne 990: | ||
| -15 | Le signal envoyé par défaut par la commande **kill**. Le processus se termine normalement | | | -15 | Le signal envoyé par défaut par la commande **kill**. Le processus se termine normalement | | ||
- | ===Options | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
kill: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] | kill: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] | ||
Send a signal to a job. | Send a signal to a job. | ||
Ligne 914: | Ligne 1005: | ||
-n sig SIG is a signal number | -n sig SIG is a signal number | ||
-l list the signal names; if arguments follow `-l' they are | -l list the signal names; if arguments follow `-l' they are | ||
- | assumed to be signal numbers for which names should be listed | + | assumed to be signal numbers for which names should be listed |
+ | -L synonym for -l | ||
| | ||
Kill is a shell builtin for two reasons: it allows job IDs to be used | Kill is a shell builtin for two reasons: it allows job IDs to be used | ||
Ligne 924: | Ligne 1016: | ||
</ | </ | ||
- | ====La Commande pkill==== | + | ====1.11 - La Commande pkill==== |
La commande pkill permet d' | La commande pkill permet d' | ||
< | < | ||
- | [root@centos | + | [root@centos8 |
</ | </ | ||
- | ===Options | + | Les options |
< | < | ||
- | [root@centos7 | + | [root@centos8 |
Usage: | Usage: | ||
Ligne 947: | Ligne 1039: | ||
-g, --pgroup < | -g, --pgroup < | ||
-G, --group < | -G, --group < | ||
+ | -i, --ignore-case | ||
-n, --newest | -n, --newest | ||
-o, --oldest | -o, --oldest | ||
Ligne 970: | Ligne 1063: | ||
----- | ----- | ||
- | < | + | Copyright © 2023 Hugh Norris. |
- | <div align=" | + | |
- | Copyright © 2021 Hugh Norris. | + | |
- | </ | + |