Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
elearning:workbooks:debian:10:junior:l112 [2022/05/17 08:18] – created admin | elearning:workbooks:debian:10:junior:l112 [2024/03/08 08:38] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | Version : **2022.01** | + | Version : **2024.01** |
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF507 | + | ======LDF507 |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF507 | + | * **LDF507 |
* Contenu du Module | * Contenu du Module | ||
* Présentation | * Présentation | ||
Ligne 46: | Ligne 46: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# cd /proc; ls -d [0-9]* |
- | 1 1113 1158 1464 1590 1601 163 | + | 1 |
- | 10 1125 12 1465 1594 162 | + | 10 |
- | 11 1126 13 15 16 1627 164 | + | 11 |
- | 1111 1135 14 1585 1600 1628 165 | + | 119 15 |
+ | 12 | ||
+ | 120 17 | ||
+ | 121 175 21920 22024 22066 22146 23 | ||
+ | 122 176 21921 22027 22076 22151 23008 27915 29345 32 | ||
+ | 123 18 | ||
+ | 125 2 21970 22040 22093 22970 23015 28194 3 364 433 57 | ||
+ | 127 20 | ||
</ | </ | ||
Ligne 56: | Ligne 63: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:/proc# cd 1 ; ls -l |
total 0 | total 0 | ||
- | dr-xr-xr-x. 2 root root 0 Jun 3 09:01 attr | + | -r--r--r-- |
- | -rw-r--r--. 1 root root 0 Jun | + | dr-xr-xr-x |
- | -r--------. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 cgroup | + | -r-------- |
- | --w-------. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 cmdline | + | --w------- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 comm | + | -r--r--r-- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:02 coredump_filter | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -r--r--r-- |
- | lrwxrwxrwx. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--------. 1 root root 0 Jun 3 09:01 environ | + | lrwxrwxrwx |
- | lrwxrwxrwx. 1 root root 0 Jun 3 09:01 exe -> / | + | -r-------- |
- | dr-x------. 2 root root 0 Jun 3 09:01 fd | + | lrwxrwxrwx |
- | dr-x------. 2 root root 0 Jun | + | dr-x------ |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 gid_map | + | dr-x------ |
- | -r--------. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:02 limits | + | -r-------- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 loginuid | + | -r--r--r-- |
- | dr-x------. 2 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 maps | + | dr-x------ |
- | -rw-------. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 mountinfo | + | -rw------- |
- | -r--r--r--. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--------. 1 root root 0 Jun | + | -r--r--r-- |
- | dr-xr-xr-x. 6 root root 0 Jun 3 09:01 net | + | -r-------- |
- | dr-x--x--x. 2 root root 0 Jun | + | dr-xr-xr-x |
- | -r--r--r--. 1 root root 0 Jun | + | dr-x--x--x |
- | -rw-r--r--. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -rw-r--r-- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:02 oom_score_adj | + | -r--r--r-- |
- | -r--------. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--------. 1 root root 0 Jun | + | -r-------- |
- | -r--------. 1 root root 0 Jun | + | -r-------- |
- | -rw-r--r--. 1 root root 0 Jun | + | -r-------- |
- | lrwxrwxrwx. 1 root root 0 Jun 3 09:01 root -> / | + | -rw-r--r-- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 sched | + | lrwxrwxrwx |
- | -r--r--r--. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 sessionid | + | -r--r--r-- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 setgroups | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -rw-r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--------. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -r-------- |
- | -r--r--r--. 1 root root 0 Jun | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun 3 09:01 status | + | -r--r--r-- |
- | -r--------. 1 root root 0 Jun | + | -r--r--r-- |
- | dr-xr-xr-x. 3 root root 0 Jun | + | -r-------- |
- | -r--r--r--. 1 root root 0 Jun | + | dr-xr-xr-x |
- | -rw-rw-rw-. 1 root root 0 Jun | + | -rw-r--r-- |
- | -rw-r--r--. 1 root root 0 Jun 3 09:01 uid_map | + | -r--r--r-- |
- | -r--r--r--. 1 root root 0 Jun | + | -rw-rw-rw- |
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
</ | </ | ||
Ligne 143: | Ligne 152: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:/ |
- | [root@centos8 | + | |
+ | root@debian11: | ||
+ | PID TTY TIME CMD | ||
+ | 28309 pts/1 00:00:00 su | ||
+ | 28310 pts/1 00:00:00 bash | ||
+ | 30237 pts/1 00:00:00 ps | ||
+ | |||
+ | root@debian11:~# ps --forest | ||
PID TTY TIME CMD | PID TTY TIME CMD | ||
- | | + | 28309 pts/1 |
- | 1634 pts/0 | + | |
- | 1690 pts/0 | + | |
</ | </ | ||
Ligne 154: | Ligne 170: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# ps -l |
F S | F S | ||
- | 4 S | + | 4 S |
- | 4 S | + | 4 S |
- | 0 R | + | 4 R |
</ | </ | ||
Ligne 181: | Ligne 197: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# ps lx | more |
F | F | ||
- | 4 | + | 4 |
1 | 1 | ||
1 | 1 | ||
1 | 1 | ||
- | 1 | + | 1 |
- | 1 | + | nts_highpri] |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 5 | + | 1 |
- | 1 | + | 1 |
- | 1 | + | 1 |
- | 5 | + | |
- | 1 | + | |
1 | 1 | ||
- | 1 | + | 1 |
- | 1 | + | nts_highpri] |
- | 1 | + | 5 |
- | 5 0 | + | 1 |
+ | 1 | ||
+ | 1 0 | ||
--More-- | --More-- | ||
</ | </ | ||
Ligne 213: | Ligne 229: | ||
^ RSS | La mémoire utilisée en kilobytes par le processus | | ^ RSS | La mémoire utilisée en kilobytes par le processus | | ||
^ STAT | La même chose que S dans l' | ^ STAT | La même chose que S dans l' | ||
- | |||
Avec des options a,u et x la commande affiche le résultat suivant : | Avec des options a,u et x la commande affiche le résultat suivant : | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# ps aux | more |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | ||
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | ghpri] |
- | root | + | root |
- | root | + | root |
- | root | + | root 10 0.0 0.0 0 0 ? S |
- | root 10 0.0 0.0 0 0 ? S | + | root 11 0.0 0.0 0 0 ? |
- | root 11 0.0 0.0 0 0 ? | + | root 12 0.0 0.0 0 0 ? |
- | root 12 0.0 0.0 0 0 ? | + | root 13 0.0 0.0 0 0 ? S |
- | root 13 0.0 0.0 0 0 ? S | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | ghpri] |
- | root | + | root |
- | root | + | root |
- | root | + | root |
- | root | + | root |
--More-- | --More-- | ||
</ | </ | ||
Ligne 254: | Ligne 269: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# ps --help all |
Usage: | Usage: | ||
Ligne 344: | Ligne 359: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pgrep -u root sshd |
- | 905 | + | 458 |
- | 1585 | + | 28295 |
</ | </ | ||
Ligne 352: | Ligne 367: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pgrep -u root, |
1 | 1 | ||
2 | 2 | ||
Ligne 358: | Ligne 373: | ||
4 | 4 | ||
6 | 6 | ||
- | 7 | + | 8 |
9 | 9 | ||
10 | 10 | ||
Ligne 364: | Ligne 379: | ||
12 | 12 | ||
13 | 13 | ||
- | 14 | ||
15 | 15 | ||
16 | 16 | ||
Ligne 370: | Ligne 384: | ||
18 | 18 | ||
20 | 20 | ||
- | 21 | ||
- | 22 | ||
23 | 23 | ||
24 | 24 | ||
- | 26 | + | 25 |
27 | 27 | ||
+ | 28 | ||
+ | 29 | ||
+ | 30 | ||
--More-- | --More-- | ||
</ | </ | ||
Ligne 382: | Ligne 397: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pgrep --help |
Usage: | Usage: | ||
Ligne 400: | Ligne 415: | ||
-n, --newest | -n, --newest | ||
-o, --oldest | -o, --oldest | ||
+ | -O, --older < | ||
-P, --parent < | -P, --parent < | ||
-s, --session < | -s, --session < | ||
Ligne 408: | Ligne 424: | ||
-F, --pidfile < | -F, --pidfile < | ||
-L, --logpidfile | -L, --logpidfile | ||
+ | -r, --runstates < | ||
--ns < | --ns < | ||
| | ||
Ligne 417: | Ligne 434: | ||
-V, --version | -V, --version | ||
- | For more details see pgrep(1) | + | For more details see pgrep(1). |
</ | </ | ||
Ligne 425: | Ligne 442: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pstree |
- | systemd─┬─NetworkManager───2*[{NetworkManager}] | + | systemd─┬─ModemManager───2*[{ModemManager}] |
+ | ├─NetworkManager───2*[{NetworkManager}] | ||
├─agetty | ├─agetty | ||
├─atd | ├─atd | ||
- | ├─auditd─┬─sedispatch | + | ├─avahi-daemon───avahi-daemon |
- | | + | |
- | ├─chronyd | + | ├─cron |
- | ├─crond | + | ├─cups-browsed───2*[{cups-browsed}] |
- | ├─dbus-daemon───{dbus-daemon} | + | ├─cupsd |
- | ├─dnsmasq───dnsmasq | + | ├─dbus-daemon |
- | ├─firewalld───{firewalld} | + | ├─exim4 |
- | ├─gssproxy───5*[{gssproxy}] | + | ├─lightdm─┬─2*[Xorg───9*[{Xorg}]] |
- | ├─irqbalance───{irqbalance} | + | │ |
- | ├─ksmtuned───sleep | + | |
- | ├─lsmd | + | │ |
- | ├─mcelog | + | |
- | ├─polkitd───7*[{polkitd}] | + | |
- | ├─rngd───4*[{rngd}] | + | |
- | ├─rpcbind | + | │ |
- | ├─rsyslogd───2*[{rsyslogd}] | + | |
- | ├─smartd | + | |
+ | | ||
+ | | ||
+ | │ | ||
+ | │ | ||
+ | | ||
+ | | ||
+ | | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | ├─packagekitd───2*[{packagekitd}] | ||
+ | ├─polkitd───2*[{polkitd}] | ||
+ | ├─rsyslogd───3*[{rsyslogd}] | ||
+ | ├─rtkit-daemon───2*[{rtkit-daemon}] | ||
├─sshd───sshd───sshd───bash───su───bash───pstree | ├─sshd───sshd───sshd───bash───su───bash───pstree | ||
- | ├─sssd─┬─sssd_be | + | ├─systemd─┬─(sd-pam) |
- | │ └─sssd_nss | + | │ ├─at-spi-bus-laun─┬─dbus-daemon |
- | ├─systemd───(sd-pam) | + | │ |
+ | | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | ├─systemd─┬─(sd-pam) | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
├─systemd-journal | ├─systemd-journal | ||
├─systemd-logind | ├─systemd-logind | ||
- | ├─systemd-machine | + | ├─systemd-timesyn───{systemd-timesyn} |
├─systemd-udevd | ├─systemd-udevd | ||
- | └─tuned───3*[{tuned}] | + | |
+ | ├─upowerd───2*[{upowerd}] | ||
+ | ├─wpa_supplicant | ||
+ | | ||
+ | └─2*[{xfce4-terminal}] | ||
</ | </ | ||
Ligne 460: | Ligne 522: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pstree --help |
pstree: unrecognized option ' | pstree: unrecognized option ' | ||
- | Usage: pstree [-acglpsStuZ] [ -h | -H PID ] [ -n | -N type ] | + | Usage: pstree [-acglpsStTuZ] [ -h | -H PID ] [ -n | -N type ] |
[ -A | -G | -U ] [ PID | USER ] | [ -A | -G | -U ] [ PID | USER ] | ||
- | pstree -V | + | |
Display a tree of processes. | Display a tree of processes. | ||
-a, --arguments | -a, --arguments | ||
-A, --ascii | -A, --ascii | ||
- | -c, --compact | + | -c, --compact-not don't compact identical subtrees |
- | -h, --highlight-all highlight current | + | -C, --color=TYPE |
- | -H PID, | + | (age) |
- | --highlight-pid=PID highlight this process and its ancestors | + | |
-g, --show-pgids | -g, --show-pgids | ||
-G, --vt100 | -G, --vt100 | ||
+ | -h, --highlight-all highlight current process and its ancestors | ||
+ | -H PID, --highlight-pid=PID | ||
+ | highlight this process and its ancestors | ||
-l, --long | -l, --long | ||
-n, --numeric-sort | -n, --numeric-sort | ||
- | -N type, | + | -N TYPE, --ns-sort=TYPE |
- | | + | |
- | | + | |
-p, --show-pids | -p, --show-pids | ||
-s, --show-parents | -s, --show-parents | ||
Ligne 489: | Ligne 554: | ||
-V, --version | -V, --version | ||
-Z, --security-context | -Z, --security-context | ||
- | show SELinux | + | show security |
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 | ||
Ligne 499: | Ligne 565: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# top |
- | top - 09:10:02 up 8 min, | + | top - 09:22:03 up 26 days, 18:44, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | MiB Mem : 3737.7 total, | + | MiB Mem : 3931.2 total, |
- | MiB Swap: 2000.0 total, | + | MiB Swap: 975.0 total, |
- | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | + | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
- | | + | |
- | 827 polkitd | + | 22994 lightdm |
- | 834 dbus | + | 28304 trainee |
- | 1789 root 20 | + | |
- | 2 root 20 | + | 2 root 20 |
- | 3 root 0 -20 | + | 3 root 0 -20 |
- | 4 root 0 -20 | + | 4 root 0 -20 |
- | 6 root 0 -20 | + | 6 root 0 -20 |
- | | + | |
- | 9 root 0 -20 | + | 9 root 20 0 0 0 0 S 0.0 |
- | 10 root 20 | + | 10 root 20 |
- | 11 root 20 | + | 11 root 20 |
- | 12 root | + | 12 root |
- | 13 root rt | + | 13 root rt |
- | 14 root 20 | + | 15 root 20 |
- | 15 root 20 | + | 16 root 20 |
- | 16 root rt | + | 17 root rt |
- | 17 root rt | + | 18 root 20 |
- | 18 root 20 | + | 20 root 0 -20 |
- | 20 root 0 -20 | + | 23 root 20 |
- | 21 root 20 | + | 24 root 0 -20 |
- | 22 root rt | + | 25 root 20 |
- | | + | 27 root 20 |
- | 24 root 20 | + | 28 root 20 |
- | 26 root 0 -20 | + | 29 root 0 -20 |
- | 27 root 20 | + | 30 root 20 |
- | 28 root rt | + | |
- | 29 root rt | + | |
- | 30 root 20 | + | |
- | 32 root 0 -20 | + | |
- | | + | |
- | 36 root 0 -20 | + | |
- | 37 root 20 | + | |
- | 38 root 20 | + | |
- | 39 root 20 | + | |
- | 40 root 0 -20 | + | |
- | 41 root 20 | + | |
- | 42 root 25 | + | |
- | 43 root 39 19 | + | |
- | 44 root 0 -20 | + | |
- | 45 root 0 -20 | + | |
- | 46 root 0 -20 | + | |
- | 47 root 0 -20 | + | |
- | 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 565: | Ligne 606: | ||
< | < | ||
- | Help for Interactive Commands - procps-ng 3.3.15 | + | Help for Interactive Commands - procps-ng 3.3.17 |
Window 1:Def: Cumulative mode Off. System: Delay 3.0 secs; Secure mode Off. | Window 1:Def: Cumulative mode Off. System: Delay 3.0 secs; Secure mode Off. | ||
Z, | Z, | ||
- | l,t,m | + | l,t,m,I Toggle: ' |
- | 0,1,2,3,I Toggle: ' | + | 0,1,2,3,4 Toggle: ' |
f,F,X | f,F,X | ||
L,&,<,> | L,&,<,> | ||
- | R,H,V,J . Toggle: ' | + | R,H,J,C . Toggle: ' |
c,i,S,j . Toggle: ' | c,i,S,j . Toggle: ' | ||
x,y . Toggle highlights: ' | x,y . Toggle highlights: ' | ||
Ligne 580: | Ligne 621: | ||
u,U,o,O . Filter by: ' | u,U,o,O . Filter by: ' | ||
n,#, | n,#, | ||
- | | + | |
k,r | k,r | ||
d or s Set update interval | d or s Set update interval | ||
- | W,Y | + | W,Y,! Write config |
q Quit | q Quit | ||
( commands shown with ' | ( commands shown with ' | ||
Press ' | Press ' | ||
- | Type ' | + | Type ' |
</ | </ | ||
Ligne 598: | Ligne 639: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# top |
... | ... | ||
- | top - 09:11:24 up 10 min, | + | top - 09:24:04 up 26 days, 18:46, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | MiB Mem : 3737.7 total, | + | MiB Mem : 3931.2 total, |
- | MiB Swap: 2000.0 total, | + | MiB Swap: 975.0 total, |
Change delay from 3.0 to 1 | Change delay from 3.0 to 1 | ||
+ | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | ||
... | ... | ||
</ | </ | ||
Ligne 612: | Ligne 654: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# top |
... | ... | ||
- | top - 09:12:07 up 10 min, | + | top - 09:25:13 up 26 days, 18:48, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | MiB Mem : 3737.7 total, | + | MiB Mem : 3931.2 total, |
- | MiB Swap: 2000.0 total, | + | MiB Swap: 975.0 total, |
- | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | + | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
- | 874 root | + | 22994 lightdm |
- | | + | |
- | 902 root | + | 22007 trainee |
- | 827 polkitd | + | 22947 root |
- | 884 root | + | 22045 trainee |
- | 866 root | + | 22036 trainee |
- | 840 root | + | 22146 trainee |
- | 1 root | + | 22051 trainee |
- | 1627 root | + | 22096 trainee |
- | 666 root | + | 22052 trainee |
- | 1585 root | + | 22094 trainee |
- | 1590 trainee | + | |
- | | + | |
- | 632 root | + | 22093 trainee |
- | 837 root | + | 22040 trainee |
- | 905 root | + | 22024 trainee |
- | 847 rngd | + | 22119 trainee |
- | 828 root | + | 22063 trainee |
- | 1600 trainee | + | |
- | 1601 trainee | + | |
- | 834 dbus | + | 12807 root |
- | 1634 root | + | 22060 trainee |
- | | + | |
- | 1594 trainee | + | |
- | 1113 root | + | 22122 trainee |
- | | + | 22084 colord |
- | 1803 root 20 | + | |
... | ... | ||
</ | </ | ||
Ligne 654: | Ligne 695: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# top |
... | ... | ||
- | top - 09:13:01 up 11 min, | + | top - 09:26:38 up 26 days, 18:49, |
- | Tasks: | + | Tasks: |
- | %Cpu(s): | + | %Cpu(s): |
- | MiB Mem : 3737.7 total, | + | MiB Mem : 3931.2 total, |
- | MiB Swap: 2000.0 total, | + | MiB Swap: 975.0 total, |
- | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | + | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
- | 827 polkitd | + | |
- | 1 root 20 | + | |
- | 823 root 20 | + | |
- | 1803 root 20 | + | |
</ | </ | ||
Ligne 674: | Ligne 712: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# top --help |
top: inappropriate ' | top: inappropriate ' | ||
Usage: | Usage: | ||
- | top -hv | -bcEHiOSs1 | + | top -hv | -bcEeHiOSs1 |
</ | </ | ||
Ligne 689: | Ligne 727: | ||
<WRAP center round important> | <WRAP center round important> | ||
- | Notez qu’un processus en arrière plan est dit **asynchrone** car il se poursuit indépendamment de son parent qui est le shell. En avant plan le processus est dit **synchrone**. | + | **Important** - Notez qu’un processus en arrière plan est dit **asynchrone** car il se poursuit indépendamment de son parent qui est le shell. En avant plan le processus est dit **synchrone**. |
</ | </ | ||
Ligne 697: | Ligne 735: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# sleep 9999 & |
- | [1] 1865 | + | [1] 30316 |
- | [root@centos8 | + | |
- | [1]+ | + | root@debian11:~# jobs -l |
+ | [1]+ 30316 Running | ||
</ | </ | ||
Ligne 712: | Ligne 751: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# sleep 1234 |
^Z | ^Z | ||
[2]+ Stopped | [2]+ Stopped | ||
Ligne 720: | Ligne 759: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# bg %2 |
[2]+ sleep 1234 & | [2]+ sleep 1234 & | ||
- | [root@centos8 | + | |
- | [1]- | + | root@debian11:~# jobs -l |
- | [2]+ | + | [1]- 30316 Running |
+ | [2]+ 30320 Running | ||
</ | </ | ||
Ligne 734: | Ligne 774: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# kill -s stop %2 |
- | [root@centos8 | + | |
- | [1]- | + | root@debian11:~# jobs -l |
- | [2]+ | + | [1]- 30316 Running |
+ | [2]+ 30320 Stopped (signal) | ||
</ | </ | ||
Ligne 743: | Ligne 784: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# kill -s cont %2 |
- | [root@centos8 | + | |
- | [1]- | + | root@debian11:~# jobs -l |
- | [2]+ | + | [1]- 30316 Running |
+ | [2]+ 30320 Running | ||
</ | </ | ||
Ligne 752: | Ligne 794: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# kill -s stop %2 |
- | [2]+ Stopped | + | root@debian11:~# jobs -l |
- | [root@centos8 | + | [1]- 30316 Running |
- | [1]- | + | [2]+ 30320 Stopped (signal) |
- | [2]+ | + | |
- | [root@centos8 | + | root@debian11:~# fg %2 |
sleep 1234 | sleep 1234 | ||
^C | ^C | ||
- | [root@centos8 | + | root@debian11:~# |
</ | </ | ||
Ligne 771: | Ligne 813: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# help jobs |
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 779: | Ligne 821: | ||
| | ||
Options: | Options: | ||
- | -l lists process IDs in addition to the normal information | + | -l lists process IDs in addition to the normal information |
- | -n lists 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 |
- | -s restrict output to stopped jobs | + | -s restrict output to stopped jobs |
| | ||
If -x is supplied, COMMAND is run after all job specifications that | If -x is supplied, COMMAND is run after all job specifications that | ||
Ligne 792: | Ligne 834: | ||
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. |
</ | </ | ||
Ligne 800: | Ligne 842: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# jobs -l |
- | [1]+ | + | [1]+ 30316 Running |
- | [root@centos8 | + | |
+ | root@debian11:~# wait %1 | ||
^C | ^C | ||
- | [root@centos8 | + | |
- | [1]+ | + | root@debian11:~# jobs -l |
+ | [1]+ 30316 Running | ||
</ | </ | ||
Ligne 817: | Ligne 861: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# nice -n -20 sleep 1234 |
^Z | ^Z | ||
[2]+ Stopped | [2]+ Stopped | ||
- | [root@centos8 | + | |
- | 0 | + | root@debian11:~# ps lx | grep sleep |
- | 0 0 | + | 0 |
- | 4 | + | 4 0 30370 |
- | 0 | + | 0 |
- | [root@centos8 | + | |
+ | root@debian11:~# nice -n 19 sleep 5678 | ||
^Z | ^Z | ||
[3]+ Stopped | [3]+ Stopped | ||
- | [root@centos8 | + | |
- | 0 | + | root@debian11:~# ps lx | grep sleep |
- | 4 | + | 0 |
- | 0 | + | 4 |
- | 0 | + | 0 |
- | 0 | + | 0 |
</ | </ | ||
Ligne 845: | Ligne 890: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# nice --help |
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 861: | Ligne 906: | ||
GNU coreutils online help: < | GNU coreutils online help: < | ||
- | Full documentation | + | Full documentation < |
or available locally via: info ' | or available locally via: info ' | ||
</ | </ | ||
Ligne 870: | Ligne 915: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# jobs -l |
- | [1] 1865 Running | + | [1] |
- | [2]- | + | [2]- 30370 Stopped |
- | [3]+ | + | [3]+ 30374 Stopped |
- | [root@centos8 | + | |
+ | root@debian11:~# bg %2 | ||
[2]- nice -n -20 sleep 1234 & | [2]- nice -n -20 sleep 1234 & | ||
- | [root@centos8 | + | |
+ | root@debian11:~# bg %3 | ||
[3]+ nice -n 19 sleep 5678 & | [3]+ nice -n 19 sleep 5678 & | ||
- | [root@centos8 | + | |
- | [1] 1865 Running | + | root@debian11:~# jobs -l |
- | [2]- | + | [1] |
- | [3]+ | + | [2]- 30370 Running |
- | [root@centos8 | + | [3]+ 30374 Running |
- | 1999 (process ID) old priority -20, new priority 5 | + | |
- | [root@centos8 | + | root@debian11:~# renice +5 30370 |
- | 2008 (process ID) old priority 19, new priority -5 | + | 30370 (process ID) old priority -20, new priority 5 |
- | [root@centos8 | + | |
- | 0 | + | root@debian11:~# renice -5 30374 |
- | 4 | + | 30374 (process ID) old priority 19, new priority -5 |
- | 0 | + | |
- | 0 | + | root@debian11:~# ps lx | grep sleep |
- | 0 | + | 0 |
+ | 4 | ||
+ | 0 | ||
+ | 0 | ||
</ | </ | ||
<WRAP center round important> | <WRAP center round important> | ||
- | **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. |
</ | </ | ||
Ligne 901: | Ligne 951: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# renice --help |
Usage: | Usage: | ||
Ligne 911: | Ligne 961: | ||
Options: | Options: | ||
- | -n, --priority < | + | -n, --priority < |
- | -p, --pid < | + | -p, --pid interpret |
- | -g, --pgrp | + | -g, --pgrp |
- | -u, --user | + | -u, --user |
-h, --help | -h, --help | ||
Ligne 927: | Ligne 977: | ||
< | < | ||
- | nohup lp ventes.txt & | + | # nohup lp ventes.txt & |
</ | </ | ||
Ligne 933: | Ligne 983: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# nohup --help |
Usage: nohup COMMAND [ARG]... | Usage: nohup COMMAND [ARG]... | ||
or: nohup OPTION | or: nohup OPTION | ||
Ligne 952: | Ligne 1002: | ||
GNU coreutils online help: < | GNU coreutils online help: < | ||
- | Full documentation | + | Full documentation < |
or available locally via: info ' | or available locally via: info ' | ||
</ | </ | ||
Ligne 961: | Ligne 1011: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# kill -l |
- | 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP | + | 1) SIGHUP |
- | 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 | + | 6) SIGABRT |
- | 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM | + | 11) SIGSEGV |
- | 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP | + | 16) SIGSTKFLT |
- | 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ | + | 21) SIGTTIN |
- | 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR | + | 26) SIGVTALRM |
- | 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 | + | 31) SIGSYS |
- | 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 | + | 38) SIGRTMIN+4 |
- | 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 | + | 43) SIGRTMIN+9 |
- | 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 | + | 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 |
- | 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 | + | 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 |
- | 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 | + | 58) SIGRTMAX-6 |
- | 63) SIGRTMAX-1 64) SIGRTMAX | + | 63) SIGRTMAX-1 |
</ | </ | ||
Ligne 993: | Ligne 1043: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# help kill |
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 1002: | Ligne 1052: | ||
| | ||
Options: | Options: | ||
- | -s sig SIG is a signal name | + | -s sig SIG is a signal name |
- | -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 | + | -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 1021: | Ligne 1071: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pkill -HUP rsyslogd |
</ | </ | ||
Ligne 1027: | Ligne 1077: | ||
< | < | ||
- | [root@centos8 | + | root@debian11:~# pkill --help |
Usage: | Usage: | ||
Ligne 1034: | Ligne 1084: | ||
Options: | Options: | ||
| | ||
+ | -q, --queue < | ||
-e, --echo | -e, --echo | ||
-c, --count | -c, --count | ||
Ligne 1042: | Ligne 1093: | ||
-n, --newest | -n, --newest | ||
-o, --oldest | -o, --oldest | ||
+ | -O, --older < | ||
-P, --parent < | -P, --parent < | ||
-s, --session < | -s, --session < | ||
Ligne 1050: | Ligne 1102: | ||
-F, --pidfile < | -F, --pidfile < | ||
-L, --logpidfile | -L, --logpidfile | ||
+ | -r, --runstates < | ||
--ns < | --ns < | ||
| | ||
Ligne 1063: | Ligne 1116: | ||
----- | ----- | ||
- | Copyright © 2022 Hugh Norris. | + | |
+ | Copyright © 2024 Hugh Norris. |