Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:redhat:rh134:l102 [2024/10/22 07:11] adminelearning:workbooks:redhat:rh134:l102 [2024/10/24 12:56] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
  
-Version : **2023.01**+Version : **2024.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
Ligne 25: Ligne 25:
       * 1.11 - La Commande sa       * 1.11 - La Commande sa
       * 1.12 - La Commande ac       * 1.12 - La Commande ac
-    * LAB #2 - La Commande sysctl +    * LAB #2 - Réglage de la performance du système 
-      * 2.1 - Répertoire /proc+      * 2.1 - Présentation 
 +      * 2.2 - Le fichier /etc/tuned/tuned-main.conf 
 +      * 2.3 - Profils 
 +    * LAB #3 - La Commande sysctl 
 +      * 3.1 - Répertoire /proc
         * Fichiers         * Fichiers
           * Processeur           * Processeur
Ligne 46: Ligne 50:
           * net           * net
           * sys           * sys
-      * 2.2 - Utilisation de la Commande sysctl        +      * 3.2 - Utilisation de la Commande sysctl        
-    * LAB #- Interprétation des informations dans /proc +    * LAB #- Interprétation des informations dans /proc 
-      * 3.1 - free +      * 4.1 - free 
-      * 3.2 - uptime ou w  +      * 4.2 - uptime ou w  
-      * 3.3 - iostat +      * 4.3 - iostat 
-      * 3.4 - hdparm +      * 4.4 - hdparm 
-      * 3.5 - vmstat +      * 4.5 - vmstat 
-      * 3.6 - mpstat +      * 4.6 - mpstat 
-      * 3.7 - sar+      * 4.7 - sar
     * Modules usb     * Modules usb
     * udev     * udev
       * La Commande udevadm       * La Commande udevadm
     * Système de fichiers /sys     * Système de fichiers /sys
-    * LAB #- Limiter les Ressources +    * LAB #- Limiter les Ressources 
-      * 4.1 - ulimit +      * 5.1 - ulimit 
-      * 4.2 - Groupes de Contrôle +      * 5.2 - Groupes de Contrôle
-        * La Limitation de la Mémoire +
-        * La Commande cgcreate +
-        * La Commande cgdelete +
-        * Le Fichier /etc/cgconfig.conf +
-        * La Commande cgconfigparser+
  
 =====Présentation des Fichiers Spéciaux===== =====Présentation des Fichiers Spéciaux=====
Ligne 79: Ligne 78:
  
 <code> <code>
-[root@centos8 ~]# ls -l /dev | more+[root@redhat9 ~]# ls -l /dev | more
 total 0 total 0
-crw-r--r--.  1 root root     10, 235 Jun 28 02:04 autofs +crw-r--r--. 1 root root     10, 235 Oct 22 11:01 autofs 
-drwxr-xr-x.  2 root root         180 Jun 28 02:04 block +drwxr-xr-x. 2 root root         160 Oct 22 11:01 block 
-drwxr-xr-x.  2 root root         100 Jun 28 02:04 bsg +drwxr-xr-x. 2 root root          80 Oct 22 11:01 bsg 
-drwxr-xr-x.  3 root root          60 Jun 28 02:04 bus +drwxr-xr-x. 3 root root          60 Oct 22 11:01 bus 
-lrwxrwxrwx.  1 root root           Jun 28 02:04 cdrom -> sr0 +lrwxrwxrwx. 1 root root           Oct 22 11:01 cdrom -> sr0 
-drwxr-xr-x.  2 root root        2940 Jun 28 02:04 char +drwxr-xr-x. 2 root root        2980 Oct 22 11:02 char 
-drwxr-xr-x.  2 root root          80 Jun 28 02:04 cl_centos8 +crw--w----. 1 root tty       5,   Oct 22 11:01 console 
-crw-------.  1 root root      5,   Jun 28 02:04 console +lrwxrwxrwx. 1 root root          11 Oct 22 11:01 core -> /proc/kcore 
-lrwxrwxrwx.  1 root root          11 Jun 28 02:04 core -> /proc/kcore +drwxr-xr-x. root root         120 Oct 22 11:01 cpu 
-drwxr-xr-x. 10 root root         200 Jun 28 02:04 cpu +crw-------. 1 root root     10, 124 Oct 22 11:01 cpu_dma_latency 
-crw-------.  1 root root     10,  62 Jun 28 02:04 cpu_dma_latency +drwxr-xr-x. root root         140 Oct 22 11:01 disk 
-drwxr-xr-x.  root root         120 Jun 28 02:04 disk +brw-rw----. 1 root disk    253,   Oct 22 11:01 dm-0 
-brw-rw----.  1 root disk    253,   Jun 28 02:04 dm-0 +brw-rw----. 1 root disk    253,   Oct 22 11:01 dm-1 
-brw-rw----.  1 root disk    253,   Jun 28 02:04 dm-1 +drwxr-xr-x. 2 root root          60 Oct 22 11:01 dma_heap 
-drwxr-xr-x.  3 root root          80 Jun 28 02:04 dri +drwxr-xr-x. 3 root root          80 Oct 22 11:01 dri 
-crw-rw----.  1 root video    29,   Jun 28 02:04 fb0 +crw-rw----. 1 root video    29,   Oct 22 11:01 fb0 
-lrwxrwxrwx.  1 root root          13 Jun 28 02:04 fd -> /proc/self/fd +lrwxrwxrwx. 1 root root          13 Oct 22 11:01 fd -> /proc/self/fd 
-crw-rw-rw-.  1 root root      1,   Jun 28 02:04 full +crw-rw-rw-. 1 root root      1,   Oct 22 11:01 full 
-crw-rw-rw-.  1 root root     10, 229 Jun 28 02:04 fuse +crw-rw-rw-. 1 root root     10, 229 Oct 22 11:01 fuse 
-crw-------.  1 root root    245,   Jun 28 02:04 hidraw0 +crw-------. 1 root root    242,   Oct 22 11:01 hidraw0 
-crw-------.  1 root root     10, 228 Jun 28 02:04 hpet +crw-------. 1 root root     10, 228 Oct 22 11:01 hpet 
-drwxr-xr-x.  root root           Jun 28 02:04 hugepages +drwxr-xr-x. root root           Oct 22 11:01 hugepages 
-crw-------.  1 root root     10, 183 Jun 28 02:04 hwrng +crw-------. 1 root root     10, 183 Oct 22 11:01 hwrng 
-lrwxrwxrwx.  1 root root          12 Jun 28 02:04 initctl -> /run/initctl +lrwxrwxrwx. 1 root root          12 Oct 22 11:01 initctl -> /run/initctl 
-drwxr-xr-x.  4 root root         280 Jun 28 02:04 input +drwxr-xr-x. 4 root root         280 Oct 22 11:01 input 
-crw-r--r--.  1 root root      1,  11 Jun 28 02:04 kmsg +crw-r--r--. 1 root root      1,  11 Oct 22 11:01 kmsg 
-lrwxrwxrwx.  1 root root          28 Jun 28 02:04 log -> /run/systemd/journal/dev-log +crw-rw-rw-. 1 root kvm      10, 232 Oct 22 11:01 kvm 
-crw-rw----.  1 root disk     10, 237 Jun 28 02:04 loop-control +lrwxrwxrwx. 1 root root          28 Oct 22 11:01 log -> /run/systemd/journal/dev-log 
-crw-rw----.  1 root lp        6,   Jun 28 02:04 lp0 +crw-rw----. 1 root disk     10, 237 Oct 22 11:01 loop-control 
-crw-rw----.  1 root lp        6,   Jun 28 02:04 lp1 +crw-rw----. 1 root lp        6,   Oct 22 11:01 lp0 
-crw-rw----.  1 root lp        6,   Jun 28 02:04 lp2 +crw-rw----. 1 root lp        6,   Oct 22 11:01 lp1 
-crw-rw----.  1 root lp        6,   Jun 28 02:04 lp3 +crw-rw----. 1 root lp        6,   Oct 22 11:01 lp2 
-drwxr-xr-x.  2 root root         100 Jun 28 02:04 mapper +crw-rw----. 1 root lp        6,   Oct 22 11:01 lp3 
-crw-------.  1 root root     10, 227 Jun 28 02:04 mcelog +drwxr-xr-x. 2 root root         100 Oct 22 11:01 mapper 
-crw-r-----.  1 root kmem      1,   Jun 28 02:04 mem +crw-------. 1 root root     10, 227 Oct 22 11:01 mcelog 
-drwxrwxrwt.  2 root root          40 Jun 28 02:04 mqueue +crw-r-----. 1 root kmem      1,   Oct 22 11:01 mem 
-drwxr-xr-x.  2 root root          60 Jun 28 02:04 net +drwxrwxrwt. 2 root root          40 Oct 22 11:01 mqueue 
-crw-rw-rw-.  1 root root      1,   Jun 28 02:04 null+drwxr-xr-x. 2 root root          60 Oct 22 11:01 net 
 +crw-rw-rw-. 1 root root      1,   Oct 22 11:01 null 
 +crw-------. 1 root root     10, 144 Oct 22 11:01 nvram 
 +crw-r-----. 1 root kmem      1,   4 Oct 22 11:01 port 
 +crw-------. 1 root root    108,   0 Oct 22 11:01 ppp 
 +crw-rw-rw-. 1 root tty       5,   2 Oct 22 15:04 ptmx 
 +drwxr-xr-x. 2 root root           0 Oct 22 11:01 pts 
 +crw-rw-rw-. 1 root root      1,   8 Oct 22 11:01 random 
 +crw-rw-r--+ 1 root root     10, 242 Oct 22 11:02 rfkill 
 +drwxr-xr-x. 2 root root          80 Oct 22 11:01 rhel 
 +lrwxrwxrwx. 1 root root           4 Oct 22 11:01 rtc -> rtc0 
 +crw-------. 1 root root    250,   0 Oct 22 11:01 rtc0 
 +brw-rw----. 1 root disk      8,   0 Oct 22 11:01 sda 
 +brw-rw----. 1 root disk      8,   1 Oct 22 11:01 sda1 
 +brw-rw----. 1 root disk      8,   2 Oct 22 11:01 sda2 
 +crw-rw----. 1 root disk     21,   0 Oct 22 11:01 sg0 
 +crw-rw----+ 1 root cdrom    21,   1 Oct 22 11:01 sg1
 --More-- --More--
 </code> </code>
Ligne 125: Ligne 140:
  
 <code> <code>
-... +[root@redhat9 ~]# ls -l /dev | grep sda1 
-brw-rw----.  1 root disk      8,   Jun 28 02:04 sda1 +brw-rw----. 1 root disk      8,   Oct 22 11:01 sda1 
-... + 
-crw-rw-rw-.  1 root tty       5,   Jun 28 02:04 tty +[root@redhat9 ~]# ls -l /dev | grep tty0 
-...+crw--w----. 1 root tty       4,   Oct 22 11:02 tty0
 </code> </code>
  
Ligne 146: Ligne 161:
  
 <code> <code>
-[root@centos8 ~]# lspci+[root@redhat9 ~]# lspci
 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
Ligne 154: Ligne 169:
 00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) 00:02.0 VGA compatible controller: Device 1234:1111 (rev 02)
 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
-00:07.0 SATA controllerIntel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)+00:05.0 PCI bridgeRed Hat, Inc. QEMU PCI-PCI bridge
 00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device
 00:1e.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 00:1e.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
 00:1f.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 00:1f.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
 +01:01.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI
 </code> </code>
  
Ligne 163: Ligne 179:
  
 <code> <code>
-[root@centos8 ~]# lspci -v -s 00:03.0+[root@redhat9 ~]# lspci -v -s 00:03.0
 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
         Subsystem: Red Hat, Inc. Device 0005         Subsystem: Red Hat, Inc. Device 0005
         Physical Slot: 3         Physical Slot: 3
         Flags: bus master, fast devsel, latency 0, IRQ 10         Flags: bus master, fast devsel, latency 0, IRQ 10
-        I/O ports at e000 [size=64] +        I/O ports at f000 [size=64] 
-        Memory at fe400000 (64-bit, prefetchable) [size=16K]+        Memory at fd600000 (64-bit, prefetchable) [size=16K]
         Capabilities: [84] Vendor Specific Information: VirtIO: <unknown>         Capabilities: [84] Vendor Specific Information: VirtIO: <unknown>
         Capabilities: [70] Vendor Specific Information: VirtIO: Notify         Capabilities: [70] Vendor Specific Information: VirtIO: Notify
Ligne 181: Ligne 197:
  
 <code> <code>
-[root@centos8 ~]# lspci -vv -s 00:03.0+[root@redhat9 ~]# lspci -vv -s 00:03.0
 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
         Subsystem: Red Hat, Inc. Device 0005         Subsystem: Red Hat, Inc. Device 0005
Ligne 189: Ligne 205:
         Latency: 0         Latency: 0
         Interrupt: pin A routed to IRQ 10         Interrupt: pin A routed to IRQ 10
-        Region 0: I/O ports at e000 [size=64] +        Region 0: I/O ports at f000 [size=64] 
-        Region 4: Memory at fe400000 (64-bit, prefetchable) [size=16K]+        Region 4: Memory at fd600000 (64-bit, prefetchable) [size=16K]
         Capabilities: [84] Vendor Specific Information: VirtIO: <unknown>         Capabilities: [84] Vendor Specific Information: VirtIO: <unknown>
                 BAR=0 offset=00000000 size=00000000                 BAR=0 offset=00000000 size=00000000
Ligne 209: Ligne 225:
  
 <code> <code>
-[root@centos8 ~]# lspci --help+[root@redhat9 ~]# lspci --help
 lspci: invalid option -- '-' lspci: invalid option -- '-'
 Usage: lspci [<switches>] Usage: lspci [<switches>]
Ligne 242: Ligne 258:
 -i <file>       Use specified ID database instead of /usr/share/hwdata/pci.ids -i <file>       Use specified ID database instead of /usr/share/hwdata/pci.ids
 -p <file>       Look up kernel modules in a given file instead of default modules.pcimap -p <file>       Look up kernel modules in a given file instead of default modules.pcimap
--M              Enable `bus +-M              Enable `bus mapping' mode (dangerous; root only) 
 + 
 +PCI access options: 
 +-A <method>     Use the specified PCI access method (see `-A help' for a list) 
 +-O <par>=<val>  Set PCI access parameter (see `-O help' for a list) 
 +-G              Enable PCI access debugging 
 +-H <mode>       Use direct hardware access (<mode> = 1 or 2) 
 +-F <file>       Read PCI configuration dump from a given file 
 </code> </code>
  
Ligne 250: Ligne 273:
  
 <code> <code>
-[root@centos8 ~]# lsusb +[root@redhat9 ~]# lsusb 
-Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd +Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  
-[root@centos8 ~]# lsusb -vt+[root@redhat9 ~]# lsusb -vt
 /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 +    ID 1d6b:0001 Linux Foundation 1.1 root hub
     |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M     |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
 +        ID 0627:0001 Adomax Technology Co., Ltd 
 </code> </code>
  
Ligne 264: Ligne 289:
  
 <code> <code>
-[root@centos8 ~]# lsusb --help+[root@redhat9 ~]# lsusb --help
 Usage: lsusb [options]... Usage: lsusb [options]...
 List USB devices List USB devices
Ligne 275: Ligne 300:
       Show only devices with the specified vendor and       Show only devices with the specified vendor and
       product ID numbers (in hexadecimal)       product ID numbers (in hexadecimal)
- .LAB#1 
   -D device   -D device
       Selects which device lsusb will examine       Selects which device lsusb will examine
Ligne 291: Ligne 315:
  
 <code> <code>
-[root@centos8 ~]# lsblk +[root@redhat9 ~]# lsblk 
-NAME                MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS 
-sda                   8:0    0   32G  0 disk  +sda             8:0    0   50G  0 disk  
-├─sda1                8:1    0    1G  0 part /boot +├─sda1          8:1    0    1G  0 part /boot 
-└─sda2                8:2    0   31G  0 part  +└─sda2          8:2    0   49G  0 part  
-  ├─cl_centos8-root 253:0    0 27.8G  0 lvm  / +  ├─rhel-root 253:0    0   44G  0 lvm  / 
-  └─cl_centos8-swap 253:1    0  3.2G  0 lvm  [SWAP] +  └─rhel-swap 253:1    0    5G  0 lvm  [SWAP] 
-sdb                   8:16      4G  0 disk  +sdb             8:16     32G  0 disk 
-sdc                   8:32     64G  0 disk  +sdc             8:32      6G  0 disk   
-└─sdc1                8:33   0   64G  part /home +sdd             8:48   0    6G  disk   
-sdd                   8:48   0   32G  0 disk  +sde             8:64   0   32G  0 disk  
-sr0                  11:0    1 1024M  0 rom  +sr0            11:0    1 1024M  0 rom  
- +  
-[root@centos8 ~]# lsblk -l +[root@redhat9 ~]# lsblk -l 
-NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS 
-sda               8:0    0   32G  0 disk  +sda         8:0    0   50G  0 disk  
-sda1              8:1    0    1G  0 part /boot +sda1        8:1    0    1G  0 part /boot 
-sda2              8:2    0   31G  0 part  +sda2        8:2    0   49G  0 part  
-sdb               8:16   0    4G  disk  +sr0        11:0    1 1024M  rom   
-sdc               8:32   0   64G  disk  +rhel-root 253:0    0   44G  lvm  / 
-sdc1              8:33     64G  part /home +rhel-swap 253:1       5G  lvm  [SWAP] 
-sdd               8:48   0   32G  0 disk  +sdb         8:16   0   32G  0 disk 
-sr0              11:0    1 1024M  rom   +sdc         8:32   0    6G  disk   
-cl_centos8-root 253:0    0 27.8G  lvm  / +sdd         8:48   0    6G  disk   
-cl_centos8-swap 253:1     3.2G  lvm  [SWAP]+sde         8:64     32G  disk 
 </code> </code>
  
Ligne 323: Ligne 347:
  
 <code> <code>
-[root@centos8 ~]# lsblk --help+[root@redhat9 ~]# lsblk --help
  
 Usage: Usage:
Ligne 331: Ligne 355:
  
 Options: Options:
 + -D, --discard        print discard capabilities
 + -E, --dedup <column> de-duplicate output by <column>
 + -I, --include <list> show only devices with specified major numbers
 + -J, --json           use JSON output format
 + -O, --output-all     output all columns
 + -P, --pairs          use key="value" output format
 + -S, --scsi           output info about SCSI devices
 + -T, --tree[=<column>] use tree format output
  -a, --all            print all devices  -a, --all            print all devices
  -b, --bytes          print SIZE in bytes rather than in human readable format  -b, --bytes          print SIZE in bytes rather than in human readable format
  -d, --nodeps         don't print slaves or holders  -d, --nodeps         don't print slaves or holders
- -D, --discard        print discard capabilities 
- -z, --zoned          print zone model 
  -e, --exclude <list> exclude devices by major number (default: RAM disks)  -e, --exclude <list> exclude devices by major number (default: RAM disks)
  -f, --fs             output info about filesystems  -f, --fs             output info about filesystems
  -i, --ascii          use ascii characters only  -i, --ascii          use ascii characters only
- -I, --include <list> show only devices with specified major numbers 
- -J, --json           use JSON output format 
  -l, --list           use list format output  -l, --list           use list format output
- -T, --tree           use tree format output+ -M, --merge          group parents of sub-trees (usable for RAIDs, Multi-path)
  -m, --perms          output info about permissions  -m, --perms          output info about permissions
  -n, --noheadings     don't print headings  -n, --noheadings     don't print headings
  -o, --output <list>  output columns  -o, --output <list>  output columns
- -O, --output-all     output all columns 
  -p, --paths          print complete device path  -p, --paths          print complete device path
- -P, --pairs          use key="value" output format 
  -r, --raw            use raw output format  -r, --raw            use raw output format
  -s, --inverse        inverse dependencies  -s, --inverse        inverse dependencies
- -S, --scsi           output info about SCSI devices 
  -t, --topology       output info about topology  -t, --topology       output info about topology
 + -w, --width <num>    specifies output width as number of characters
  -x, --sort <column>  sort output by <column>  -x, --sort <column>  sort output by <column>
 + -z, --zoned          print zone model
 +     --sysroot <dir>  use specified directory as system root
  
  -h, --help           display this help  -h, --help           display this help
Ligne 359: Ligne 387:
  
 Available output columns: Available output columns:
-        NAME  device name +         NAME  device name 
-       KNAME  internal kernel device name +        KNAME  internal kernel device name 
-     MAJ:MIN  major:minor device number +         PATH  path to the device node 
-      FSTYPE  filesystem type +      MAJ:MIN  major:minor device number 
-  MOUNTPOINT  where the device is mounted +      FSAVAIL  filesystem size available 
-       LABEL  filesystem LABEL +       FSSIZE  filesystem size 
-        UUID  filesystem UUID +       FSTYPE  filesystem type 
-    PARTTYPE  partition type UUID +       FSUSED  filesystem size used 
-   PARTLABEL  partition LABEL +       FSUSE%  filesystem use percentage 
-    PARTUUID  partition UUID +      FSROOTS  mounted filesystem roots 
-   PARTFLAGS  partition flags +        FSVER  filesystem version 
-          RA  read-ahead of the device +   MOUNTPOINT  where the device is mounted 
-          RO  read-only device +  MOUNTPOINTS  all locations where device is mounted 
-          RM  removable device +        LABEL  filesystem LABEL 
-     HOTPLUG  removable or hotplug device (usb, pcmcia, ...) +         UUID  filesystem UUID 
-       MODEL  device identifier +       PTUUID  partition table identifier (usually UUID) 
-      SERIAL  disk serial number +       PTTYPE  partition table type 
-        SIZE  size of the device +     PARTTYPE  partition type code or UUID 
-       STATE  state of the device + PARTTYPENAME  partition type name 
-       OWNER  user name +    PARTLABEL  partition LABEL 
-       GROUP  group name +     PARTUUID  partition UUID 
-        MODE  device node permissions +    PARTFLAGS  partition flags 
-   ALIGNMENT  alignment offset +           RA  read-ahead of the device 
-      MIN-IO  minimum I/O size +           RO  read-only device 
-      OPT-IO  optimal I/O size +           RM  removable device 
-     PHY-SEC  physical sector size +      HOTPLUG  removable or hotplug device (usb, pcmcia, ...) 
-     LOG-SEC  logical sector size +        MODEL  device identifier 
-        ROTA  rotational device +       SERIAL  disk serial number 
-       SCHED  I/O scheduler name +         SIZE  size of the device 
-     RQ-SIZE  request queue size +        STATE  state of the device 
-        TYPE  device type +        OWNER  user name 
-    DISC-ALN  discard alignment offset +        GROUP  group name 
-   DISC-GRAN  discard granularity +         MODE  device node permissions 
-    DISC-MAX  discard max bytes +    ALIGNMENT  alignment offset 
-   DISC-ZERO  discard zeroes data +       MIN-IO  minimum I/O size 
-       WSAME  write same max bytes +       OPT-IO  optimal I/O size 
-         WWN  unique storage identifier +      PHY-SEC  physical sector size 
-        RAND  adds randomness +      LOG-SEC  logical sector size 
-      PKNAME  internal parent kernel device name +         ROTA  rotational device 
-        HCTL  Host:Channel:Target:Lun for SCSI +        SCHED  I/O scheduler name 
-        TRAN  device transport type +      RQ-SIZE  request queue size 
-  SUBSYSTEMS  de-duplicated chain of subsystems +         TYPE  device type 
-         REV  device revision +     DISC-ALN  discard alignment offset 
-      VENDOR  device vendor +    DISC-GRAN  discard granularity 
-       ZONED  zone model+     DISC-MAX  discard max bytes 
 +    DISC-ZERO  discard zeroes data 
 +        WSAME  write same max bytes 
 +          WWN  unique storage identifier 
 +         RAND  adds randomness 
 +       PKNAME  internal parent kernel device name 
 +         HCTL  Host:Channel:Target:Lun for SCSI 
 +         TRAN  device transport type 
 +   SUBSYSTEMS  de-duplicated chain of subsystems 
 +          REV  device revision 
 +       VENDOR  device vendor 
 +        ZONED  zone model 
 +          DAX  dax-capable device
  
 For more details see lsblk(8). For more details see lsblk(8).
Ligne 413: Ligne 453:
  
 <code> <code>
-[root@centos8 ~]# lsscsi +[root@redhat9 ~]# lsscsi 
-[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0  +[0:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda  
-[2:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sda  +[2:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0  
-[3:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdb  +[3:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdb
-[4:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdc  +
-[5:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+  /dev/sdd +
 </code> </code>
  
Ligne 426: Ligne 464:
  
 <code> <code>
-[root@centos8 ~]# man lsscsi  +[root@redhat9 ~]# lsscsi --help
-[root@centos8 ~]# lsscsi --help+
 Usage: lsscsi   [--brief] [--classic] [--controllers] [--device] [--generic] Usage: lsscsi   [--brief] [--classic] [--controllers] [--device] [--generic]
                 [--help] [--hosts] [--kname] [--list] [--long] [--long-unit]                 [--help] [--hosts] [--kname] [--list] [--long] [--long-unit]
Ligne 482: Ligne 519:
  
 <code> <code>
-[root@centos8 ~]# lscpu +[root@redhat9 ~]# lscpu 
-Architecture:        x86_64 +Architecture:            x86_64 
-CPU op-mode(s):      32-bit, 64-bit +  CPU op-mode(s):        32-bit, 64-bit 
-Byte Order:          Little Endian +  Address sizes:         46 bits physical, 48 bits virtual 
-CPU(s):              8 +  Byte Order:            Little Endian 
-On-line CPU(s) list: 0-+CPU(s):                  4 
-Thread(s) per core:  1 +  On-line CPU(s) list:   0-3 
-Core(s) per socket: +Vendor ID:               GenuineIntel 
-Socket(s):           2 +  BIOS Vendor ID:        QEMU 
-NUMA node(s):        1 +  Model name:            Intel(R) Xeon(R) CPU D-1541 2.10GHz 
-Vendor ID:           GenuineIntel +    BIOS Model name:     pc-i440fx-7.2 
-BIOS Vendor ID:      QEMU +    CPU family         6 
-CPU family:          6 +    Model              86 
-Model:               158 +    Thread(s) per core 1 
-Model name:          Intel(R) Xeon(R) CPU E3-1270 v6 3.80GHz +    Core(s) per socket 2 
-BIOS Model name:     pc-i440fx-7.+    Socket(s):           2 
-Stepping:            9 +    Stepping:            3 
-CPU MHz            3791.998 +    BogoMIPS:            4199.99 
-BogoMIPS           7583.99 +    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cp 
-Virtualization     VT-x +                         uid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_f 
-Hypervisor vendor  KVM +                         ault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat vnmi umip md_clear arch_ 
-Virtualization type: full +                         capabilities 
-L1d cache:           32K +Virtualization features:  
-L1i cache:           32K +  Virtualization:        VT-x 
-L2 cache:            4096K +  Hypervisor vendor:     KVM 
-L3 cache:            16384K +  Virtualization type:   full 
-NUMA node0 CPU(s):   0-7 +Caches (sum of all):      
-Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip md_clear arch_capabilities+  L1d:                   128 KiB (4 instances) 
 +  L1i:                   128 KiB (4 instances) 
 +  L2:                    16 MiB (4 instances) 
 +  L3:                    32 MiB (2 instances) 
 +NUMA:                     
 +  NUMA node(s):          1 
 +  NUMA node0 CPU(s):     0-3 
 +Vulnerabilities:          
 +  Gather data sampling:  Not affected 
 +  Itlb multihit:         Not affected 
 +  L1tf:                  Mitigation; PTE Inversion; VMX flush not necessary, SMT disabled 
 +  Mds:                   Mitigation; Clear CPU buffers; SMT Host state unknown 
 +  Meltdown:              Mitigation; PTI 
 +  Mmio stale data:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown 
 +  Retbleed:              Not affected 
 +  Spec rstack overflow:  Not affected 
 +  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl 
 +  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization 
 +  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected 
 +  Srbds:                 Not affected 
 +  Tsx async abort:       Mitigation; Clear CPU buffers; SMT Host state unknown
 </code> </code>
  
Ligne 517: Ligne 574:
  
 <code> <code>
-[root@centos8 ~]# lscpu --help+[root@redhat9 ~]# lscpu --help
  
 Usage: Usage:
Ligne 527: Ligne 584:
  -a, --all               print both online and offline CPUs (default for -e)  -a, --all               print both online and offline CPUs (default for -e)
  -b, --online            print online CPUs only (default for -p)  -b, --online            print online CPUs only (default for -p)
 + -B, --bytes             print sizes in bytes rather than in human readable format
 + -C, --caches[=<list>  info about caches in extended readable format
  -c, --offline           print offline CPUs only  -c, --offline           print offline CPUs only
  -J, --json              use JSON for default or extended format  -J, --json              use JSON for default or extended format
Ligne 534: Ligne 593:
  -x, --hex               print hexadecimal masks rather than lists of CPUs  -x, --hex               print hexadecimal masks rather than lists of CPUs
  -y, --physical          print physical instead of logical IDs  -y, --physical          print physical instead of logical IDs
 +     --output-all        print all available columns for -e, -p or -C
  
  -h, --help              display this help  -h, --help              display this help
  -V, --version           display version  -V, --version           display version
  
-Available output columns:+Available output columns for -e or -p: 
 +      BOGOMIPS  crude measurement of CPU speed
            CPU  logical CPU number            CPU  logical CPU number
           CORE  logical core number           CORE  logical core number
Ligne 551: Ligne 612:
     CONFIGURED  shows if the hypervisor has allocated the CPU     CONFIGURED  shows if the hypervisor has allocated the CPU
         ONLINE  shows if Linux currently makes use of the CPU         ONLINE  shows if Linux currently makes use of the CPU
 +           MHZ  shows the currently MHz of the CPU
 +      SCALMHZ%  shows scaling percentage of the CPU frequency
         MAXMHZ  shows the maximum MHz of the CPU         MAXMHZ  shows the maximum MHz of the CPU
         MINMHZ  shows the minimum MHz of the CPU         MINMHZ  shows the minimum MHz of the CPU
 +
 +Available output columns for -C:
 +      ALL-SIZE  size of all system caches
 +         LEVEL  cache level
 +          NAME  cache name
 +      ONE-SIZE  size of one cache
 +          TYPE  cache type
 +          WAYS  ways of associativity
 +  ALLOC-POLICY  allocation policy
 +  WRITE-POLICY  write policy
 +      PHY-LINE  number of physical cache line per cache t
 +          SETS  number of sets in the cache; set lines has the same cache index
 + COHERENCY-SIZE  minimum amount of data in bytes transferred from memory to cache
  
 For more details see lscpu(1). For more details see lscpu(1).
Ligne 562: Ligne 638:
  
 <code> <code>
-[root@centos8 ~]# lshw -businfo+[root@redhat9 ~]# lshw -businfo
 Bus info          Device      Class      Description Bus info          Device      Class      Description
 ==================================================== ====================================================
Ligne 568: Ligne 644:
                               bus        Motherboard                               bus        Motherboard
                               memory     96KiB BIOS                               memory     96KiB BIOS
-cpu@0                         processor  Intel(R) Xeon(R) CPU E3-1270 v6 3.80GHz +cpu@0                         processor  Intel(R) Xeon(R) CPU D-1541 2.10GHz 
-cpu@1                         processor  Intel(R) Xeon(R) CPU E3-1270 v6 3.80GHz +cpu@1                         processor  Intel(R) Xeon(R) CPU D-1541 2.10GHz 
-                              memory     16GiB System Memory +                              memory     8GiB System Memory 
-                              memory     DIMM RAM [empty]+                              memory     8GiB DIMM RAM
 pci@0000:00:00.0              bridge     440FX - 82441FX PMC [Natoma] pci@0000:00:00.0              bridge     440FX - 82441FX PMC [Natoma]
 pci@0000:00:01.0              bridge     82371SB PIIX3 ISA [Natoma/Triton II] pci@0000:00:01.0              bridge     82371SB PIIX3 ISA [Natoma/Triton II]
Ligne 578: Ligne 654:
                               storage    PnP device PNP0700                               storage    PnP device PNP0700
                               system     PnP device PNP0b00                               system     PnP device PNP0b00
-pci@0000:00:01.1  scsi1       storage    82371SB PIIX3 IDE [Natoma/Triton II] +pci@0000:00:01.1  scsi2       storage    82371SB PIIX3 IDE [Natoma/Triton II] 
-scsi@1:0.0.0      /dev/cdrom  disk       QEMU DVD-ROM+scsi@2:0.0.0      /dev/cdrom  disk       QEMU DVD-ROM
 pci@0000:00:01.2              bus        82371SB PIIX3 USB [Natoma/Triton II] pci@0000:00:01.2              bus        82371SB PIIX3 USB [Natoma/Triton II]
 usb@1             usb1        bus        UHCI Host Controller usb@1             usb1        bus        UHCI Host Controller
Ligne 587: Ligne 663:
 pci@0000:00:03.0              generic    Virtio memory balloon pci@0000:00:03.0              generic    Virtio memory balloon
 virtio@0                      generic    Virtual I/O device virtio@0                      generic    Virtual I/O device
-pci@0000:00:07.0  scsi2       storage    82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Contr +pci@0000:00:05.0              bridge     QEMU PCI-PCI bridge 
-scsi@2:0.0.0      /dev/sda    disk       34GB QEMU HARDDISK +pci@0000:01:01.0              storage    Virtio SCSI 
-scsi@2:0.0.0,   /dev/sda1   volume     1GiB EXT4 volume +virtio@2          scsi0       generic    Virtual I/O device 
-scsi@2:0.0.0,   /dev/sda2   volume     30GiB Linux LVM Physical Volume partition +scsi@0:0.0.0      /dev/sda    disk       53GB QEMU HARDDISK 
-scsi@3:0.0.0      /dev/sdb    disk       4294MB QEMU HARDDISK +scsi@0:0.0.0,   /dev/sda1   volume     1GiB Linux filesystem partition 
-scsi@4:0.0.0      /dev/sdc    disk       68GB QEMU HARDDISK +scsi@0:0.0.0,   /dev/sda2   volume     48GiB Linux LVM Physical Volume partition
-scsi@4:0.0.0,   /dev/sdc1   volume     63GiB EXT4 volume +
-scsi@5:0.0.0      /dev/sdd    disk       34GB QEMU HARDDISK+
 pci@0000:00:12.0              network    Virtio network device pci@0000:00:12.0              network    Virtio network device
 virtio@1          ens18       network    Ethernet interface virtio@1          ens18       network    Ethernet interface
-pci@0000:00:13.0              network    Virtio network device 
-virtio@2          ens19       network    Ethernet interface 
 pci@0000:00:1e.0              bridge     QEMU PCI-PCI bridge pci@0000:00:1e.0              bridge     QEMU PCI-PCI bridge
 pci@0000:00:1f.0              bridge     QEMU PCI-PCI bridge pci@0000:00:1f.0              bridge     QEMU PCI-PCI bridge
Ligne 611: Ligne 683:
  
 <code> <code>
-[root@centos8 ~]# lshw -c system +[root@redhat9 ~]# lshw -c system 
-centos8.ittraining.loc      +redhat9.ittraining.loc      
     description: Computer     description: Computer
     product: Standard PC (i440FX + PIIX, 1996)     product: Standard PC (i440FX + PIIX, 1996)
     vendor: QEMU     vendor: QEMU
-    version: pc-i440fx-7.0+    version: pc-i440fx-7.2
     width: 64 bits     width: 64 bits
     capabilities: smbios-2.8 dmi-2.8 smp vsyscall32     capabilities: smbios-2.8 dmi-2.8 smp vsyscall32
-    configuration: boot=normal uuid=95bd69e3-4a74-44a7-b58c-b74fbfb86df2+    configuration: boot=normal uuid=6c89e267-fb34-42a1-9b13-15fa7185048f
   *-pnp00:03   *-pnp00:03
        product: PnP device PNP0b00        product: PnP device PNP0b00
Ligne 630: Ligne 702:
  
 <code> <code>
-[root@centos8 ~]# lshw -c memory+[root@redhat9 ~]# lshw -c memory
   *-firmware                   *-firmware                
        description: BIOS        description: BIOS
        vendor: SeaBIOS        vendor: SeaBIOS
        physical id: 0        physical id: 0
-       version: rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org+       version: rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org
        date: 04/01/2014        date: 04/01/2014
        size: 96KiB        size: 96KiB
Ligne 641: Ligne 713:
        description: System Memory        description: System Memory
        physical id: 1000        physical id: 1000
-       size: 16GiB+       size: 8GiB
        capabilities: ecc        capabilities: ecc
        configuration: errordetection=multi-bit-ecc        configuration: errordetection=multi-bit-ecc
      *-bank      *-bank
-          description: DIMM RAM [empty]+          description: DIMM RAM
           vendor: QEMU           vendor: QEMU
           physical id: 0           physical id: 0
           slot: DIMM 0           slot: DIMM 0
 +          size: 8GiB
  
-[root@centos8 ~]# lshw -c video+[root@redhat9 ~]# lshw -c video
   *-display                    *-display                 
        description: VGA compatible controller        description: VGA compatible controller
Ligne 662: Ligne 735:
        capabilities: vga_controller rom fb        capabilities: vga_controller rom fb
        configuration: depth=32 driver=bochs-drm latency=0 resolution=1280,800        configuration: depth=32 driver=bochs-drm latency=0 resolution=1280,800
-       resources: irq:0 memory:fd000000-fdffffff memory:fea90000-fea90fff memory:c0000-dffff+       resources: irq:0 memory:fc000000-fcffffff memory:fea50000-fea50fff memory:c0000-dffff
  
  
-[root@centos8 ~]# lshw -c storage+[root@redhat9 ~]# lshw -c storage
   *-pnp00:02                   *-pnp00:02                
        product: PnP device PNP0700        product: PnP device PNP0700
Ligne 676: Ligne 749:
        physical id: 1.1        physical id: 1.1
        bus info: pci@0000:00:01.1        bus info: pci@0000:00:01.1
-       logical name: scsi1+       logical name: scsi2
        version: 00        version: 00
        width: 32 bits        width: 32 bits
Ligne 682: Ligne 755:
        capabilities: ide isa_compat_mode bus_master emulated        capabilities: ide isa_compat_mode bus_master emulated
        configuration: driver=ata_piix latency=0        configuration: driver=ata_piix latency=0
-       resources: irq:0 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:e0c0(size=16) +       resources: irq:0 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:f080(size=16) 
-  *-sata +  *-scsi 
-       description: SATA controller +       description: SCSI storage controller 
-       product: 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] +       product: Virtio SCSI 
-       vendor: Intel Corporation +       vendor: Red Hat, Inc. 
-       physical id: 7 +       physical id: 1 
-       bus info: pci@0000:00:07.0 +       bus info: pci@0000:01:01.0 
-       logical name: scsi2 +       version: 00 
-       logical name: scsi3 +       width: 64 bits
-       logical name: scsi4 +
-       logical name: scsi5 +
-       version: 02 +
-       width: 32 bits+
        clock: 33MHz        clock: 33MHz
-       capabilities: sata msi ahci_1.0 bus_master cap_list emulated +       capabilities: scsi msix bus_master cap_list 
-       configuration: driver=ahci latency=0 +       configuration: driver=virtio-pci latency=0 
-       resources: irq:30 ioport:e060(size=32) memory:fea91000-fea91fff+       resources: irq:10 ioport:e000(size=64) memory:fe800000-fe800fff memory:fd400000-fd403fff
  
- +[root@redhat9 ~]# lshw -c disk
-[root@centos8 ~]# lshw -c disk+
   *-cdrom                      *-cdrom                   
        description: DVD reader        description: DVD reader
Ligne 707: Ligne 775:
        vendor: QEMU        vendor: QEMU
        physical id: 0.0.0        physical id: 0.0.0
-       bus info: scsi@1:0.0.0+       bus info: scsi@2:0.0.0
        logical name: /dev/cdrom        logical name: /dev/cdrom
        logical name: /dev/sr0        logical name: /dev/sr0
Ligne 713: Ligne 781:
        capabilities: removable audio dvd        capabilities: removable audio dvd
        configuration: ansiversion=5 status=nodisc        configuration: ansiversion=5 status=nodisc
-  *-disk:0 +  *-disk 
-       description: ATA Disk+       description: SCSI Disk
        product: QEMU HARDDISK        product: QEMU HARDDISK
-       physical id: 0 +       vendor: QEMU 
-       bus info: scsi@2:0.0.0+       physical id: 0.0.
 +       bus info: scsi@0:0.0.0
        logical name: /dev/sda        logical name: /dev/sda
        version: 2.5+        version: 2.5+
-       serial: QM00005 +       size: 50GiB (53GB
-       size: 32GiB (34GB+       capabilities: 5400rpm partitioned partitioned:dos 
-       capabilities: partitioned partitioned:dos +       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=d00dfc8a
-       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=b39ec5c8 +
-  *-disk:1 +
-       description: ATA Disk +
-       product: QEMU HARDDISK +
-       physical id: 1 +
-       bus info: scsi@3:0.0.0 +
-       logical name: /dev/sdb +
-       version: 2.5+ +
-       serial: QM00007 +
-       size: 4GiB (4294MB) +
-       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 +
-  *-disk:2 +
-       description: ATA Disk +
-       product: QEMU HARDDISK +
-       physical id: 2 +
-       bus info: scsi@4:0.0.0 +
-       logical name: /dev/sdc +
-       version: 2.5+ +
-       serial: QM00009 +
-       size: 64GiB (68GB) +
-       capabilities: partitioned partitioned:dos +
-       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=45352f44 +
-  *-disk:3 +
-       description: ATA Disk +
-       product: QEMU HARDDISK +
-       physical id: 3 +
-       bus info: scsi@5:0.0.0 +
-       logical name: /dev/sdd +
-       version: 2.5+ +
-       serial: QM00011 +
-       size: 32GiB (34GB) +
-       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 +
  
-[root@centos8 ~]# lshw -c volume+[root@redhat9 ~]# lshw -c volume
   *-volume:                  *-volume:               
-       description: EXT4 volume +       description: Linux filesystem partition
-       vendor: Linux+
        physical id: 1        physical id: 1
-       bus info: scsi@2:0.0.0,1+       bus info: scsi@0:0.0.0,1
        logical name: /dev/sda1        logical name: /dev/sda1
        logical name: /boot        logical name: /boot
-       version: 1.0 
-       serial: 1c04981e-5317-4b73-9695-3ce25246835d 
-       size: 1GiB 
        capacity: 1GiB        capacity: 1GiB
-       capabilities: primary bootable journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized +       capabilities: primary bootable 
-       configuration: created=2021-06-16 12:21:27 filesystem=ext4 lastmountpoint=/boot modified=2022-11-10 07:12:41 mount.fstype=ext4 mount.options=rw,seclabel,relatime mounted=2022-11-10 07:12:41 state=mounted+       configuration: mount.fstype=xfs mount.options=rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota state=mounted
   *-volume:1   *-volume:1
        description: Linux LVM Physical Volume partition        description: Linux LVM Physical Volume partition
        physical id: 2        physical id: 2
-       bus info: scsi@2:0.0.0,2+       bus info: scsi@0:0.0.0,2
        logical name: /dev/sda2        logical name: /dev/sda2
-       serial: kOJTuY-TbBA-JSvU-vhkb-rvpz-QoPt-bIKe2e +       serial: tpPvpD-OIie-EmBd-M7Xh-gNRF-Z5u3-OP84ck 
-       size: 30GiB +       size: 48GiB 
-       capacity: 30GiB+       capacity: 48GiB
        capabilities: primary multi lvm2        capabilities: primary multi lvm2
-  *-volume 
-       description: EXT4 volume 
-       vendor: Linux 
-       physical id: 1 
-       bus info: scsi@4:0.0.0,1 
-       logical name: /dev/sdc1 
-       logical name: /home 
-       version: 1.0 
-       serial: f76d6b66-985b-4a91-af9c-4987e8c1443c 
-       size: 63GiB 
-       capacity: 63GiB 
-       capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized 
-       configuration: created=2021-07-19 18:02:13 filesystem=ext4 lastmountpoint=/home modified=2022-11-10 15:34:07 mount.fstype=ext4 mount.options=rw,seclabel,relatime mounted=2022-11-10 15:34:07 state=mounted 
  
-[root@centos8 ~]# lshw -c network +[root@redhat9 ~]# lshw -c network 
-  *-network:0               +  *-network                 
        description: Ethernet controller        description: Ethernet controller
        product: Virtio network device        product: Virtio network device
Ligne 806: Ligne 825:
        capabilities: msix bus_master cap_list rom        capabilities: msix bus_master cap_list rom
        configuration: driver=virtio-pci latency=0        configuration: driver=virtio-pci latency=0
-       resources: irq:10 ioport:e080(size=32) memory:fea92000-fea92fff memory:fe404000-fe407fff memory:fea00000-fea3ffff+       resources: irq:10 ioport:f060(size=32) memory:fea52000-fea52fff memory:fd604000-fd607fff memory:fea00000-fea3ffff
      *-virtio1      *-virtio1
           description: Ethernet interface           description: Ethernet interface
Ligne 812: Ligne 831:
           bus info: virtio@1           bus info: virtio@1
           logical name: ens18           logical name: ens18
-          serial: 5e:3f:e8:43:d5:f9 +          serial: 92:86:d7:66:e7:5a
-          capabilities: ethernet physical +
-          configuration: autonegotiation=off broadcast=yes driver=virtio_net driverversion=1.0.0 ip=10.0.2.45 link=yes multicast=yes +
-  *-network:+
-       description: Ethernet controller +
-       product: Virtio network device +
-       vendor: Red Hat, Inc. +
-       physical id: 13 +
-       bus info: pci@0000:00:13.0 +
-       version: 00 +
-       width: 64 bits +
-       clock: 33MHz +
-       capabilities: msix bus_master cap_list rom +
-       configuration: driver=virtio-pci latency=0 +
-       resources: irq:10 ioport:e0a0(size=32) memory:fea93000-fea93fff memory:fe408000-fe40bfff memory:fea40000-fea7ffff +
-     *-virtio2 +
-          description: Ethernet interface +
-          physical id: 0 +
-          bus info: virtio@2 +
-          logical name: ens19 +
-          serial: ea:c8:86:9e:73:a6+
           capabilities: ethernet physical           capabilities: ethernet physical
-          configuration: autonegotiation=off broadcast=yes driver=virtio_net driverversion=1.0.0 link=yes multicast=yes+          configuration: autonegotiation=off broadcast=yes driver=virtio_net driverversion=1.0.0 ip=10.0.2.101 link=yes multicast=yes
 </code> </code>
  
Ligne 842: Ligne 841:
  
 <code> <code>
-[root@centos8 ~]# lshw -h+[root@redhat9 ~]# lshw -h
 Hardware Lister (lshw) - B.02.19.2 Hardware Lister (lshw) - B.02.19.2
 usage: lshw [-format] [-options ...] usage: lshw [-format] [-options ...]
Ligne 857: Ligne 856:
  
 options can be options can be
-        -dump filename  displays output and dump collected information into a file (SQLite database)+        -dump filename  display output and dump collected information into a file (SQLite database)
         -class CLASS    only show a certain class of hardware         -class CLASS    only show a certain class of hardware
         -C CLASS        same as '-class CLASS'         -C CLASS        same as '-class CLASS'
         -c CLASS        same as '-class CLASS'         -c CLASS        same as '-class CLASS'
-        -disable TEST   disable a test (like pci, isapnp, cpuid, etc. ) +        -disable TEST   disable a test (like pci, isapnp, cpuid, etc.) 
-        -enable TEST    enable a test (like pci, isapnp, cpuid, etc. )+        -enable TEST    enable a test (like pci, isapnp, cpuid, etc.)
         -quiet          don't display status         -quiet          don't display status
         -sanitize       sanitize output (remove sensitive information like serial numbers, etc.)         -sanitize       sanitize output (remove sensitive information like serial numbers, etc.)
Ligne 877: Ligne 876:
  
 <code> <code>
-[root@centos8 ~]# dmidecode +[root@redhat9 ~]# dmidecode 
-# dmidecode 3.2+# dmidecode 3.5
 Getting SMBIOS data from sysfs. Getting SMBIOS data from sysfs.
 SMBIOS 2.8 present. SMBIOS 2.8 present.
 11 structures occupying 511 bytes. 11 structures occupying 511 bytes.
-Table at 0x000F5870.+Table at 0x000F59C0.
  
 Handle 0x0000, DMI type 0, 24 bytes Handle 0x0000, DMI type 0, 24 bytes
 BIOS Information BIOS Information
         Vendor: SeaBIOS         Vendor: SeaBIOS
-        Version: rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org+        Version: rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org
         Release Date: 04/01/2014         Release Date: 04/01/2014
         Address: 0xE8000         Address: 0xE8000
Ligne 901: Ligne 900:
         Manufacturer: QEMU         Manufacturer: QEMU
         Product Name: Standard PC (i440FX + PIIX, 1996)         Product Name: Standard PC (i440FX + PIIX, 1996)
-        Version: pc-i440fx-5.2+        Version: pc-i440fx-7.2
         Serial Number: Not Specified         Serial Number: Not Specified
-        UUID: 95bd69e3-4a74-44a7-b58c-b74fbfb86df2+        UUID: 6c89e267-fb34-42a1-9b13-15fa7185048f
         Wake-up Type: Power Switch         Wake-up Type: Power Switch
         SKU Number: Not Specified         SKU Number: Not Specified
Ligne 913: Ligne 912:
         Type: Other         Type: Other
         Lock: Not Present         Lock: Not Present
-        Version: pc-i440fx-5.2+        Version: pc-i440fx-7.2
         Serial Number: Not Specified         Serial Number: Not Specified
         Asset Tag: Not Specified         Asset Tag: Not Specified
Ligne 932: Ligne 931:
         Family: Other         Family: Other
         Manufacturer: QEMU         Manufacturer: QEMU
-        ID: 61 0F 00 00 FF FB 8B 07 +        ID: 63 06 05 00 FF FB 8B 0F 
-        Version: pc-i440fx-5.2+        Version: pc-i440fx-7.2
         Voltage: Unknown         Voltage: Unknown
         External Clock: Unknown         External Clock: Unknown
Ligne 946: Ligne 945:
         Asset Tag: Not Specified         Asset Tag: Not Specified
         Part Number: Not Specified         Part Number: Not Specified
-        Core Count: 4 +        Core Count: 2 
-        Core Enabled: 4 +        Core Enabled: 2 
-        Thread Count: 1+        Thread Count: 2
         Characteristics: None         Characteristics: None
  
Ligne 957: Ligne 956:
         Family: Other         Family: Other
         Manufacturer: QEMU         Manufacturer: QEMU
-        ID: 61 0F 00 00 FF FB 8B 07 +        ID: 63 06 05 00 FF FB 8B 0F 
-        Version: pc-i440fx-5.2+        Version: pc-i440fx-7.2
         Voltage: Unknown         Voltage: Unknown
         External Clock: Unknown         External Clock: Unknown
Ligne 971: Ligne 970:
         Asset Tag: Not Specified         Asset Tag: Not Specified
         Part Number: Not Specified         Part Number: Not Specified
-        Core Count: 4 +        Core Count: 2 
-        Core Enabled: 4 +        Core Enabled: 2 
-        Thread Count: 1+        Thread Count: 2
         Characteristics: None         Characteristics: None
  
Ligne 981: Ligne 980:
         Use: System Memory         Use: System Memory
         Error Correction Type: Multi-bit ECC         Error Correction Type: Multi-bit ECC
-        Maximum Capacity: GB+        Maximum Capacity: GB
         Error Information Handle: Not Provided         Error Information Handle: Not Provided
         Number Of Devices: 1         Number Of Devices: 1
Ligne 991: Ligne 990:
         Total Width: Unknown         Total Width: Unknown
         Data Width: Unknown         Data Width: Unknown
-        Size: GB+        Size: GB
         Form Factor: DIMM         Form Factor: DIMM
         Set: None         Set: None
Ligne 1020: Ligne 1019:
 Memory Array Mapped Address Memory Array Mapped Address
         Starting Address: 0x00100000000         Starting Address: 0x00100000000
-        Ending Address: 0x0013FFFFFFF +        Ending Address: 0x0023FFFFFFF 
-        Range Size: GB+        Range Size: GB
         Physical Array Handle: 0x1000         Physical Array Handle: 0x1000
         Partition Width: 1         Partition Width: 1
Ligne 1038: Ligne 1037:
  
 <code> <code>
-[root@centos7 ~]# dmidecode --help+[root@redhat9 ~]# dmidecode --help
 Usage: dmidecode [OPTIONS] Usage: dmidecode [OPTIONS]
 Options are: Options are:
Ligne 1044: Ligne 1043:
  -h, --help             Display this help text and exit  -h, --help             Display this help text and exit
  -q, --quiet            Less verbose output  -q, --quiet            Less verbose output
 +     --no-quirks        Decode everything without quirks
  -s, --string KEYWORD   Only display the value of the given DMI string  -s, --string KEYWORD   Only display the value of the given DMI string
  -t, --type TYPE        Only display the entries of given type  -t, --type TYPE        Only display the entries of given type
 + -H, --handle HANDLE    Only display the entry of given handle
  -u, --dump             Do not decode the entries  -u, --dump             Do not decode the entries
      --dump-bin FILE    Dump the DMI data to a binary file      --dump-bin FILE    Dump the DMI data to a binary file
      --from-dump FILE   Read the DMI data from a binary file      --from-dump FILE   Read the DMI data from a binary file
 +     --no-sysfs         Do not attempt to read DMI data from sysfs files
 +     --oem-string N     Only display the value of the given OEM string
  -V, --version          Display the version and exit  -V, --version          Display the version and exit
 </code> </code>
Ligne 1054: Ligne 1057:
 ====1.8 - La Commande smartctl==== ====1.8 - La Commande smartctl====
  
-**smartctl** contrôle le système SMART (Self-Monitoring, Analysis and Reporting Technology) intégré à la plupart des disques durs et disques SSD ATA/SATA et SCSI/SAS :+**smartctl** contrôle le système SMART (Self-Monitoring, Analysis and Reporting Technology) intégré à la plupart des disques durs et disques SSD ATA/SATA et SCSI/SAS
 + 
 +Activez smartctl :
  
 <code> <code>
-[root@centos8 ~]# smartctl --smart=on --saveauto=on --offlineauto=on /dev/sdb+[root@redhat9 ~]# smartctl --smart=on --saveauto=on --offlineauto=on /dev/sdb 
 +smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.14.0-427.37.1.el9_4.x86_64] (local build) 
 +Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 
 + 
 +=== START OF ENABLE/DISABLE COMMANDS SECTION === 
 +SMART Enabled. 
 +SMART Attribute Autosave Enabled. 
 +SMART Automatic Timers not supported 
 + 
 +SMART Enable Automatic Offline failed: scsi error badly formed scsi parameters
  
-[root@centos8 ~]# smartctl -a /dev/sdb +[root@redhat9 ~]# smartctl -a /dev/sdb 
-smartctl 7.2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build) +smartctl 7.2020-12-30 r5155 [x86_64-linux-5.14.0-427.37.1.el9_4.x86_64] (local build) 
-Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org+Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
  
 === START OF INFORMATION SECTION === === START OF INFORMATION SECTION ===
 Device Model:     QEMU HARDDISK Device Model:     QEMU HARDDISK
-Serial Number:    QM00007+Serial Number:    QM00005
 Firmware Version: 2.5+ Firmware Version: 2.5+
-User Capacity:    4,294,967,296 bytes [4.29 GB]+User Capacity:    34,359,738,368 bytes [34.GB]
 Sector Size:      512 bytes logical/physical Sector Size:      512 bytes logical/physical
 +TRIM Command:     Available, deterministic
 Device is:        Not in smartctl database [for details use: -P showall] Device is:        Not in smartctl database [for details use: -P showall]
 ATA Version is:   ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000 ATA Version is:   ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000
-Local Time is:    Sun Nov 13 09:12:18 2022 CET+Local Time is:    Tue Oct 22 15:38:47 2024 CEST
 SMART support is: Available - device has SMART capability. SMART support is: Available - device has SMART capability.
 SMART support is: Enabled SMART support is: Enabled
Ligne 1131: Ligne 1146:
  
 <code> <code>
-[root@centos8 ~]# smartctl --help +[root@redhat9 ~]# smartctl --help 
-smartctl 7.2020-04-05 r5049 [x86_64-linux-4.18.0-305.7.1.el8_4.x86_64] (local build) +smartctl 7.2020-12-30 r5155 [x86_64-linux-5.14.0-427.37.1.el9_4.x86_64] (local build) 
-Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org+Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
  
 Usage: smartctl [options] device Usage: smartctl [options] device
Ligne 1169: Ligne 1184:
 ================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS ===== ================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS =====
  
-  -j, --json[=[cgiosuv]+  -j, --json[=cgiosuvy
-         Print output in JSON format+         Print output in JSON or YAML format
  
   -q TYPE, --quietmode=TYPE                                           (ATA)   -q TYPE, --quietmode=TYPE                                           (ATA)
Ligne 1177: Ligne 1192:
   -d TYPE, --device=TYPE   -d TYPE, --device=TYPE
          Specify device type to one of:          Specify device type to one of:
-         ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntjmicron[,NSID], intelliprop,N[+TYPE], jmb39x,N[,sLBA][,force][+TYPE], marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, cciss,N, auto, test+         ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntjmicron[,NSID], sntrealtek, intelliprop,N[+TYPE], jmb39x[-q],N[,sLBA][,force][+TYPE], jms56x,N[,sLBA][,force][+TYPE], marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, cciss,N, auto, test
  
   -T TYPE, --tolerance=TYPE                                           (ATA)   -T TYPE, --tolerance=TYPE                                           (ATA)
Ligne 1188: Ligne 1203:
          Report transactions (see man page)          Report transactions (see man page)
  
-  -n MODE[,STATUS], --nocheck=MODE[,STATUS]                           (ATA)+  -n MODE[,STATUS], --nocheck=MODE[,STATUS]                     (ATA, SCSI)
          No check if: never, sleep, standby, idle (see man page)          No check if: never, sleep, standby, idle (see man page)
  
Ligne 1285: Ligne 1300:
  
 <code> <code>
-[root@centos8 ~]# accton on+[root@redhat9 ~]# accton on
 Turning on process accounting, file set to the default '/var/account/pacct'. Turning on process accounting, file set to the default '/var/account/pacct'.
-[root@centos8 ~]# systemctl status psacct 
-● psacct.service - Kernel process accounting 
-   Loaded: loaded (/usr/lib/systemd/system/psacct.service; disabled; vendor preset: d> 
-   Active: inactive (dead) 
-...skipping... 
-● psacct.service - Kernel process accounting 
-   Loaded: loaded (/usr/lib/systemd/system/psacct.service; disabled; vendor preset: d> 
-   Active: inactive (dead) 
  
-[root@centos8 ~]# systemctl enable psacct+[root@redhat9 ~]# systemctl status psacct 
 +○ psacct.service - Kernel process accounting 
 +     Loaded: loaded (/usr/lib/systemd/system/psacct.service; disabled; preset: disabled) 
 +     Active: inactive (dead) 
 + 
 +[root@redhat9 ~]# systemctl enable --now psacct
 Created symlink /etc/systemd/system/multi-user.target.wants/psacct.service → /usr/lib/systemd/system/psacct.service. Created symlink /etc/systemd/system/multi-user.target.wants/psacct.service → /usr/lib/systemd/system/psacct.service.
  
-[root@centos8 ~]# systemctl start psacct +[root@redhat9 ~]# systemctl status psacct
- +
-[root@centos8 ~]# systemctl status psacct+
 ● psacct.service - Kernel process accounting ● psacct.service - Kernel process accounting
-   Loaded: loaded (/usr/lib/systemd/system/psacct.service; enabled; vendor preset: di> +     Loaded: loaded (/usr/lib/systemd/system/psacct.service; enabled; preset: disabled) 
-   Active: active (exited) since Sun 2022-11-13 09:35:16 CET4s ago +     Active: active (exited) since Tue 2024-10-22 15:41:45 CEST3s ago 
-  Process: 39765 ExecStart=/usr/sbin/accton /var/account/pacct (code=exited, status=0> +    Process: 2249 ExecStartPre=/usr/libexec/psacct/accton-create (code=exited, status=0/SUCCESS) 
-  Process: 39763 ExecStartPre=/usr/libexec/psacct/accton-create (code=exited, status=> +    Process: 2250 ExecStart=/usr/sbin/accton /var/account/pacct (code=exited, status=0/SUCCESS) 
- Main PID: 39765 (code=exited, status=0/SUCCESS)+   Main PID: 2250 (code=exited, status=0/SUCCESS) 
 +        CPU: 4ms
  
-Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Starting Kernel process accounting> +Oct 22 15:41:45 redhat9.ittraining.loc systemd[1]: Starting Kernel process accounting... 
-Nov 13 09:35:16 centos8.ittraining.loc accton[39765]: Turning on process accounting, > +Oct 22 15:41:45 redhat9.ittraining.loc accton[2250]: Turning on process accounting, file set to '/var/account/pacct'. 
-Nov 13 09:35:16 centos8.ittraining.loc systemd[1]: Started Kernel process accounting.+Oct 22 15:41:45 redhat9.ittraining.loc systemd[1]: Finished Kernel process accounting.
 </code> </code>
  
Ligne 1317: Ligne 1328:
  
 <code> <code>
-[root@centos8 ~]# cat /var/account/pacct +[root@redhat9 ~]# cat /var/account/pacct 
-#pcKaccton pcEusleep%$pcu,awk$pc-iksmtuned('pc6pgrep'&pc-`ksmtuned)&pc,Eksmtuned*&pcd,awk&pc-ksmtuned/.'pc`D$less.'pcDEsystemctl+pcEssleep107pcu,awk07pc-jksmtuned437pc6pgrep327pc-bksmtuned527pc,Gksmtuned627pcd,awk27pc-ksmtuned?9;pc2rpc-pipefs-gene=9;pc2nfs-server-geneA9;pcEsystemd-cryptseI9;pcEsystemd-system-G9;pcEsystemd-hibernaC9;pcEsystemd-fstab-gE:;pc(^readlinkM;;pc$dgrepJ<;pc?lvmconfigN@;pc&`selinuxenabled;9;pc?s+Hkdump-dep-gener<9;pc?k0lvm2-activation:9;pc?B+anaconda-generaH9;pc?Esystemd-rc-loca>9;pc?SIostree-system-gO@;pc$agrep@9;pc?B+selinux-autorelB9;pc?Esystemd-debug-gK9;pc?Esystemd-sysv-geL9;pc?Esystemd-veritysD9;pc?Esystemd-getty-gF9;pc?Esystemd-gpt-aut9;pc@OC(sd-executor)8;pc`AEsystemctlSDpc?,accton-createUDpcacctonUDpacctonRQDpc@Esystemd-tty-askQDpc@@EsystemctlTDpcEsystemd-cgroupsVDpcEsystemd-cgroupsZYIpc`C$lessYIpcaCE%systemctlǘpcGkworker/dying77pcEssleepdcspcu,awkcspc-iksmtunedgfspc6pgrepfespc-_ksmtunedhespc,Fksmtunediespcd,awkespc?-ksmtuned[root@centos8 ~]#+vg?H 
 +_selinuxenablg(systemd-debugg?2kpodman-systemgM{grg?Mselinux-autorg?(systemd-hiberg?(systemd-veritg?(systemd-run-gg?(systemd-integg@(systemd-gettyg?(systemd-sysv-g?(systemd-systeg@-ostree-systemg@(systemd-cryptgMsg@Mnkdump-dep-geng@(systemd-rc-log@Mgrg@Mkdump-dep-geng@(systemd-blessg@(systemd-gpt-aug@JY(sd-executorg@Maccton-creatgacctogH 
 +acctg@@(systemd-tty-asgANsystemcg?Mlesg@tN5systemcgD{unix_chkpwd 
 +                                                               g?E(gmag|MjpgMsg@crond 
 +                                                                                    gE(gmain 
 +                                                                                           gE(gmain 
 +                                                                                                  gE'gmain 
 +                                                                                                         gE'gmain 
 +                                                                                                                gE'gmain 
 +                                                                                                                       gE'gmain 
 +                                                                                                                              gE*gmain 
 +                                                                                                                                     gE(gmainrgGkworker/dyingrgGkworker/dyingsgtGkworker/dying)rgGkworker/dying(rgGkworker/dyingtg.Gkworker/dyingtg.Gkworker/dying 
 +PpackagekitdrgBGkworker/dying.ugGkworker/dyingFsg0Gkworker/dying[root@redhat9 ~]# gGkworker/dying%rgDGkworker/dyinggF]
 </code> </code>
  
Ligne 1324: Ligne 1347:
  
 <code> <code>
-[root@centos8 ~]# dump-acct /var/account/pacct +[root@redhat9 ~]# dump-acct /var/account/pacct 
-accton          |v3|     0.00|     0.00|     1.00|     0|     0|  4360.00|     0.00|   39715|   37763|S    |       0|pts/  |Sun Nov 13 09:33:52 2022 +accton          |v3|     0.00|     0.00|     1.00|     0|     0|  2632.00|     0.00|    2216   2090|S    |       0|pts/  |Tue Oct 22 15:41:10 2024 
-sleep           |v3|     0.00|     0.00|  6000.00|     0|     0|  7308.00|     0.00|   39712|    1022|           0|__      |Sun Nov 13 09:33:03 2022 +less            |v3|     0.00|     0.00|     9.00|     0|     0|221312.00|     0.00|    2218|    2217|S    |       0|pts/  |Tue Oct 22 15:41:23 2024 
-awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25512.00|     0.00|   39717  39716|           0|__      |Sun Nov 13 09:34:03 2022 +systemctl       |v3|     0.00|     0.00|    10.00|     0|     0|236800.00|     0.00|    2217|    2090|S    |       3|pts/  |Tue Oct 22 15:41:23 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39716|    1022F   |       0|__      |Sun Nov 13 09:34:03 2022 +systemd-fstab-g |v3|     0.00|     0.00|     0.00|     0|     0| 18240.00|     0.00|    2228|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-pgrep           |v3|     0.00|     0.00|     0.00|     0|     0| 45104.00|     0.00|   39720  39719|           1|__      |Sun Nov 13 09:34:03 2022 +selinuxenabled  |v3|     0.00|     0.00|     0.00|     0|     0|  3436.00|     0.00|    2239|    2224|           0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39719  39718F   |       1|__      |Sun Nov 13 09:34:03 2022 +systemd-debug-g |v3|     0.00|     0.00|     0.00|     0|     0| 18200.00|     0.00|    2227   2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26112.00|     0.00|   39721  39718F   |       0|__      |Sun Nov 13 09:34:03 2022 +podman-system-g |v3|     0.00|     0.00|     1.00|     0|     0|1467392.00|     0.00|    2223|    2220|S   X|       0|__      |Tue Oct 22 15:41:45 2024 
-awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25376.00|     0.00|   39722  39718|           0|__      |Sun Nov 13 09:34:03 2022 +grep            |v3|     0.00|     0.00|     0.00|     0|     0|221824.00|     0.00|    2246|    2224    |       1|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39718|    1022| F         0|__      |Sun Nov 13 09:34:03 2022 +selinux-autorel |v3|     0.00|     0.00|     1.00|     0|     0|222528.00|     0.00|    2224|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-less            |v3|     0.00|     0.00|  1187.00|     0|     0|  9704.00|     0.00|   39727|   39726|S    |       0|pts/  |Sun Nov 13 09:34:47 2022 +systemd-hiberna |v3|     0.00|     0.00|     1.00|     0|     0| 18192.00|     0.00|    2231|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-systemctl       |v3|     0.00|     0.00|  1188.00|     0|     0| 93504.00|     0.00|   39726|   37763|S    |       3|pts/  |Sun Nov 13 09:34:47 2022 +systemd-veritys |v3|     0.00|     0.00|     1.00|     0|     0| 18224.00|     0.00   2243|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-sleep           |v3|     0.00|     0.00|  6000.00|     0|     0|  7308.00|     0.00|   39723|    1022|           0|__      |Sun Nov 13 09:34:03 2022 +systemd-run-gen |v3|     0.00|     0.00|     1.00|     0|     0| 18200.00|     0.00|    2240|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25512.00|     0.00|   39729|   39728|           0|__      |Sun Nov 13 09:35:03 2022 +systemd-integri |v3|     0.00|     0.00|     1.00|     0|     0| 18208.00|     0.00|    2232|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39728|    1022  |       0|__      |Sun Nov 13 09:35:03 2022 +systemd-getty-g |v3|     0.00|     0.00|     2.00|     0|     0| 18200.00|     0.00|    2229|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-pgrep           |v3|     0.00|     0.00|     0.00|     0|     0| 45104.00|     0.00|   39732|   39731|           1|__      |Sun Nov 13 09:35:03 2022 +systemd-sysv-ge |v3|     0.00|     0.00|     1.00|     0|     0| 18224.00|     0.00   2242   2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39731|   39730| F         1|__      |Sun Nov 13 09:35:03 2022 +systemd-system- |v3|     0.00|     0.00|     1.00|     0|     0| 18192.00|     0.00|    2241|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26112.00|     0.00|   39733|   39730| F         0|__      |Sun Nov 13 09:35:03 2022 +ostree-system-g |v3|     0.00|     0.00|     2.00|     0|     0| 27728.00|     0.00|    2222|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-awk             |v3|     0.00|     0.00|     0.00|     0|     0| 25376.00|     0.00|   39734|   39730|           0|__      |Sun Nov 13 09:35:03 2022 +systemd-cryptse |v3|     0.00|     0.00|     2.00|     0|     0| 18224.00|     0.00   2226   2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-ksmtuned        |v3|     0.00|     0.00|     0.00|     0|     0| 26632.00|     0.00|   39730   1022| F         0|__      |Sun Nov 13 09:35:03 2022 +sed             |v3|     0.00|     0.00|     0.00|     0|     0|221952.00|     0.00|    2247   2237|           0|__      |Tue Oct 22 15:41:45 2024 
-rpc-pipefs-gene |v3|     0.00|     0.00|     0.00|     0|     0| 38752.00|     0.00|   39743|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 +kdump-dep-gener |v3|     0.00|     0.00|     2.00|     0|     0|223168.00|     0.00|    2237|    2221| F         0|__      |Tue Oct 22 15:41:45 2024 
-nfs-server-gene |v3|     0.00|     0.00|     0.00|     0|     0| 38880.00|     0.00|   39741|   39737|         0|__      |Sun Nov 13 09:35:07 2022 +systemd-rc-loca |v3|     0.00|     0.00|     2.00|     0|     0| 18200.00|     0.00|    2236|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-systemd-cryptse |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39745|   39737|S    |       0|__      |Sun Nov 13 09:35:07 2022 +grep            |v3|     0.00|     0.00|     2.00|     0|     0|221696.00|     0.00|    2238|    2221|           1|__      |Tue Oct 22 15:41:45 2024 
-systemd-system- |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39753|   39737|         0|__      |Sun Nov 13 09:35:07 2022 +kdump-dep-gener |v3|     0.00|     0.00|     2.00|     0|     0|223168.00|     0.00|    2221|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-systemd-hiberna |v3|     0.00|     0.00|     0.00|     0|     0| 90368.00|     0.00|   39751|   39737|         0|__      |Sun Nov 13 09:35:07 2022 +systemd-bless-b |v3|     0.00|     0.00|     2.00|     0|     0| 18200.00|     0.00|    2225|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-... +systemd-gpt-aut |v3|     0.00|     0.00|     6.00|     0|     0| 18208.00|     0.00|    2230|    2220|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-</code> +(sd-executor)   |v3|     0.00|     0.00|     7.00|     0|     0|174080.00|     0.00|    2220|       1|SF   |       0|__      |Tue Oct 22 15:41:45 2024 
- +accton-create   |v3|     0.00|     0.00|     2.00|     0|     0|222528.00|     0.00|    2249|       1|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-===Options de la commande=== +accton          |v3|     0.00|     0.00|     0.00|     0|     0|     0.00|     0.00|    2250|       1|           0|__      |Tue Oct 22 15:41:45 2024 
- +accton          |v3|     0.00|     0.00|     0.00|     0|     0|  2632.00|     0.00|    2250|       1|S    |       0|__      |Tue Oct 22 15:41:45 2024 
-Les options de cette commande sont +systemd-tty-ask |v3|     0.00|     0.00|     3.00|     0|     0| 18224.00|     0.00|    2248|    2219|S    |       0|pts/  |Tue Oct 22 15:41:45 2024 
- +systemctl       |v3|     0.00|     0.00|    29.00|     0|     0|237696.00|     0.00|    2219|    2090|S    |       0|pts/  |Tue Oct 22 15:41:45 2024 
-<code> +less            |v3|     0.00|     0.00|     1.00|     0|     0|221312.00|     0.00|    2252|    2251|S    |       0|pts/  |Tue Oct 22 15:41:49 2024 
-[root@centos8 ~]# dump-acct --help +systemctl       |v3|     0.00|     0.00|     2.00|     0|     0|236800.00|     0.00|    2251|    2090|S    |       0|pts/  |Tue Oct 22 15:41:49 2024 
-Usagedump-acct [-hrR] [-n <recs>] <files> +unix_chkpwd     |v3|     0.00|     0.00|     0.00|     0|     0|  3908.00|     0.00|    2254|    2253|S    |       0|__      |Tue Oct 22 15:42:01 2024 
-          [--num <recs>] [--raw] [--reverse] [--help] +gmain           |v3|     0.00|     0.00|     1.00|   998|   996| 93248.00|     0.00|    2255|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
-          [--format <version>] [--byteswap] +pwd             |v3|     0.00|     0.00|     0.00|  1000|  1000|220928.00|     0.00|    2258|    2257|     |       0|__      |Tue Oct 22 15:42:01 2024 
-          [--ahz <freq>+sh              |v3|     0.00|     0.00|     0.00|  1000|  1000|222528.00|     0.00|    2257|    2253|S    |       0|__      |Tue Oct 22 15:42:01 2024 
- +crond           |v3|     0.00|     1.00|     4.00|     0|  1000|231104.00|     0.00|    2253|     983|SF   |       0|__      |Tue Oct 22 15:42:01 2024 
-The system's default process accounting file is /var/account/pacct.+gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2259|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2261|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2263|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2265|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2267|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2269|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2271|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2273|     779|    X|       0|__      |Tue Oct 22 15:42:01 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33274.00|     0|     0|     0.00|     0.00|      26|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33274.00|     0|     0|     0.00|     0.00|      31|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33140.00|     0|     0|     0.00|     0.00|     253|       2| F   |       0|__      |Tue Oct 22 15:36:51 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33274.00|     0|     0|     0.00|     0.00|      41|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33274.00|     0|     0|     0.00|     0.00|      40|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33070.00|     0|     0|     0.00|     0.00|     451|       2| F   |       0|__      |Tue Oct 22 15:36:52 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33070.00|     0|     0|     0.00|     0.00|     452|       2| F   |       0|__      |Tue Oct 22 15:36:52 2024 
 +kworker/dying   |v3|     0.00|     1.00| 33275.00|     0|     0|     0.00|     0.00|      11|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33274.00|     0|     0|     0.00|     0.00|      25|       2| F   |       0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33256.00|     0|     0|     0.00|     0.00|      72|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33348.00|     0|     0|     0.00|     0.00|      37|       2| F         0|__      |Tue Oct 22 15:36:50 2024 
 +packagekitd     |v3|     7.00|     5.00| 30176.00|     0|     0|487808.00|     0.00|    1717|       1|S   X      0|__      |Tue Oct 22 15:37:23 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33602.00|     0|     0|     0.00|     0.00|       7|       2| F   |       0|__      |Tue Oct 22 15:36:50 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33302.00|     0|     0|     0.00|     0.00|     558|       2| F         0|__      |Tue Oct 22 15:36:53 2024 
 +kworker/dying   |v3|     0.00|     0.00| 33584.00|     0|     0|     0.00|     0.00|      70|       2| F   |       0|__      |Tue Oct 22 15:36:51 2024 
 +cat             |v3|     0.00|     0.00|     0.00|     0|     0|220928.00|     0.00|    2278|    2090|           0|pts/  |Tue Oct 22 15:42:46 2024 
 +systemd-tmpfile |v3|     0.00|     0.00|     1.00|    42|    42| 18640.00|     0.00|    2279|    1240|     |       0|__      |Tue Oct 22 15:42:54 2024 
 +systemd-tmpfile |v3|     0.00|     0.00|     1.00|  1000|  1000| 18640.00|     0.00|    2280|    1907|     |       0|__      |Tue Oct 22 15:42:54 2024 
 +unix_chkpwd     |v3|     0.00|     0.00|     0.00|     0|     0|  3908.00|     0.00|    2283|    2282|S    |       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2284|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +pwd             |v3|     0.00|     0.00|     0.00|  1000|  1000|220928.00|     0.00|    2287|    2286|           0|__      |Tue Oct 22 15:43:01 2024 
 +sh              |v3|     0.00|     0.00|     0.00|  1000|  1000|222528.00|     0.00|    2286|    2282|S    |       0|__      |Tue Oct 22 15:43:01 2024 
 +crond           |v3|     0.00|     0.00|     4.00|     0|  1000|231104.00|     0.00|    2282|     983|SF         0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2288|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2290|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2292|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2294|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2296|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2298|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2300|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024 
 +gmain           |v3|     0.00|     0.00|     0.00|   998|   996| 93248.00|     0.00|    2302|     779|    X|       0|__      |Tue Oct 22 15:43:01 2024
 </code> </code>
  
Ligne 1371: Ligne 1432:
  
 <code> <code>
-[root@centos8 ~]# lastcomm +[root@redhat9 ~]# lastcomm 
-bash              F    root     pts/     0.00 secs Sun Nov 13 09:41 +man                    root     pts/     0.00 secs Tue Oct 22 15:44 
-gdbus                X root     pts/     0.00 secs Sun Nov 13 09:41 +dump-acct              root     pts/     0.00 secs Tue Oct 22 15:44 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-awk                    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-kworker/dying        root     __         0.00 secs Sun Nov 13 09:30 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-awk                    root     __         0.00 secs Sun Nov 13 09:41 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-sleep                  root     __         0.00 secs Sun Nov 13 09:40 +crond            SF    root     __         0.00 secs Tue Oct 22 15:44 
-kworker/dying        root     __         0.00 secs Sun Nov 13 09:07 +sh                   trainee  __         0.00 secs Tue Oct 22 15:44 
-kworker/dying        root     __         0.00 secs Sun Nov 13 09:35 +pwd                    trainee  __         0.00 secs Tue Oct 22 15:44 
-kworker/dying     F    root     __         0.00 secs Sun Nov 13 09:07 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:44 
-dump-acct              root     pts/     0.00 secs Sun Nov 13 09:40 +unix_chkpwd      S     root     __         0.00 secs Tue Oct 22 15:44 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 +dump-acct              root     pts/     0.00 secs Tue Oct 22 15:43 
-awk                    root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-awk                    root     __         0.00 secs Sun Nov 13 09:40 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-sleep                  root     __         0.00 secs Sun Nov 13 09:39 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-dump-acct              root     pts/     0.00 secs Sun Nov 13 09:39 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-man                    root     pts/     0.01 secs Sun Nov 13 09:38 +crond            SF    root     __         0.00 secs Tue Oct 22 15:43 
-less                   root     pts/     0.00 secs Sun Nov 13 09:38 +sh                   trainee  __         0.00 secs Tue Oct 22 15:43 
-kworker/dying        root     __         0.00 secs Sat Nov 12 19:37 +pwd                    trainee  __         0.00 secs Tue Oct 22 15:43 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:43 
-awk                    root     __         0.00 secs Sun Nov 13 09:39 +unix_chkpwd      S     root     __         0.00 secs Tue Oct 22 15:43 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 +systemd-tmpfile        trainee  __         0.00 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 +systemd-tmpfile        gdm      __         0.00 secs Tue Oct 22 15:42 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:39 +cat                    root     pts/     0.00 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:39 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-awk                    root     __         0.00 secs Sun Nov 13 09:39 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-sleep                  root     __         0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-man                  root     pts/     0.00 secs Sun Nov 13 09:38 +packagekitd      S   root     __         0.12 secs Tue Oct 22 15:37 
-nroff                  root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-groff                  root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-grotty                 root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-troff                  root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.01 secs Tue Oct 22 15:36 
-nroff             F    root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-locale                 root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-tbl                    root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-preconv                root     pts/     0.00 secs Sun Nov 13 09:38 +kworker/dying        root     __         0.00 secs Tue Oct 22 15:36 
-man               F    root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-man                  root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-man               F    root     pts/0      0.00 secs Sun Nov 13 09:38 +kworker/dying     F    root     __         0.00 secs Tue Oct 22 15:36 
-man                  root     pts/0      0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-man               F    root     pts/0      0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-man                  root     pts/0      0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-man                  root     pts/0      0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-awk                    root     __         0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:38 +crond            SF    root     __         0.01 secs Tue Oct 22 15:42 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:38 +sh                   trainee  __         0.00 secs Tue Oct 22 15:42 
-awk                    root     __         0.00 secs Sun Nov 13 09:38 +pwd                    trainee  __         0.00 secs Tue Oct 22 15:42 
-sleep                  root     __         0.00 secs Sun Nov 13 09:37 +gmain                X polkitd  __         0.00 secs Tue Oct 22 15:42 
-dump-acct              root     pts/     0.00 secs Sun Nov 13 09:37 +unix_chkpwd      S     root     __         0.00 secs Tue Oct 22 15:42 
-kworker/dying        root     __         0.00 secs Sun Nov 13 09:05 +systemctl        S     root     pts/     0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 +less                 root     pts/     0.00 secs Tue Oct 22 15:41 
-awk                    root     __         0.00 secs Sun Nov 13 09:37 +systemctl        S     root     pts/     0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 +systemd-tty-ask  S     root     pts/     0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 +accton               root     __         0.00 secs Tue Oct 22 15:41 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:37 +accton                 root     __         0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:37 +accton-create    S     root     __         0.00 secs Tue Oct 22 15:41 
-awk                    root     __         0.00 secs Sun Nov 13 09:37 +(sd-executor)    SF    root     __         0.00 secs Tue Oct 22 15:41 
-sleep                  root     __         0.00 secs Sun Nov 13 09:36 +systemd-gpt-aut  S     root     __         0.00 secs Tue Oct 22 15:41 
-cat                    root     pts/     0.00 secs Sun Nov 13 09:36 +systemd-bless-     root     __         0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 +kdump-dep-gener      root     __         0.00 secs Tue Oct 22 15:41 
-awk                    root     __         0.00 secs Sun Nov 13 09:36 +grep                   root     __         0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 +systemd-rc-loca      root     __         0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 +kdump-dep-gener      root     __         0.00 secs Tue Oct 22 15:41 
-pgrep                  root     __         0.00 secs Sun Nov 13 09:36 +sed                    root     __         0.00 secs Tue Oct 22 15:41 
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:36 +systemd-cryptse      root     __         0.00 secs Tue Oct 22 15:41 
-awk                    root     __         0.00 secs Sun Nov 13 09:36 +ostree-system-g      root     __         0.00 secs Tue Oct 22 15:41 
-sleep                  root     __         0.00 secs Sun Nov 13 09:35 +systemd-system-  S     root     __         0.00 secs Tue Oct 22 15:41 
-kworker/dying     F    root     __         0.00 secs Sun Nov 13 09:19 +systemd-sysv-ge      root     __         0.00 secs Tue Oct 22 15:41 
-systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 +systemd-getty-g  S     root     __         0.00 secs Tue Oct 22 15:41 
-less                 root     pts/     0.00 secs Sun Nov 13 09:35 +systemd-integri      root     __         0.00 secs Tue Oct 22 15:41 
-systemd-cgroups        root     __         0.00 secs Sun Nov 13 09:35 +systemd-run-gen      root     __         0.00 secs Tue Oct 22 15:41 
-systemd-cgroups        root     __         0.00 secs Sun Nov 13 09:35 +systemd-veritys      root     __         0.00 secs Tue Oct 22 15:41 
-systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 +systemd-hiberna      root     __         0.00 secs Tue Oct 22 15:41 
-systemd-tty-ask  S     root     pts/     0.00 secs Sun Nov 13 09:35 +selinux-autorel      root     __         0.00 secs Tue Oct 22 15:41 
-accton               root     __         0.00 secs Sun Nov 13 09:35 +grep                   root     __         0.00 secs Tue Oct 22 15:41 
-accton                 root     __         0.00 secs Sun Nov 13 09:35 +podman-system-g  S   root     __         0.00 secs Tue Oct 22 15:41 
-accton-create    S     root     __         0.00 secs Sun Nov 13 09:35 +systemd-debug-g     root     __         0.00 secs Tue Oct 22 15:41 
-systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:35 +selinuxenabled         root     __         0.00 secs Tue Oct 22 15:41 
-(sd-executor)    SF    root     __         0.00 secs Sun Nov 13 09:35 +systemd-fstab-g     root     __         0.00 secs Tue Oct 22 15:41 
-systemd-gpt-aut  S     root     __         0.00 secs Sun Nov 13 09:35 +systemctl        S     root     pts/     0.00 secs Tue Oct 22 15:41 
-systemd-getty-     root     __         0.00 secs Sun Nov 13 09:35 +less                 root     pts/     0.00 secs Tue Oct 22 15:41 
-systemd-veritys      root     __         0.00 secs Sun Nov 13 09:35 +accton               root     pts/     0.00 secs Tue Oct 22 15:41
-systemd-sysv-ge  S     root     __         0.00 secs Sun Nov 13 09:35 +
-systemd-debug-     root     __         0.00 secs Sun Nov 13 09:35 +
-selinux-autorel  S     root     __         0.00 secs Sun Nov 13 09:35 +
-grep                   root     __         0.00 secs Sun Nov 13 09:35 +
-ostree-system-g  S     root     __         0.01 secs Sun Nov 13 09:35 +
-systemd-rc-loca      root     __         0.00 secs Sun Nov 13 09:35 +
-anaconda-genera      root     __         0.00 secs Sun Nov 13 09:35 +
-lvm2-activation      root     __         0.00 secs Sun Nov 13 09:35 +
-kdump-dep-gener      root     __         0.00 secs Sun Nov 13 09:35 +
-selinuxenabled         root     __         0.00 secs Sun Nov 13 09:35 +
-lvmconfig              root     __         0.00 secs Sun Nov 13 09:35 +
-grep                   root     __         0.00 secs Sun Nov 13 09:35 +
-readlink               root     __         0.00 secs Sun Nov 13 09:35 +
-systemd-fstab-g  S     root     __         0.00 secs Sun Nov 13 09:35 +
-systemd-hiberna      root     __         0.00 secs Sun Nov 13 09:35 +
-systemd-system-  S     root     __         0.00 secs Sun Nov 13 09:35 +
-systemd-cryptse      root     __         0.00 secs Sun Nov 13 09:35 +
-nfs-server-gene      root     __         0.00 secs Sun Nov 13 09:35 +
-rpc-pipefs-gene      root     __         0.00 secs Sun Nov 13 09:35 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 +
-awk                    root     __         0.00 secs Sun Nov 13 09:35 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 +
-pgrep                  root     __         0.00 secs Sun Nov 13 09:35 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:35 +
-awk                    root     __         0.00 secs Sun Nov 13 09:35 +
-sleep                  root     __         0.00 secs Sun Nov 13 09:34 +
-systemctl        S     root     pts/     0.00 secs Sun Nov 13 09:34 +
-less                 root     pts/     0.00 secs Sun Nov 13 09:34 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 +
-awk                    root     __         0.00 secs Sun Nov 13 09:34 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 +
-pgrep                  root     __         0.00 secs Sun Nov 13 09:34 +
-ksmtuned          F    root     __         0.00 secs Sun Nov 13 09:34 +
-awk                    root     __         0.00 secs Sun Nov 13 09:34 +
-sleep                  root     __         0.00 secs Sun Nov 13 09:33 +
-accton               root     pts/     0.00 secs Sun Nov 13 09:33 +
- +
-[root@centos8 ~]# lastcomm grep +
-grep                   root     pts/     0.00 secs Sun Nov 13 09:46 +
-grep                   root     pts/     0.00 secs Sun Nov 13 09:45 +
-grep                   root     __         0.00 secs Sun Nov 13 09:35 +
-grep                   root     __         0.00 secs Sun Nov 13 09:35 +
-</code> +
- +
-===Options de la commande=== +
- +
-Les options de cette commande sont : +
- +
-<code> +
-[root@centos8 ~]# lastcomm --help +
-Usage: lastcomm [-hpV] [-f file] [command] ... [user] ... [terminal] ... +
-       [--forwards] [--file <file>] [--strict-match] [--print-controls] +
-       [--user <name>] [--tty <name>] [--command <name>] [--debug] +
-       [--show-paging] [--pid] [--ahz <freq>] [--version] [--help]+
  
-The system's default process accounting file is /var/account/pacct.+[root@redhat9 ~]# lastcomm grep 
 +grep                   root     __         0.00 secs Tue Oct 22 15:41 
 +grep                   root     __         0.00 secs Tue Oct 22 15:41
 </code> </code>
  
Ligne 1530: Ligne 1537:
  
 <code> <code>
-[root@centos8 ~]# sa -u | egrep "root" +[root@redhat9 ~]# sa -u | egrep "root" 
-root       0.00 cpu     1090k mem      0 io accton           +root       0.00 cpu      658k mem      0 io accton           
-root       0.00 cpu     1827k mem      0 io sleep            +root       0.00 cpu    55328k mem      0 io less             
-root       0.00 cpu     6378k mem      0 io awk              +root       0.00 cpu    59200k mem      0 io systemctl        
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu     4560k mem      0 io systemd-fstab-g  
-root       0.00 cpu    11276k mem      0 io pgrep            +root       0.00 cpu      859k mem      0 io selinuxenabled   
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu     4550k mem      0 io systemd-debug-g  
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +root       0.00 cpu   366848k mem      0 io podman-system-g  
-root       0.00 cpu     6344k mem      0 io awk              +root       0.00 cpu    55456k mem      0 io grep             
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu    55632k mem      0 io selinux-autorel  
-root       0.00 cpu     2426k mem      0 io less             +root       0.00 cpu     4548k mem      0 io systemd-hiberna  
-root       0.00 cpu    23376k mem      0 io systemctl        +root       0.00 cpu     4556k mem      0 io systemd-veritys  
-root       0.00 cpu     1827k mem      0 io sleep            +root       0.00 cpu     4550k mem      0 io systemd-run-gen  
-root       0.00 cpu     6378k mem      0 io awk              +root       0.00 cpu     4552k mem      0 io systemd-integri  
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu     4550k mem      0 io systemd-getty-g  
-root       0.00 cpu    11276k mem      0 io pgrep            +root       0.00 cpu     4556k mem      0 io systemd-sysv-ge  
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu     4548k mem      0 io systemd-system-  
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +root       0.00 cpu     6932k mem      0 io ostree-system-g  
-root       0.00 cpu     6344k mem      0 io awk              +root       0.00 cpu     4556k mem      0 io systemd-cryptse  
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +root       0.00 cpu    55488k mem      0 io sed              
-root       0.00 cpu     9688k mem      0 io rpc-pipefs-gene  +root       0.00 cpu    55792k mem      0 io kdump-dep-gener * 
-root       0.00 cpu     9720k mem      0 io nfs-server-gene  +root       0.00 cpu     4550k mem      0 io systemd-rc-loca  
-root       0.00 cpu    22592k mem      0 io systemd-cryptse  +root       0.00 cpu    55424k mem      0 io grep             
-root       0.00 cpu    22592k mem      0 io systemd-system-  +root       0.00 cpu    55792k mem      0 io kdump-dep-gener  
-root       0.00 cpu    22592k mem      0 io systemd-hiberna  +root       0.00 cpu     4550k mem      0 io systemd-bless- 
-root       0.00 cpu    22592k mem      0 io systemd-fstab-g  +root       0.00 cpu     4552k mem      0 io systemd-gpt-aut  
-root       0.00 cpu     1098k mem      0 io readlink         +root       0.00 cpu    43520k mem      0 io (sd-executor)   * 
-root       0.00 cpu     2302k mem      0 io grep             +root       0.00 cpu    55632k mem      0 io accton-create   
-root       0.00 cpu    16260k mem      0 io lvmconfig        +
-root       0.00 cpu     3350k mem      0 io selinuxenabled   +
-root       0.00 cpu     5862k mem      0 io kdump-dep-gener  +
-root       0.00 cpu     8406k mem      0 io lvm2-activation  +
-root       0.00 cpu     5764k mem      0 io anaconda-genera  +
-root       0.00 cpu    22592k mem      0 io systemd-rc-loca  +
-root       0.01 cpu    38192k mem      0 io ostree-system-g  +
-root       0.00 cpu     2302k mem      0 io grep             +
-root       0.00 cpu     5764k mem      0 io selinux-autorel  +
-root       0.00 cpu    22592k mem      0 io systemd-debug- +
-root       0.00 cpu    22592k mem      0 io systemd-sysv-ge  +
-root       0.00 cpu    22592k mem      0 io systemd-veritys  +
-root       0.00 cpu    22592k mem      0 io systemd-getty-g  +
-root       0.00 cpu    22592k mem      0 io systemd-gpt-aut  +
-root       0.00 cpu    63728k mem      0 io (sd-executor)   * +
-root       0.00 cpu    23632k mem      0 io systemctl        +
-root       0.00 cpu     6496k mem      0 io accton-create   +
 root       0.00 cpu        0k mem      0 io accton           root       0.00 cpu        0k mem      0 io accton          
-root       0.00 cpu     1090k mem      0 io accton           +root       0.00 cpu      658k mem      0 io accton           
-root       0.00 cpu    22592k mem      0 io systemd-tty-ask  +root       0.00 cpu     4556k mem      0 io systemd-tty-ask  
-root       0.00 cpu    23376k mem      0 io systemctl        +root       0.00 cpu    59424k mem      0 io systemctl        
-root       0.00 cpu    22592k mem      0 io systemd-cgroups  +root       0.00 cpu    55328k mem      0 io less             
-root       0.00 cpu    22592k mem      0 io systemd-cgroups  +root       0.00 cpu    59200k mem      0 io systemctl        
-root       0.00 cpu     2426k mem      0 io less             +root       0.00 cpu      977k mem      0 io unix_chkpwd      
-root       0.00 cpu    23376k mem      0 io systemctl       +root       0.01 cpu    57776k mem      0 io crond           *
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     1828k mem      0 io cat              
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     1994k mem      0 io dump-acct        
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     4582k mem      0 io man             * 
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     4844k mem      0 io man             * 
-root       0.00 cpu     4186k mem      0 io preconv          
-root       0.00 cpu     3476k mem      0 io tbl              
-root       0.00 cpu     1831k mem      0 io locale           
-root       0.00 cpu     3182k mem      0 io nroff           * 
-root       0.00 cpu     4186k mem      0 io troff            
-root       0.00 cpu     3674k mem      0 io grotty           
-root       0.00 cpu     3496k mem      0 io groff            
-root       0.00 cpu     3182k mem      0 io nroff            
-root       0.00 cpu     4804k mem      0 io man             * 
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     2426k mem      0 io less             
-root       0.01 cpu     4770k mem      0 io man              
-root       0.00 cpu     1994k mem      0 io dump-acct        
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     2094k mem      0 io dump-acct        
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     6344k mem      0 io awk              +root       0.01 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     6658k mem      0 io ksmtuned        +
-root       0.00 cpu    93648k mem      0 io gdbus            +
-root       0.00 cpu     6888k mem      0 io bash            * +
-root       0.00 cpu     5410k mem      0 io lastcomm         +
-root       0.00 cpu     1827k mem      0 io sleep            +
-root       0.00 cpu     6378k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu    11276k mem      0 io pgrep            +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +
-root       0.00 cpu     6344k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     4570k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4844k mem      0 io man             * +
-root       0.00 cpu     4186k mem      0 io preconv          +
-root       0.00 cpu     3476k mem      0 io tbl              +
-root       0.00 cpu     1831k mem      0 io locale           +
-root       0.00 cpu     3182k mem      0 io nroff           * +
-root       0.00 cpu     4186k mem      0 io troff            +
-root       0.00 cpu     3706k mem      0 io grotty           +
-root       0.00 cpu     3496k mem      0 io groff            +
-root       0.00 cpu     3182k mem      0 io nroff            +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     1827k mem      0 io sleep            +
-root       0.00 cpu     6378k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu    11276k mem      0 io pgrep            +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +
-root       0.00 cpu     6344k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     2426k mem      0 io less             +
-root       0.00 cpu     4770k mem      0 io man              +
-root       0.00 cpu     4604k mem      0 io man             * +
-root       0.00 cpu     4760k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     4844k mem      0 io man             * +
-root       0.00 cpu     4186k mem      0 io preconv          +
-root       0.00 cpu     3476k mem      0 io tbl              +
-root       0.00 cpu     1831k mem      0 io locale           +
-root       0.00 cpu     3182k mem      0 io nroff           * +
-root       0.00 cpu     4186k mem      0 io troff            +
-root       0.00 cpu     3700k mem      0 io grotty           +
-root       0.00 cpu     3496k mem      0 io groff            +
-root       0.00 cpu     3182k mem      0 io nroff            +
-root       0.00 cpu     4804k mem      0 io man             * +
-root       0.00 cpu     1827k mem      0 io sleep            +
-root       0.00 cpu     6378k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu    11276k mem      0 io pgrep            +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +
-root       0.00 cpu     6344k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     1827k mem      0 io sleep            +
-root       0.00 cpu     6378k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu    11276k mem      0 io pgrep            +
-root       0.00 cpu     6658k mem      0 io ksmtuned        * +
-root       0.00 cpu     6528k mem      0 io ksmtuned        * +
-root       0.00 cpu     6344k mem      0 io awk              +
-root       0.00 cpu     6658k mem      0 io ksmtuned        *+
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-root       0.00 cpu     2426k mem      0 io less             
-root       0.00 cpu     4770k mem      0 io man              
-root       0.00 cpu     5312k mem      0 io sa               
-root       0.00 cpu     3034k mem      0 io grep             
-root       0.00 cpu     5312k mem      0 io sa               
-root       0.00 cpu     1827k mem      0 io sleep            
-root       0.00 cpu     6378k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu    11276k mem      0 io pgrep            
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
-root       0.00 cpu     6528k mem      0 io ksmtuned        * 
-root       0.00 cpu     6344k mem      0 io awk              
-root       0.00 cpu     6658k mem      0 io ksmtuned        * 
 root       0.00 cpu        0k mem      0 io kworker/dying   * root       0.00 cpu        0k mem      0 io kworker/dying   *
-</code> +root       0.00 cpu        0k mem      0 io kworker/dying   * 
- +root       0.12 cpu   121952k mem      0 io packagekitd      
-===Options de la commande=== +root       0.00 cpu        0k mem      0 io kworker/dying   * 
- +root       0.00 cpu        0k mem      0 io kworker/dying   * 
-Les options de cette commande sont : +root       0.00 cpu        0k mem      0 io kworker/dying   * 
- +root       0.00 cpu    55232k mem      0 io cat              
-<code> +root       0.00 cpu      977k mem      0 io unix_chkpwd      
-[root@centos8 ~]# sa --help +root       0.00 cpu    57776k mem      0 io crond           * 
- +root       0.00 cpu      759k mem      0 io dump-acct        
-                Usage: sa [ options ] [ file ] +root       0.00 cpu      977k mem      0 io unix_chkpwd      
-                 +root       0.00 cpu    57776k mem      0 io crond           * 
-                options: [-abcdfiljkmnprstuDKP] [-v <num>] [--version] [--help] +root       0.00 cpu      660k mem      0 io dump-acct        
-                [--other-acct-file <name>] [--other-usracct-file <name>] +root       0.00 cpu    55552k mem      0 io man              
-                [--print-seconds] [--dont-read-summary-files] [--debug] +root       0.00 cpu      760k mem      0 io lastcomm         
-                 [--separate-times] [--other-savacct-file <name>] [--percentages] +root       0.00 cpu      977k mem      0 io unix_chkpwd      
-                 [--print-ratio] [--print-users] [--merge] [--user-summary] [--group-summary] +root       0.00 cpu    57776k mem      0 io crond           * 
-                [--list-all-names] [--not-interactive] [--threshold <num>] +root       0.00 cpu      760k mem      0 io lastcomm         
-                 [--sort-ksec] [--sort-tio] [--sort-sys-user-div-calls] [--sort-avio] +root       0.00 cpu      977k mem      0 io unix_chkpwd      
-                 [--sort-cpu-avmem] [--sort-num-calls] [--sort-real-time] [--ahz hz] +root       0.01 cpu    57776k mem      0 io crond           * 
-       [--show-paging] [--show-paging-avg] +root       0.00 cpu      661k mem      0 io lastcomm        
- +
-The system's default process accounting files are: +
- +
-  raw process accounting data: /var/account/pacct +
-      summary by command name: /var/account/savacct +
-          summary by username: /var/account/usracct+
 </code> </code>
  
Ligne 1778: Ligne 1610:
  
 <code> <code>
-[root@centos8 ~]# ac -p +[root@redhat9 ~]# ac -p 
-        trainee                            247.51 +        trainee                             20.30 
-        total      247.51+        total       20.30
  
-[root@centos8 ~]# ac -d +[root@redhat9 ~]# ac -d 
-Jun 16  total        6.41 +Oct 19  total       11.06 
-Jun 17  total       12.09 +Sep 25  total        1.49 
-Jul 19  total        6.94 +Sep 30  total        0.04 
-Jul 20  total       38.95 +Oct 21  total        6.08 
-Sep   total        0.03 +Today   total        1.63
-Sep   total        0.01 +
-Sep  5  total       11.01 +
-Oct   total        0.92 +
-Oct 11  total        4.17 +
-Oct 12  total        5.45 +
-Nov  7  total       19.40 +
-Nov  8  total       54.12 +
-Nov  9  total       67.32 +
-Nov 10  total        8.48 +
-Nov 11  total        3.01 +
-Today   total        9.23+
 </code> </code>
  
Ligne 1806: Ligne 1627:
  
 <code> <code>
-[root@centos8 ~]# ac --help+[root@redhat9 ~]# ac --help
  
 Usage: ac [OPTION] ... Usage: ac [OPTION] ...
Ligne 1831: Ligne 1652:
 </code> </code>
  
-=====LAB #2 - La commande sysctl=====+=====LAB #2 - Réglage de la performance du système=====
  
-====2.1 - Répertoire /proc====+====2.1 - Présentation==== 
 + 
 +Le daemon **tuned** permet de régler la performance du système en fonction de profils contenant des paramètres de configuration du noyau pré-définis. Lors de l'installation de RedHat 9, le daemon n'est ni activé, ni démarré : 
 + 
 +<code> 
 +[root@redhat9 ~]# systemctl status tuned 
 +○ tuned.service - Dynamic System Tuning Daemon 
 +     Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; preset: enabled) 
 +     Active: inactive (dead) 
 +       Docs: man:tuned(8) 
 +             man:tuned.conf(5) 
 +             man:tuned-adm(8) 
 +</code> 
 + 
 +Le daemon peut être configuré pour modifier d'une manière dynamique les paramètres du noyau en fonction de la charge du système, en commencant avec les valeurs incluent dans le profil actif. Pour faire ceci, le daemon utilise des modules plug-ins **monitor** et des modules plug-ins **tuning**. Les plug-ins **monitor** analysent le système et fournissent les informations recoltées aux plug-ins **tuning** qui les utilisent pour appliquer des modifications dynamiques. 
 + 
 +Les plugs-in **monitor** sont : 
 + 
 +  * **disk** - surveille le nombre d'opération en E/S de chaque disque, 
 +  * **net** - surveille le nombre de paquets transmis par chaque interface réseau, 
 +  * **load** - surveille la charge de chaque CPU. 
 + 
 +Les plug-ins **tuning** corréspondants sont : 
 + 
 +  * **disk** - définit différents paramètres de disque, par exemple le planificateur de disque ou la gestion avancée de l'énergie, 
 +  * **net** - configure la vitesse de l'interface et la fonctionnalité Wake-on-LAN (WoL), 
 +  * **cpu** - définit différents paramètres des CPU par exemple le CPU governor ou la latence. 
 + 
 +====2.2 - Le fichier /etc/tuned/tuned-main.conf==== 
 + 
 +Pour activer le mode dynamique, modifiez la valeur de la directive **dynamic_tuning** dans le fichier **/etc/tuned/tuned-main.conf** : 
 + 
 +<code> 
 +[root@redhat9 ~]# vi /etc/tuned/tuned-main.conf 
 + 
 +[root@redhat9 ~]# cat /etc/tuned/tuned-main.conf 
 +# Global tuned configuration file. 
 + 
 +# Whether to use daemon. Without daemon it just applies tuning. It is 
 +# not recommended, because many functions don't work without daemon, 
 +# e.g. there will be no D-Bus, no rollback of settings, no hotplug, 
 +# no dynamic tuning, ... 
 +daemon = 1 
 + 
 +# Dynamicaly tune devices, if disabled only static tuning will be used. 
 +dynamic_tuning = 1 
 + 
 +# How long to sleep before checking for events (in seconds) 
 +# higher number means lower overhead but longer response time. 
 +sleep_interval = 1 
 + 
 +# Update interval for dynamic tunings (in seconds). 
 +# It must be multiply of the sleep_interval. 
 +update_interval = 10 
 + 
 +# Recommend functionality, if disabled "recommend" command will be not 
 +# available in CLI, daemon will not parse recommend.conf but will return 
 +# one hardcoded profile (by default "balanced"). 
 +recommend_command = 1 
 + 
 +# Whether to reapply sysctl from /run/sysctl.d/, /etc/sysctl.d/ and 
 +# /etc/sysctl.conf.  If enabled, these sysctls will be re-appliead 
 +# after TuneD sysctls are applied, i.e. TuneD sysctls will not 
 +# override user-provided system sysctls. 
 +reapply_sysctl = 1 
 + 
 +# Default priority assigned to instances 
 +default_instance_priority = 0 
 + 
 +# Udev buffer size 
 +udev_buffer_size = 1MB 
 + 
 +# Log file count 
 +log_file_count = 2 
 + 
 +# Log file max size 
 +log_file_max_size = 1MB 
 + 
 +# Preset system uname string for architecture specific tuning. 
 +# It can be used to force tuning for specific architecture. 
 +# If commented, "uname" will be called to fill its content. 
 +# uname_string = x86_64 
 + 
 +# Preset system cpuinfo string for architecture specific tuning. 
 +# It can be used to force tuning for specific architecture. 
 +# If commented, "/proc/cpuinfo" will be read to fill its content. 
 +# cpuinfo_string = Intel 
 + 
 +# Enable TuneD listening on dbus 
 +# enable_dbus = 1 
 + 
 +# Enable TuneD listening on unix domain socket 
 +# As this functionality is not used commonly, we disable it by default 
 +# and it is needed to allow it manually 
 +# enable_unix_socket = 0 
 + 
 +# Path to socket for TuneD to listen 
 +# Existing files on given path will be removed 
 +# unix_socket_path = /run/tuned/tuned.sock 
 + 
 +# Paths to sockets for TuneD to send signals to separated by , or ; 
 +# unix_socket_signal_paths = 
 + 
 +# Default unix socket ownership 
 +# Can be set as id or name, -1 or non-existing name leaves unchanged 
 +# unix_socket_ownership = -1 -1 
 + 
 +# Permissions for listening sockets 
 +# unix_socket_permissions = 0o600 
 + 
 +# Size of connections backlog for listen function on socket 
 +# Higher value allows to process requests from more clients 
 +# connections_backlog = 1024 
 + 
 +# TuneD daemon rollback strategy. Supported values: auto|not_on_exit 
 +# - auto: rollbacks are always performed on a profile switch or  
 +#   graceful TuneD process exit 
 +# - not_on_exit: rollbacks are always performed on a profile 
 +#   switch, but not on any kind of TuneD process exit 
 +# rollback = auto 
 +</code> 
 + 
 +Activez et démarrez le daemon **tuned** : 
 + 
 +<code> 
 +[root@redhat9 ~]# systemctl enable --now tuned 
 + 
 +[root@redhat9 ~]# systemctl status tuned 
 +● tuned.service - Dynamic System Tuning Daemon 
 +     Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; preset: enabled) 
 +     Active: active (running) since Tue 2024-10-22 16:13:46 CEST; 4s ago 
 +       Docs: man:tuned(8) 
 +             man:tuned.conf(5) 
 +             man:tuned-adm(8) 
 +   Main PID: 3060 (tuned) 
 +      Tasks: 4 (limit: 48800) 
 +     Memory: 16.4M 
 +        CPU: 411ms 
 +     CGroup: /system.slice/tuned.service 
 +             └─3060 /usr/bin/python3 -Es /usr/sbin/tuned -l -P 
 + 
 +Oct 22 16:13:45 redhat9.ittraining.loc systemd[1]: Starting Dynamic System Tuning Daemon... 
 +Oct 22 16:13:46 redhat9.ittraining.loc systemd[1]: Started Dynamic System Tuning Daemon. 
 +</code> 
 + 
 +====2.3 - Profils==== 
 + 
 +Les profils sont stocké dans le répertoire **ls /usr/lib/tuned** : 
 + 
 +<code> 
 +[root@redhat9 ~]# ls /usr/lib/tuned 
 +accelerator-performance  balanced  functions    intel-sst            network-latency     optimize-serial-console  recommend.d             virtual-guest 
 +aws                      desktop   hpc-compute  latency-performance  network-throughput  powersave                throughput-performance  virtual-host 
 +</code> 
 + 
 +Consultez le fichier **/usr/lib/tuned/throughput-performance/tuned.conf** : 
 + 
 +<code> 
 +[root@redhat9 ~]# cat /usr/lib/tuned/throughput-performance/tuned.conf 
 +
 +# tuned configuration 
 +
 + 
 +[main] 
 +summary=Broadly applicable tuning that provides excellent performance across a variety of common server workloads 
 + 
 +[variables] 
 +thunderx_cpuinfo_regex=CPU part\s+:\s+(0x0?516)|(0x0?af)|(0x0?a[0-3])|(0x0?b8)\b 
 +amd_cpuinfo_regex=model name\s+:.*\bAMD\b 
 + 
 +[cpu] 
 +governor=performance 
 +energy_perf_bias=performance 
 +min_perf_pct=100 
 +energy_performance_preference=performance 
 + 
 +[acpi] 
 +platform_profile=performance 
 + 
 +# Marvell ThunderX 
 +[vm.thunderx] 
 +type=vm 
 +uname_regex=aarch64 
 +cpuinfo_regex=${thunderx_cpuinfo_regex} 
 +transparent_hugepages=never 
 + 
 +[disk] 
 +# The default unit for readahead is KiB.  This can be adjusted to sectors 
 +# by specifying the relevant suffix, eg. (readahead => 8192 s). There must 
 +# be at least one space between the number and suffix (if suffix is specified). 
 +readahead=>4096 
 + 
 +[sysctl] 
 +# If a workload mostly uses anonymous memory and it hits this limit, the entire 
 +# working set is buffered for I/O, and any more write buffering would require 
 +# swapping, so it's time to throttle writes until I/O can catch up.  Workloads 
 +# that mostly use file mappings may be able to use even higher values. 
 +
 +# The generator of dirty data starts writeback at this percentage (system default 
 +# is 20%) 
 +vm.dirty_ratio = 40 
 + 
 +# Start background writeback (via writeback threads) at this percentage (system 
 +# default is 10%) 
 +vm.dirty_background_ratio = 10 
 + 
 +# PID allocation wrap value.  When the kernel's next PID value 
 +# reaches this value, it wraps back to a minimum PID value. 
 +# PIDs of value pid_max or larger are not allocated. 
 +
 +# A suggested value for pid_max is 1024 * <# of cpu cores/threads in system> 
 +# e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus, 
 +# 65536, for 4096 cpus, 4194304 (which is the upper limit possible). 
 +#kernel.pid_max = 65536 
 + 
 +# The swappiness parameter controls the tendency of the kernel to move 
 +# processes out of physical memory and onto the swap disk. 
 +# 0 tells the kernel to avoid swapping processes out of physical memory 
 +# for as long as possible 
 +# 100 tells the kernel to aggressively swap processes out of physical memory 
 +# and move them to swap cache 
 +vm.swappiness=10 
 + 
 +# The default kernel value 128 was over twenty years old default, 
 +# kernel-5.4 increased it to 4096, thus do not have it lower than 2048 
 +# on older kernels 
 +net.core.somaxconn=>2048 
 + 
 +# Marvell ThunderX 
 +[sysctl.thunderx] 
 +type=sysctl 
 +uname_regex=aarch64 
 +cpuinfo_regex=${thunderx_cpuinfo_regex} 
 +kernel.numa_balancing=0 
 +</code> 
 + 
 +Pour consulter le profil actif, utilisez la commande suivante : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm active 
 +Current active profile: virtual-guest 
 +</code> 
 + 
 +Ce profil est choisit par le système en fonction de la sortie de la sous-commande **recommend** de la commande **tuned-adm** : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm recommend 
 +virtual-guest 
 +</code> 
 + 
 +La sous-commande **list** de la commande **tuned-adm** permet de consulter les profils disponibles : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm list 
 +Available profiles: 
 +- accelerator-performance     - Throughput performance based tuning with disabled higher latency STOP states 
 +- aws                         - Optimize for aws ec2 instances 
 +- balanced                    - General non-specialized tuned profile 
 +- desktop                     - Optimize for the desktop use-case 
 +- hpc-compute                 - Optimize for HPC compute workloads 
 +- intel-sst                   - Configure for Intel Speed Select Base Frequency 
 +- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption 
 +- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance 
 +- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks 
 +- optimize-serial-console     - Optimize for serial console use. 
 +- powersave                   - Optimize for low power consumption 
 +- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads 
 +- virtual-guest               - Optimize for running inside a virtual guest 
 +- virtual-host                - Optimize for running KVM guests 
 +Current active profile: virtual-guest 
 +</code> 
 + 
 +Les profiles fournit avec RedHat 9 sont les suivants : 
 + 
 +^ Profile ^ Description ^ 
 +| accelerator-performance | Il s'agit d'un réglage identique au throughput-performance, qui réduit également la latence à moins de 100 μs. | 
 +| aws | Optimiser pour les instances aws ec2 | 
 +| balanced | Idéal pour les systèmes qui nécessitent un compromis entre économie d'énergie et performance. | 
 +| desktop | Dérivé du profil balanced. Permet une réponse plus rapide des applications interactives. | 
 +| hpc-compute | Dérivé du profil latency-performance. Idéal pour l'informatique de haute performance. | 
 +| intel-sst | Optimisé pour les systèmes dotés de configurations Intel Speed Select Technology. A utiliser en superposition à d'autres profils. | 
 +| latency-performance | Idéal pour les systèmes de serveurs qui nécessitent une faible latence au détriment de la consommation d'énergie. | 
 +| network-latency | Dérivé du profil latency-performance. Permet d'activer des paramètres supplémentaires de réglage du réseau afin d'obtenir une faible latence du réseau. | 
 +| network-throughput | Dérivé du profil throughput-performance. Des paramètres supplémentaires de réglage du réseau sont appliqués pour obtenir un débit maximal. | 
 +| optimize-serial-console | Augmente la réactivité de la console série. A utiliser en superposition à d'autres profils. | 
 +| powersave | Permet de régler le système pour une économie d'énergie maximale. | 
 +| throughput-performance | Permet de régler le système pour obtenir un débit maximal. | 
 +| virtual-guest | Permet d'optimiser les performances du système s'il fonctionne sur une machine virtuelle. | 
 +| virtual-host | Permet de régler le système pour qu'il soit le plus performant possible s'il sert d'hôte à des machines virtuelles. | 
 + 
 +Modifiez le profil actif à **throughput-performance** : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm profile throughput-performance 
 + 
 +[root@redhat9 ~]# tuned-adm active 
 +Current active profile: throughput-performance 
 +</code> 
 + 
 +Verifiez la valeur de **vm.spappiness** : 
 + 
 +<code> 
 +[root@redhat9 ~]# sysctl vm.swappiness 
 +vm.swappiness = 10 
 +</code> 
 + 
 +Pour désactiver l'optimisation de la performance, utilisez la sous-commande **off** de la commande **tuned-adm** : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm off 
 + 
 +[root@redhat9 ~]# tuned-adm active 
 +No current active profile. 
 +</code> 
 + 
 +Cette commande n'arrête pas le daemon **tuned** : 
 + 
 +<code> 
 +[root@redhat9 ~]# systemctl status tuned 
 +● tuned.service - Dynamic System Tuning Daemon 
 +     Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; preset: enabled) 
 +     Active: active (running) since Tue 2024-10-22 16:13:46 CEST; 1h 7min ago 
 +       Docs: man:tuned(8) 
 +             man:tuned.conf(5) 
 +             man:tuned-adm(8) 
 +   Main PID: 3060 (tuned) 
 +      Tasks: 2 (limit: 48800) 
 +     Memory: 17.0M 
 +        CPU: 2.028s 
 +     CGroup: /system.slice/tuned.service 
 +             └─3060 /usr/bin/python3 -Es /usr/sbin/tuned -l -P 
 + 
 +Oct 22 16:13:45 redhat9.ittraining.loc systemd[1]: Starting Dynamic System Tuning Daemon... 
 +Oct 22 16:13:46 redhat9.ittraining.loc systemd[1]: Started Dynamic System Tuning Daemon. 
 +</code> 
 + 
 +Notez que la valeur de **vm.spappiness** a été modifiée : 
 + 
 +<code> 
 +[root@redhat9 ~]# sysctl vm.swappiness 
 +vm.swappiness = 60 
 +</code> 
 + 
 +Pour activer l'optimisation de la performance de nouveau, utilisez la sous commande **profile** de la commande **tuned-adm** avec le profil voulu : 
 + 
 +<code> 
 +[root@redhat9 ~]# tuned-adm profile throughput-performance 
 + 
 +[root@redhat9 ~]# tuned-adm active 
 +Current active profile: throughput-performance 
 +<code> 
 + 
 +Dernièrement, arrêtez le daemon **tuned** : 
 + 
 +<code> 
 +[root@redhat9 ~]# systemctl disable --now tuned 
 +Removed "/etc/systemd/system/multi-user.target.wants/tuned.service"
 + 
 +[root@redhat9 ~]# systemctl status tuned 
 +○ tuned.service - Dynamic System Tuning Daemon 
 +     Loaded: loaded (/usr/lib/systemd/system/tuned.service; disabled; preset: enabled) 
 +     Active: inactive (dead) since Tue 2024-10-22 17:29:32 CEST; 10s ago 
 +   Duration: 1h 15min 46.019s 
 +       Docs: man:tuned(8) 
 +             man:tuned.conf(5) 
 +             man:tuned-adm(8) 
 +    Process: 3060 ExecStart=/usr/sbin/tuned -l -P (code=exited, status=0/SUCCESS) 
 +   Main PID: 3060 (code=exited, status=0/SUCCESS) 
 +        CPU: 2.233s 
 + 
 +Oct 22 16:13:45 redhat9.ittraining.loc systemd[1]: Starting Dynamic System Tuning Daemon... 
 +Oct 22 16:13:46 redhat9.ittraining.loc systemd[1]: Started Dynamic System Tuning Daemon. 
 +Oct 22 17:29:32 redhat9.ittraining.loc systemd[1]: Stopping Dynamic System Tuning Daemon... 
 +Oct 22 17:29:32 redhat9.ittraining.loc systemd[1]: tuned.service: Deactivated successfully. 
 +Oct 22 17:29:32 redhat9.ittraining.loc systemd[1]: Stopped Dynamic System Tuning Daemon. 
 +Oct 22 17:29:32 redhat9.ittraining.loc systemd[1]: tuned.service: Consumed 2.233s CPU time. 
 +</code> 
 + 
 +=====LAB #3 - La commande sysctl===== 
 + 
 +====3.1 - Répertoire /proc====
  
 Le répertoire /proc contient des fichiers et des répertoires virtuels. Le contenu de ces fichiers est créé dynamiquement lors de la consultation. Seul root peut consulter la totalité des informations dans le répertoire /proc. Le répertoire /proc contient des fichiers et des répertoires virtuels. Le contenu de ces fichiers est créé dynamiquement lors de la consultation. Seul root peut consulter la totalité des informations dans le répertoire /proc.
  
 <code> <code>
-[root@centos8 ~]# ls /proc +[root@redhat9 ~]# ls /proc 
-     16391  19    2212  2427  2622  431   59    84    999          mdstat +    14    1665  1749  1766  2060  2841  412  437  45   53   565  640    743    77112  77902  78649  788    906         buddyinfo  dynamic_debug  keys         modules       stat           vmstat 
-10     16476  1931  2215  2428  2659  432       842   acpi         meminfo +10    15    1671  1752  1767  2081  29    413  438  454  530  566  655    74421  772    78     78658  78858  93          bus        execdomains    key-users    mounts        swaps          zoneinfo 
-1007   16534  1956  2222  2431  2667  433   60    8465  buddyinfo    misc +1036  16    1678  1753  18    21    3     415  439  46   537  567  69     749    773    78005  78666  789    94          cgroups    fb             kmsg         mtrr          sys 
-11     16576  1960  2226  2432  2686  434   61    866   bus          modules +12    1626  1694  1754  1887  22    30    42   44   47   54   568  71040  75     774    781    78668  79     965         cmdline    filesystems    kpagecgroup  net           sysrq-trigger 
-11805  16593  2     2230  2435  27    435   63    867   cgroups      mounts +1240  1628  1695  1755  2     23    32    43   440  48   55   569  736    751    77563  78139  78671  8      977         consoles   fs             kpagecount   pagetypeinfo  sysvipc 
-12     16598  20    2237  2439  28    436   64    868   cmdline      mtrr +1266  1629  1696  1756  20    239   33    430  441  49   56   57   737    76     77578  78281  78694  816    980         cpuinfo    interrupts     kpageflags   partitions    thread-self 
-1219   16600  2007  2238  244   29    437   65    869   consoles     net +1279  1631  17    1757  2015  24    34    431  442  491  560  58   738    76099  776    78387  787    818    983         crypto     iomem          loadavg      schedstat     timer_list 
-1228   16613  2029  2241  2443  3     44    6568  87    cpuinfo      pagetypeinfo +1280  1632  1725  1758  2038  241   35    432  443  5    561  59   739    76245  777    784    78703  88     987         devices    ioports        locks        scsi          tty 
-1232   16646  203   2244  2445  31    446   66    870   crypto       partitions +1281  1633  1741  1759  2042  243   36    433  444  50   562     740    76815  77759  785    78731  883    acpi        diskstats  irq            mdstat       self          uptime 
-1234   16673  2034  2247  2449  32    45    67    871   devices      sched_debug +1282  1641  1743  1764  2053  27    38    435  445  51   563  61   741    77     778    78517  78735  903    asound      dma        kallsyms       meminfo      slabinfo      version 
-1235   16677  2037  2260  2451  33    46    674   872   diskstats    schedstat +13    1660  1747  1765  2055  28    4     436  446  52   564  63   742    77012  779    786    78760  905    bootconfig  driver     kcore          misc         softirqs      vmallocinfo
-1247   16711  2054  2262  2465  34    47    68    874   dma          scsi +
-13     16712  2062  2267  2472  35    4790  69    875   driver       self +
-1307   16729  21    2268  2473  37    49    70    878   execdomains  slabinfo +
-1339   16742  210   2274  2474  38    50    701   879   fb           softirqs +
-1356   17     2118  2275  2475  39    5076  71    880   filesystems  stat +
-14     1764   2121  2280  2476  4     51    714   884   fs           swaps +
-1441   180    2124  2287  2478  40    52    72    887   interrupts   sys +
-1443   181    2126  2292  2481  402   53    73        iomem        sysrq-trigger +
-1444   1817   2156  23    2484  41    532   74    901   ioports      sysvipc +
-1446   182    2160  2302  25    419   539   75    903   irq          thread-self +
-14977  1828   2164  2307  2536  420   55    76    9144  kallsyms     timer_list +
-15     1829   2165  2310  2539  421   568       916   kcore        tty +
-15067  183    2167  2330  2571  422   569   808   918   keys         uptime +
-1536   1845   2169  2332  2578  423   570   809   919   key-users    version +
-1553   185    2177  2349  2579  425   571   81    921   kmsg         vmallocinfo +
-15594  186    2187  2358  259   426   572   833   969   kpagecgroup  vmstat +
-15735  187    2190  2373  2593  427   573   835   986   kpagecount   zoneinfo +
-16     1880   2194  2384  26    428   574   837   989   kpageflags +
-16165  1883   22    239   2602  43    575   838   990   loadavg +
-16167  1888   2204  241   2608  430   576   839   993   locks+
 </code> </code>
  
Ligne 1877: Ligne 2058:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/cpuinfo+[root@redhat9 ~]# cat /proc/cpuinfo
 processor       : 0 processor       : 0
 vendor_id       : GenuineIntel vendor_id       : GenuineIntel
-cpu family      : 15 +cpu family      : 6 
-model           : 6 +model           : 86 
-model name      : Common KVM processor +model name      : Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz 
-stepping        : 1 +stepping        : 3 
-microcode       : 0x1 +microcode       : 0x700001c 
-cpu MHz         : 1999.987+cpu MHz         : 2099.998
 cache size      : 16384 KB cache size      : 16384 KB
 physical id     : 0 physical id     : 0
-siblings        : 4+siblings        : 2
 core id         : 0 core id         : 0
-cpu cores       : 4+cpu cores       : 2
 apicid          : 0 apicid          : 0
 initial apicid  : 0 initial apicid  : 0
 fpu             : yes fpu             : yes
 fpu_exception   : yes fpu_exception   : yes
-cpuid level     : 13+cpuid level     : 20
 wp              : yes wp              : yes
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat vnmi umip md_clear arch_capabilities 
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid shadow_vmcs pml 
-bogomips        : 3999.97+bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa mmio_stale_data 
 +bogomips        : 4199.99
 clflush size    : 64 clflush size    : 64
-cache_alignment : 128 +cache_alignment : 64 
-address sizes   : 40 bits physical, 48 bits virtual+address sizes   : 46 bits physical, 48 bits virtual
 power management: power management:
  
 processor       : 1 processor       : 1
 vendor_id       : GenuineIntel vendor_id       : GenuineIntel
-cpu family      : 15 +cpu family      : 6 
-model           : 6 +model           : 86 
-model name      : Common KVM processor +model name      : Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz 
-stepping        : 1 +stepping        : 3 
-microcode       : 0x1 +microcode       : 0x700001c 
-cpu MHz         : 1999.987+cpu MHz         : 2099.998
 cache size      : 16384 KB cache size      : 16384 KB
 physical id     : 0 physical id     : 0
-siblings        : 4+siblings        : 2
 core id         : 1 core id         : 1
-cpu cores       : 4+cpu cores       : 2
 apicid          : 1 apicid          : 1
 initial apicid  : 1 initial apicid  : 1
 fpu             : yes fpu             : yes
 fpu_exception   : yes fpu_exception   : yes
-cpuid level     : 13+cpuid level     : 20
 wp              : yes wp              : yes
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat vnmi umip md_clear arch_capabilities 
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid shadow_vmcs pml 
-bogomips        : 3999.97+bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa mmio_stale_data 
 +bogomips        : 4199.99
 clflush size    : 64 clflush size    : 64
-cache_alignment : 128 +cache_alignment : 64 
-address sizes   : 40 bits physical, 48 bits virtual+address sizes   : 46 bits physical, 48 bits virtual
 power management: power management:
  
 processor       : 2 processor       : 2
 vendor_id       : GenuineIntel vendor_id       : GenuineIntel
-cpu family      : 15 +cpu family      : 6 
-model           : 6 +model           : 86 
-model name      : Common KVM processor +model name      : Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz 
-stepping        : 1 +stepping        : 3 
-microcode       : 0x1 +microcode       : 0x700001c 
-cpu MHz         : 1999.987+cpu MHz         : 2099.998
 cache size      : 16384 KB cache size      : 16384 KB
-physical id     : 0 +physical id     : 1 
-siblings        : 4 +siblings        : 2 
-core id         : 2 +core id         : 0 
-cpu cores       : 4+cpu cores       : 2
 apicid          : 2 apicid          : 2
 initial apicid  : 2 initial apicid  : 2
 fpu             : yes fpu             : yes
 fpu_exception   : yes fpu_exception   : yes
-cpuid level     : 13+cpuid level     : 20
 wp              : yes wp              : yes
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat vnmi umip md_clear arch_capabilities 
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid shadow_vmcs pml 
-bogomips        : 3999.97+bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa mmio_stale_data 
 +bogomips        : 4199.99
 clflush size    : 64 clflush size    : 64
-cache_alignment : 128 +cache_alignment : 64 
-address sizes   : 40 bits physical, 48 bits virtual+address sizes   : 46 bits physical, 48 bits virtual
 power management: power management:
  
 processor       : 3 processor       : 3
 vendor_id       : GenuineIntel vendor_id       : GenuineIntel
-cpu family      : 15 +cpu family      : 6 
-model           : 6 +model           : 86 
-model name      : Common KVM processor +model name      : Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz 
-stepping        : 1 +stepping        : 3 
-microcode       : 0x1 +microcode       : 0x700001c 
-cpu MHz         : 1999.987+cpu MHz         : 2099.998
 cache size      : 16384 KB cache size      : 16384 KB
-physical id     : 0 +physical id     : 1 
-siblings        : 4 +siblings        : 2 
-core id         : 3 +core id         : 1 
-cpu cores       : 4+cpu cores       : 2
 apicid          : 3 apicid          : 3
 initial apicid  : 3 initial apicid  : 3
 fpu             : yes fpu             : yes
 fpu_exception   : yes fpu_exception   : yes
-cpuid level     : 13+cpuid level     : 20
 wp              : yes wp              : yes
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat vnmi umip md_clear arch_capabilities 
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid shadow_vmcs pml 
-bogomips        : 3999.97+bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa mmio_stale_data 
 +bogomips        : 4199.99
 clflush size    : 64 clflush size    : 64
-cache_alignment : 128 +cache_alignment : 64 
-address sizes   : 40 bits physical, 48 bits virtual +address sizes   : 46 bits physical, 48 bits virtual
-power management: +
- +
-processor       : 4 +
-vendor_id       : GenuineIntel +
-cpu family      : 15 +
-model           : 6 +
-model name      : Common KVM processor +
-stepping        : 1 +
-microcode       : 0x1 +
-cpu MHz         : 1999.987 +
-cache size      : 16384 KB +
-physical id     : 1 +
-siblings        : 4 +
-core id         : 0 +
-cpu cores       : 4 +
-apicid          : 4 +
-initial apicid  : 4 +
-fpu             : yes +
-fpu_exception   : yes +
-cpuid level     : 13 +
-wp              : yes +
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +
-bogomips        : 3999.97 +
-clflush size    : 64 +
-cache_alignment : 128 +
-address sizes   : 40 bits physical, 48 bits virtual +
-power management: +
- +
-processor       : 5 +
-vendor_id       : GenuineIntel +
-cpu family      : 15 +
-model           : 6 +
-model name      : Common KVM processor +
-stepping        : 1 +
-microcode       : 0x1 +
-cpu MHz         : 1999.987 +
-cache size      : 16384 KB +
-physical id     : 1 +
-siblings        : 4 +
-core id         : 1 +
-cpu cores       : 4 +
-apicid          : 5 +
-initial apicid  : 5 +
-fpu             : yes +
-fpu_exception   : yes +
-cpuid level     : 13 +
-wp              : yes +
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +
-bogomips        : 3999.97 +
-clflush size    : 64 +
-cache_alignment : 128 +
-address sizes   : 40 bits physical, 48 bits virtual +
-power management: +
- +
-processor       : 6 +
-vendor_id       : GenuineIntel +
-cpu family      : 15 +
-model           : 6 +
-model name      : Common KVM processor +
-stepping        : 1 +
-microcode       : 0x1 +
-cpu MHz         : 1999.987 +
-cache size      : 16384 KB +
-physical id     : 1 +
-siblings        : 4 +
-core id         : 2 +
-cpu cores       : 4 +
-apicid          : 6 +
-initial apicid  : 6 +
-fpu             : yes +
-fpu_exception   : yes +
-cpuid level     : 13 +
-wp              : yes +
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +
-bogomips        : 3999.97 +
-clflush size    : 64 +
-cache_alignment : 128 +
-address sizes   : 40 bits physical, 48 bits virtual +
-power management: +
- +
-processor       : 7 +
-vendor_id       : GenuineIntel +
-cpu family      : 15 +
-model           : 6 +
-model name      : Common KVM processor +
-stepping        : 1 +
-microcode       : 0x1 +
-cpu MHz         : 1999.987 +
-cache size      : 16384 KB +
-physical id     : 1 +
-siblings        : 4 +
-core id         : 3 +
-cpu cores       : 4 +
-apicid          : 7 +
-initial apicid  : 7 +
-fpu             : yes +
-fpu_exception   : yes +
-cpuid level     : 13 +
-wp              : yes +
-flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti +
-bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit +
-bogomips        : 3999.97 +
-clflush size    : 64 +
-cache_alignment : 128 +
-address sizes   : 40 bits physical, 48 bits virtual+
 power management: power management:
 </code> </code>
Ligne 2098: Ligne 2175:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/interrupts +[root@redhat9 ~]# cat /proc/interrupts 
-           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7        +           CPU0       CPU1       CPU2       CPU3        
-  0:        109          0          0          0          0                   0          0   IO-APIC   2-edge      timer +  0:         17                   0          0   IO-APIC   2-edge      timer 
-  1:                   0          0          0                   0          0          0   IO-APIC   1-edge      i8042 +  1:          9          0          0          0   IO-APIC   1-edge      i8042 
-  8:                   0          0          0                   1          0          0   IO-APIC   8-edge      rtc0 +  8:          0          1          0          0   IO-APIC   8-edge      rtc0 
-  9:                   0          0          0                   0          0          0   IO-APIC   9-fasteoi   acpi +  9:          0          0          0          0   IO-APIC   9-fasteoi   acpi 
- 10:                            0          0      47098          0          0          0   IO-APIC  10-fasteoi   virtio0 + 10:          0          0          0      38837   IO-APIC  10-fasteoi   virtio0 
- 11:          0                  31          0          0          0          0            IO-APIC  11-fasteoi   uhci_hcd:usb1 + 11:          0                  34            IO-APIC  11-fasteoi   uhci_hcd:usb1 
- 12:          0          0          0         15                   0          0          0   IO-APIC  12-edge      i8042 + 12:          0          0          0         15   IO-APIC  12-edge      i8042 
- 14:                   0          0          0                   0          0          0   IO-APIC  14-edge      ata_piix + 14:          0          0          0          0   IO-APIC  14-edge      ata_piix 
- 15:       7376          0        144          0          0          0          0      84588   IO-APIC  15-edge      ata_piix + 15:      62589       4004       7903         10   IO-APIC  15-edge      ata_piix 
- 24:          0          0          0          0          0          0          0          0   PCI-MSI 294912-edge      virtio1-config + 24:          0          0          0          0  PCI-MSIX-0000:01:01.0   0-edge      virtio2-config 
- 25:          0          0          0          0          0       5640                  16   PCI-MSI 294913-edge      virtio1-input.0 + 25:                   0          0          0  PCI-MSIX-0000:01:01.0   1-edge      virtio2-control 
- 26        36                   0       5058                   0          0          0   PCI-MSI 294914-edge      virtio1-output.0 + 26:          0          0          0          0  PCI-MSIX-0000:01:01.0   2-edge      virtio2-event 
- 27:          0      16008                9431                   0          0          0   PCI-MSI 114688-edge      ahci[0000:00:07.0] + 27:      15543                   0          0  PCI-MSIX-0000:01:01.0   3-edge      virtio2-request 
-NMI:                   0          0          0                   0          0          0   Non-maskable interrupts + 28:          0      10483                   0  PCI-MSIX-0000:01:01.0   4-edge      virtio2-request 
-LOC:     870537     771900    1117711     288839     833717     502365     758229     405110   Local timer interrupts + 29:                   0      10676           PCI-MSIX-0000:01:01.0   5-edge      virtio2-request 
-SPU:                   0          0          0                   0          0          0   Spurious interrupts + 30:          0                         9038  PCI-MSIX-0000:01:01.0   6-edge      virtio2-request 
-PMI:                   0          0          0                   0          0          0   Performance monitoring interrupts + 31:                   0          0          0  PCI-MSIX-0000:00:12.0   0-edge      virtio1-config 
-IWI:          0          0          0          0                                     0   IRQ work interrupts + 32:       1321       1262       2063        487  PCI-MSIX-0000:00:12.0   1-edge      virtio1-input.0 
-RTR:                   0          0          0                   0          0          0   APIC ICR read retries + 33:        343        545        647        440  PCI-MSIX-0000:00:12.0   2-edge      virtio1-output.0 
-RES:     178171      67749      43116      65994      71361     118585      54139      53452   Rescheduling interrupts + 34:         14         44        217          0  PCI-MSI-0000:00:07.0   0-edge      ahci[0000:00:07.0] 
-CAL:      11095      11007      10841      10343      14679       9998      12165      12443   Function call interrupts +NMI:          0          0          0          0   Non-maskable interrupts 
-TLB:       2295       2297       2000       1728       2330       2338       1991       1861   TLB shootdowns +LOC:    1738095    1765200    1948991    1946686   Local timer interrupts 
-TRM:                   0          0          0                   0          0          0   Thermal event interrupts +SPU:          0          0          0          0   Spurious interrupts 
-THR:                   0          0          0                   0          0          0   Threshold APIC interrupts +PMI:          0          0          0          0   Performance monitoring interrupts 
-DFR:                   0          0          0                   0          0          0   Deferred Error APIC interrupts +IWI:                            0          0   IRQ work interrupts 
-MCE:                   0          0          0                   0          0          0   Machine check exceptions +RTR:          0          0          0          0   APIC ICR read retries 
-MCP:        288        288        288        288        288        288        288        288   Machine check polls +RES:      67302      65493      50955      48179   Rescheduling interrupts 
-HYP:                                     0          0          0          0          0   Hypervisor callback interrupts +CAL:     614080     575676     556532     583017   Function call interrupts 
-HRE:          0          0          0          0          0          0          0          0   Hyper-V reenlightenment interrupts +TLB:      27935      27127      25742      26719   TLB shootdowns 
-HVS:          0          0          0          0          0          0          0          0   Hyper-V stimer0 interrupts+TRM:          0          0          0          0   Thermal event interrupts 
 +THR:          0          0          0          0   Threshold APIC interrupts 
 +DFR:          0          0          0          0   Deferred Error APIC interrupts 
 +MCE:          0          0          0          0   Machine check exceptions 
 +MCP:        233        233        233        233   Machine check polls 
 +HYP:                                       Hypervisor callback interrupts
 ERR:          0 ERR:          0
 MIS:          0 MIS:          0
-PIN:                   0          0          0                   0          0          0   Posted-interrupt notification event +PIN:          0          0          0          0   Posted-interrupt notification event 
-NPI:                   0          0          0                   0          0          0   Nested posted-interrupt event +NPI:          0          0          0          0   Nested posted-interrupt event 
-PIW:                   0          0          0                   0          0          0   Posted-interrupt wakeup event+PIW:          0          0          0          0   Posted-interrupt wakeup event
 </code> </code>
  
Ligne 2144: Ligne 2226:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/dma+[root@redhat9 ~]# cat /proc/dma
  4: cascade  4: cascade
 </code> </code>
Ligne 2151: Ligne 2233:
  
 <code> <code>
-root@centos8 ~]# cat /proc/ioports | more+[root@redhat9 ~]# cat /proc/ioports
 0000-0cf7 : PCI Bus 0000:00 0000-0cf7 : PCI Bus 0000:00
   0000-001f : dma1   0000-001f : dma1
Ligne 2173: Ligne 2255:
   03f6-03f6 : 0000:00:01.1   03f6-03f6 : 0000:00:01.1
     03f6-03f6 : ata_piix     03f6-03f6 : ata_piix
---More--+  0510-051b : QEMU0002:00 
 +    0510-051b : fw_cfg_io 
 +  0600-063f : 0000:00:01.3 
 +    0600-0603 : ACPI PM1a_EVT_BLK 
 +    0604-0605 : ACPI PM1a_CNT_BLK 
 +    0608-060b : ACPI PM_TMR 
 +  0700-070f : 0000:00:01.3 
 +    0700-0708 : piix4_smbus 
 +0cf8-0cff : PCI conf1 
 +0d00-ffff : PCI Bus 0000:00 
 +  afe0-afe3 : ACPI GPE0_BLK 
 +  c000-cfff : PCI Bus 0000:03 
 +  d000-dfff : PCI Bus 0000:02 
 +  e000-efff : PCI Bus 0000:01 
 +    e000-e03f : 0000:01:01.0 
 +  f000-f03f : 0000:00:03.0 
 +  f040-f05f : 0000:00:01.2 
 +    f040-f05f : uhci_hcd 
 +  f060-f07f : 0000:00:07.0 
 +    f060-f07f : ahci 
 +  f080-f09f : 0000:00:12.0 
 +  f0a0-f0af : 0000:00:01.1 
 +    f0a0-f0af : ata_piix
 </code> </code>
  
Ligne 2183: Ligne 2287:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/devices+[root@redhat9 ~]# cat /proc/devices
 Character devices: Character devices:
   1 mem   1 mem
Ligne 2195: Ligne 2299:
  10 misc  10 misc
  13 input  13 input
 + 14 sound
  21 sg  21 sg
  29 fb  29 fb
 +116 alsa
 128 ptm 128 ptm
 136 pts 136 pts
-162 raw 
 180 usb 180 usb
 188 ttyUSB 188 ttyUSB
Ligne 2206: Ligne 2311:
 203 cpu/cpuid 203 cpu/cpuid
 226 drm 226 drm
-244 aux +242 hidraw 
-245 hidraw +243 ttyDBC 
-246 usbmon +244 usbmon 
-247 bsg +245 wwan_port 
-248 watchdog +246 bsg 
-249 ptp +247 watchdog 
-250 pps +248 ptp 
-251 rtc+249 pps 
 +250 rtc 
 +251 dma_heap
 252 dax 252 dax
 253 tpm 253 tpm
Ligne 2245: Ligne 2352:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/modules | more +[root@redhat9 ~]# cat /proc/modules | more 
-xt_CHECKSUM 16384 1 - Live 0xffffffffc09a8000 +tls 159744 0 - Live 0xffffffffc0d1a000 
-ipt_MASQUERADE 16384 - Live 0xffffffffc09a3000 +snd_seq_dummy 16384 - Live 0xffffffffc0d15000 
-xt_conntrack 16384 1 - Live 0xffffffffc099e000 +snd_hrtimer 16384 1 - Live 0xffffffffc0d10000 
-ipt_REJECT 16384 Live 0xffffffffc0999000 +snd_seq 131072 7 snd_seq_dummy, Live 0xffffffffc0cef000 
-nft_compat 20480 16 - Live 0xffffffffc0993000 +snd_timer 53248 snd_hrtimer,snd_seq, Live 0xffffffffc0ce1000 
-nf_nat_tftp 16384 0 - Live 0xffffffffc098b000 +snd_seq_device 16384 1 snd_seq, Live 0xffffffffc0b6d000 
-nft_objref 16384 1 - Live 0xffffffffc0986000 +snd 147456 5 snd_seq,snd_timer,snd_seq_device, Live 0xffffffffc0cbc000 
-nf_conntrack_tftp 16384 3 nf_nat_tftp, Live 0xffffffffc0981000 +soundcore 16384 1 snd, Live 0xffffffffc0b68000 
-nft_counter 16384 33 - Live 0xffffffffc097c000 +nft_fib_inet 16384 1 - Live 0xffffffffc0b63000 
-tun 53248 Live 0xffffffffc096e000 +nft_fib_ipv4 16384 1 nft_fib_inet, Live 0xffffffffc0b5e000 
-bridge 192512 0 - Live 0xffffffffc093e000 +nft_fib_ipv6 16384 1 nft_fib_inet, Live 0xffffffffc0b59000 
-stp 16384 1 bridge, Live 0xffffffffc0939000 +nft_fib 16384 3 nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6, Live 0xffffffffc0b54000 
-llc 16384 2 bridge,stp, Live 0xffffffffc0930000 +nft_reject_inet 16384 - Live 0xffffffffc0b4f000 
-nft_fib_inet 16384 1 - Live 0xffffffffc08f5000 +nf_reject_ipv4 16384 nft_reject_inet, Live 0xffffffffc0b4a000 
-nft_fib_ipv4 16384 1 nft_fib_inet, Live 0xffffffffc08ed000 +nf_reject_ipv6 24576 1 nft_reject_inet, Live 0xffffffffc0b43000 
-nft_fib_ipv6 16384 1 nft_fib_inet, Live 0xffffffffc08e8000 +nft_reject 16384 1 nft_reject_inet, Live 0xffffffffc0b3e000 
-nft_fib 16384 3 nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6, Live 0xffffffffc08e3000 +nft_ct 24576 7 - Live 0xffffffffc0b32000 
-nft_reject_inet 16384 - Live 0xffffffffc08de000 +nft_chain_nat 16384 3 - Live 0xffffffffc0b39000 
-nf_reject_ipv4 16384 2 ipt_REJECT,nft_reject_inet, Live 0xffffffffc08d9000 +nf_nat 61440 1 nft_chain_nat, Live 0xffffffffc0b22000 
-nf_reject_ipv6 16384 1 nft_reject_inet, Live 0xffffffffc08d4000 +nf_conntrack 217088 nft_ct,nf_nat, Live 0xffffffffc0aec000 
-nft_reject 16384 1 nft_reject_inet, Live 0xffffffffc08cf000+nf_defrag_ipv6 24576 1 nf_conntrack, Live 0xffffffffc0ae5000 
 +nf_defrag_ipv4 16384 1 nf_conntrack, Live 0xffffffffc0ae0000 
 +ip_set 69632 0 - Live 0xffffffffc0ace000 
 +rfkill 40960 3 - Live 0xffffffffc0ac3000 
 +nf_tables 356352 194 nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6,nft_fib,nft_reject_inet,nft_reject,nft_ct,nft_chain_nat, Live 0xffffffffc0a6b000 
 +nfnetlink 20480 3 ip_set,nf_tables, Live 0xffffffffc0a65000 
 +qrtr 57344 4 - Live 0xffffffffc0a56000 
 +intel_rapl_msr 20480 0 - Live 0xffffffffc0a50000 
 +intel_rapl_common 45056 1 intel_rapl_msr, Live 0xffffffffc0a44000 
 +intel_uncore_frequency_common 16384 0 - Live 0xffffffffc0a3f000 
 +kvm_intel 442368 0 - Live 0xffffffffc09d2000 
 +kvm 1335296 kvm_intel, Live 0xffffffffc0b75000 
 +irqbypass 16384 1 kvm, Live 0xffffffffc09cd000 
 +rapl 28672 0 - Live 0xffffffffc09c5000 
 +i2c_piix4 32768 0 - Live 0xffffffffc09bc000 
 +pcspkr 16384 0 - Live 0xffffffffc09b7000 
 +virtio_balloon 28672 0 - Live 0xffffffffc0738000 
 +joydev 28672 0 - Live 0xffffffffc0730000 
 +xfs 2510848 2 - Live 0xffffffffc0751000 
 +libcrc32c 16384 4 nf_nat,nf_conntrack,nf_tables,xfs, Live 0xffffffffc062e000 
 +sr_mod 28672 0 - Live 0xffffffffc06c9000 
 +cdrom 90112 1 sr_mod, Live 0xffffffffc0719000 
 +ata_generic 16384 - Live 0xffffffffc0714000 
 +bochs 20480 1 - Live 0xffffffffc070e000 
 +drm_vram_helper 28672 1 bochs, Live 0xffffffffc065a000 
 +drm_kms_helper 245760 4 bochs,drm_vram_helper, Live 0xffffffffc06d1000 
 +syscopyarea 16384 1 drm_kms_helperLive 0xffffffffc06a0000 
 +sysfillrect 16384 1 drm_kms_helper, Live 0xffffffffc063b000 
 +sysimgblt 16384 1 drm_kms_helper, Live 0xffffffffc06c4000 
 +ata_piix 45056 0 - Live 0xffffffffc06b8000 
 +crct10dif_pclmul 16384 1 - Live 0xffffffffc068c000 
 +fb_sys_fops 16384 1 drm_kms_helper, Live 0xffffffffc0687000 
 +drm_ttm_helper 16384 2 bochs,drm_vram_helper, Live 0xffffffffc0662000 
 +sd_mod 90112 3 - Live 0xffffffffc0643000 
 +crc32_pclmul 16384 0 - Live 0xffffffffc0636000
 --More-- --More--
 </code> </code>
Ligne 2273: Ligne 2414:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/diskstats +[root@redhat9 ~]# cat /proc/diskstats 
-         0 sda 15481 112 1445637 154103 10272 2377 277530 890611 237219 1044714 0 0 0 0 +         0 sda 12891 22 1479190 82788 33822 7112 515452 2413166 755754 2603390 0 0 0 0 8759 107434 
-         1 sda1 402 3 66754 13349 31 18 392 4632 2824 17981 0 0 0 0 +         1 sda1 430 0 105265 1446 19 5 4262 717 0 1628 2164 0 0 0 0 0 0 
-         2 sda2 14915 109 1375516 140528 8450 2359 277138 869788 225416 1010316 0 0 0 0 +         2 sda2 12354 22 1370381 81094 33799 7107 511190 2412402 0 754752 2493497 0 0 0 0 0 0 
-        16 sdb 230 5991 36 0 0 0 0 0 110 36 0 0 0 0 +        16 sdb 105 4200 91 0 0 0 0 0 98 91 0 0 0 0 0 0 
-  11       0 sr0 10 4 2 0 0 0 0 0 9 2 0 0 0 0 +  11       0 sr0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
- 253       0 dm-0 11651 1364532 72138 12121 288727 1208138 227630 1280276 0 0 0 0 + 253       0 dm-0 12081 1360949 77456 40903 0 511190 3227414 0 756384 3304870 0 0 0 0 0 0 
- 253       1 dm-1 104 0 4440 79 0 0 0 0 0 71 79 0 0 0 0+ 253       1 dm-1 98 0 4440 33 0 0 0 0 0 36 33 0 0 0 0 0 0
 </code> </code>
  
Ligne 2286: Ligne 2427:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/partitions+[root@redhat9 ~]# cat /proc/partitions
 major minor  #blocks  name major minor  #blocks  name
  
-          0   33554432 sda+          0   52428800 sda
           1    1048576 sda1           1    1048576 sda1
-          2   32504832 sda2 +          2   51379200 sda2 
-         16    4194304 sdb+         16   33554432 sdb
   11        0    1048575 sr0   11        0    1048575 sr0
- 253        0   29143040 dm-0 + 253        0   46133248 dm-0 
- 253        1    3358720 dm-1+ 253        1    5242880 dm-1
 </code> </code>
  
Ligne 2301: Ligne 2442:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/swaps +[root@redhat9 ~]# cat /proc/swaps 
-Filename                                Type            Size    Used    Priority +Filename                                Type            Size            Used            Priority 
-/dev/dm-1                               partition       3358716       -2+/dev/dm-1                               partition       5242876                       -2
 </code> </code>
  
Ligne 2309: Ligne 2450:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/loadavg +[root@redhat9 ~]# cat /proc/loadavg 
-0.00 0.00 0.00 1/697 16936+0.00 0.00 0.00 1/517 78961
 </code> </code>
  
Ligne 2316: Ligne 2457:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/meminfo +[root@redhat9 ~]# cat /proc/meminfo 
-MemTotal:        3825032 kB +MemTotal:        7869556 kB 
-MemFree:         1862116 kB +MemFree:         6410452 kB 
-MemAvailable:    2420560 kB +MemAvailable:    6909420 kB 
-Buffers:            3300 kB +Buffers:            2780 kB 
-Cached:           750496 kB+Cached:           742672 kB
 SwapCached:            0 kB SwapCached:            0 kB
-Active:           315572 kB +Active:           811444 kB 
-Inactive:        1400260 kB +Inactive:         400224 kB 
-Active(anon):       1856 kB +Active(anon):     519616 kB 
-Inactive(anon):   974728 kB +Inactive(anon):        kB 
-Active(file):     313716 kB +Active(file):     291828 kB 
-Inactive(file):   425532 kB+Inactive(file):   400224 kB
 Unevictable:           0 kB Unevictable:           0 kB
 Mlocked:               0 kB Mlocked:               0 kB
-SwapTotal:       3358716 kB +SwapTotal:       5242876 kB 
-SwapFree:        3358716 kB+SwapFree:        5242876 kB 
 +Zswap:                 0 kB 
 +Zswapped:              0 kB
 Dirty:                 0 kB Dirty:                 0 kB
 Writeback:             0 kB Writeback:             0 kB
-AnonPages:        962004 kB +AnonPages:        457680 kB 
-Mapped:           261084 kB +Mapped:           202528 kB 
-Shmem:             14552 kB +Shmem:             53400 kB 
-KReclaimable:      46980 kB +KReclaimable:      55616 kB 
-Slab:             118396 kB +Slab:             114992 kB 
-SReclaimable:      46980 kB +SReclaimable:      55616 kB 
-SUnreclaim:        71416 kB +SUnreclaim:        59376 kB 
-KernelStack:       11280 kB +KernelStack:        8304 kB 
-PageTables:        46532 kB+PageTables:        10960 kB 
 +SecPageTables:         kB
 NFS_Unstable:          0 kB NFS_Unstable:          0 kB
 Bounce:                0 kB Bounce:                0 kB
 WritebackTmp:          0 kB WritebackTmp:          0 kB
-CommitLimit:     5271232 kB +CommitLimit:     9177652 kB 
-Committed_AS:    5072744 kB+Committed_AS:    3436284 kB
 VmallocTotal:   34359738367 kB VmallocTotal:   34359738367 kB
-VmallocUsed:           0 kB+VmallocUsed:       27556 kB
 VmallocChunk:          0 kB VmallocChunk:          0 kB
-Percpu:             5920 kB+Percpu:             1920 kB
 HardwareCorrupted:     0 kB HardwareCorrupted:     0 kB
-AnonHugePages:    546816 kB+AnonHugePages:    237568 kB
 ShmemHugePages:        0 kB ShmemHugePages:        0 kB
 ShmemPmdMapped:        0 kB ShmemPmdMapped:        0 kB
 FileHugePages:         0 kB FileHugePages:         0 kB
 FilePmdMapped:         0 kB FilePmdMapped:         0 kB
 +CmaTotal:              0 kB
 +CmaFree:               0 kB
 +Unaccepted:            0 kB
 HugePages_Total:       0 HugePages_Total:       0
 HugePages_Free:        0 HugePages_Free:        0
Ligne 2365: Ligne 2512:
 Hugepagesize:       2048 kB Hugepagesize:       2048 kB
 Hugetlb:               0 kB Hugetlb:               0 kB
-DirectMap4k:      173944 kB +DirectMap4k:      145256 kB 
-DirectMap2M:     4020224 kB+DirectMap2M:     6146048 kB 
 +DirectMap1G:     4194304 kB
 </code> </code>
  
Ligne 2372: Ligne 2520:
  
 <code> <code>
-[root@centos8 ~]# cat /proc/version +[root@redhat9 ~]# cat /proc/version 
-Linux version 4.18.0-305.3.1.el8.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)) #1 SMP Tue Jun 1 16:14:33 UTC 2021+Linux version 5.14.0-427.37.1.el9_4.x86_64 (mockbuild@x86-64-02.build.eng.rdu2.redhat.com) (gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), GNU ld version 2.35.2-43.el9) #1 SMP PREEMPT_DYNAMIC Fri Sep 13 12:41:50 EDT 2024
 </code> </code>
  
Ligne 2402: Ligne 2550:
 Cette commande a pour résultat d'ignorer les reqûetes ping. Cette commande a pour résultat d'ignorer les reqûetes ping.
  
-====2.2 - Utilisation de la Commande sysctl====+====3.2 - Utilisation de la Commande sysctl====
  
 Les fichiers dans le répertoire **/proc/sys** peuvent être administrés par la commande **sysctl** en temps réel.  Les fichiers dans le répertoire **/proc/sys** peuvent être administrés par la commande **sysctl** en temps réel. 
Ligne 2411: Ligne 2559:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/sysctl.conf+[root@redhat9 ~]# cat /etc/sysctl.conf
 # sysctl settings are defined through files in # sysctl settings are defined through files in
 # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
Ligne 2423: Ligne 2571:
 # For more information, see sysctl.conf(5) and sysctl.d(5). # For more information, see sysctl.conf(5) and sysctl.d(5).
  
-[root@centos8 ~]# ls -l /etc/sysctl.d/+[root@redhat9 ~]# ls -l /etc/sysctl.d/
 total 0 total 0
-lrwxrwxrwx. 1 root root 14 Mar 16 15:42 99-sysctl.conf -> ../sysctl.conf +lrwxrwxrwx. 1 root root 14 Jul 18 13:00 99-sysctl.conf -> ../sysctl.conf
-[root@centos8 ~]# ls -l /usr/lib/sysctl.d/ +
-total 24 +
--rw-r--r--. 1 root root 1810 Dec 22  2020 10-default-yama-scope.conf +
--rw-r--r--. 1 root root  524 Mar 16 15:42 50-coredump.conf +
--rw-r--r--. 1 root root 1270 Mar 16 15:42 50-default.conf +
--rw-r--r--. 1 root root  246 Jun 15  2020 50-libkcapi-optmem_max.conf +
--rw-r--r--. 1 root root  636 Mar 16 15:42 50-pid-max.conf +
--rw-r--r--. 1 root root  499 Nov 26  2019 60-libvirtd.conf+
  
-[root@centos8 ~]# cat /usr/lib/sysctl.d/50-default.conf +[root@redhat9 ~]# ls -l /usr/lib/sysctl.d/ 
 +total 28 
 +-rw-r--r--. 1 root root 1810 Dec 11  2023 10-default-yama-scope.conf 
 +-rw-r--r--. 1 root root 1816 Jul 18 13:00 50-coredump.conf 
 +-rw-r--r--. 1 root root 1919 Oct 31  2022 50-default.conf 
 +-rw-r--r--. 1 root root  246 Dec  7  2023 50-libkcapi-optmem_max.conf 
 +-rw-r--r--. 1 root root  635 Oct 31  2022 50-pid-max.conf 
 +-rw-r--r--. 1 root root  203 Apr 24 13:50 50-redhat.conf 
 +-rw-r--r--. 1 root root  387 Oct 31  2022 README 
 + 
 +[root@redhat9 ~]# cat /usr/lib/sysctl.d/50-default.conf 
 #  This file is part of systemd. #  This file is part of systemd.
 # #
Ligne 2452: Ligne 2602:
 # #
 # Use kernel.sysrq = 1 to allow all keys. # Use kernel.sysrq = 1 to allow all keys.
-# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html for a list+# See https://docs.kernel.org/admin-guide/sysrq.html for a list
 # of values and keys. # of values and keys.
 kernel.sysrq = 16 kernel.sysrq = 16
Ligne 2458: Ligne 2608:
 # Append the PID to the core filename # Append the PID to the core filename
 kernel.core_uses_pid = 1 kernel.core_uses_pid = 1
- 
-# https://bugzilla.redhat.com/show_bug.cgi?id=1689346 
-kernel.kptr_restrict = 1 
  
 # Source route verification # Source route verification
-net.ipv4.conf.all.rp_filter = 1+net.ipv4.conf.default.rp_filter = 
 +net.ipv4.conf.*.rp_filter = 2 
 +-net.ipv4.conf.all.rp_filter
  
 # Do not accept source routing # Do not accept source routing
-net.ipv4.conf.all.accept_source_route = 0+net.ipv4.conf.default.accept_source_route = 0 
 +net.ipv4.conf.*.accept_source_route = 0 
 +-net.ipv4.conf.all.accept_source_route
  
 # Promote secondary addresses when the primary address is removed # Promote secondary addresses when the primary address is removed
-net.ipv4.conf.all.promote_secondaries = 1+net.ipv4.conf.default.promote_secondaries = 1 
 +net.ipv4.conf.*.promote_secondaries = 1 
 +-net.ipv4.conf.all.promote_secondaries 
 + 
 +# ping(8) without CAP_NET_ADMIN and CAP_NET_RAW 
 +# The upper limit is set to 2^31-1. Values greater than that get rejected by 
 +# the kernel because of this definition in linux/include/net/ping.h: 
 +#   #define GID_T_MAX (((gid_t)~0U) >> 1) 
 +# That's not so bad because values between 2^31 and 2^32-1 are reserved on 
 +# systemd-based systems anyway: https://systemd.io/UIDS-GIDS#summary 
 +-net.ipv4.ping_group_range = 0 2147483647
  
 # Fair Queue CoDel packet scheduler to fight bufferbloat # Fair Queue CoDel packet scheduler to fight bufferbloat
-net.core.default_qdisc = fq_codel+-net.core.default_qdisc = fq_codel
  
 # Enable hard and soft link protection # Enable hard and soft link protection
 fs.protected_hardlinks = 1 fs.protected_hardlinks = 1
 fs.protected_symlinks = 1 fs.protected_symlinks = 1
 +
 +# Enable regular file and FIFO protection
 +fs.protected_regular = 1
 +fs.protected_fifos = 1
 </code> </code>
  
Ligne 2482: Ligne 2647:
  
 <code> <code>
-[root@centos8 ~]# sysctl --help+[root@redhat9 ~]# sysctl --help
  
 Usage: Usage:
Ligne 2492: Ligne 2657:
   -X                   alias of -a   -X                   alias of -a
       --deprecated     include deprecated parameters to listing       --deprecated     include deprecated parameters to listing
 +      --dry-run        Print the key and values but do not write
   -b, --binary         print value without new line   -b, --binary         print value without new line
   -e, --ignore         ignore unknown variables errors   -e, --ignore         ignore unknown variables errors
Ligne 2517: Ligne 2683:
 </WRAP> </WRAP>
  
-=====LAB#- Interprétation des informations dans /proc=====+=====LAB#- Interprétation des informations dans /proc=====
  
 Les informations brutes stockées dans /proc peuvent être interprétées grâce à l'utilisation des commandes dites de //gestion des performances// : Les informations brutes stockées dans /proc peuvent être interprétées grâce à l'utilisation des commandes dites de //gestion des performances// :
Ligne 2529: Ligne 2695:
   * sar.   * sar.
  
-====3.1 - La Commande free====+====4.1 - La Commande free====
  
 La commande **free** permet de donner l’état de la mémoire totale, libre, partagée, swap et bufferisée. Saisissez donc la commande suivante : La commande **free** permet de donner l’état de la mémoire totale, libre, partagée, swap et bufferisée. Saisissez donc la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# free -m +[root@redhat9 ~]# free -m 
-              total        used        free      shared  buff/cache   available +               total        used        free      shared  buff/cache   available 
-Mem:           3735        1135        1818          14         782        2363 +Mem:            7685         948        6249          52         782        6736 
-Swap:          3279           0        3279+Swap:           5119           0        5119
 </code> </code>
  
 Dans le cas de cet exemple, nous pouvons constater que l’affichage montre : Dans le cas de cet exemple, nous pouvons constater que l’affichage montre :
  
-  * 3735 Mo de mémoire physique totale, +  * 7685 Mo de mémoire physique totale, 
-  * 1135 Mo de mémoire physique utilisée et 1818 Mo de mémoire physique libre, +  * 948 Mo de mémoire physique utilisée et 6249 Mo de mémoire physique libre, 
-  * 3279 Mo de mémoire swap totale et 0 Mo de swap utilisé+  * 5119 Mo de mémoire swap totale et 0 Mo de swap utilisé
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-[root@centos8 ~]# free --help+[root@redhat9 ~]# free --help
  
 Usage: Usage:
Ligne 2580: Ligne 2746:
 </code> </code>
  
-====3.2 - Les Commandes uptime et w====+====4.2 - Les Commandes uptime et w====
  
 Chacune des ces commandes indique la charge moyenne du ou des processeurs depuis 1 minute, 5 minutes et 15 minutes : Chacune des ces commandes indique la charge moyenne du ou des processeurs depuis 1 minute, 5 minutes et 15 minutes :
  
 <code> <code>
-[root@centos8 ~]# uptime +[root@redhat9 ~]# uptime 
- 04:39:03 up 1 day,  2:34,  1 user,  load average: 0.00, 0.00, 0.00 + 12:56:03 up 21:19,  1 user,  load average: 0.00, 0.00, 0.00 
-  + 
-[root@centos8 ~]# w +[root@redhat9 ~]# w 
- 04:39:04 up 1 day,  2:34,  1 user,  load average: 0.00, 0.00, 0.00 + 12:56:07 up 21:19,  1 user,  load average: 0.00, 0.00, 0.00 
-USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT +USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT 
-trainee  pts/0    10.0.2.1         03:58    0.00s  0.11s  0.02s sshd: trainee [priv]+trainee  pts/0     12:40    6.00s  0.05s  0.02s sshd: trainee [priv]
 </code> </code>
  
Ligne 2605: Ligne 2771:
  
 <code> <code>
-[root@centos8 ~]# uptime --help+[root@redhat9 ~]# uptime --help
  
 Usage: Usage:
Ligne 2618: Ligne 2784:
 For more details see uptime(1). For more details see uptime(1).
  
-[root@centos8 ~]# w --help+[root@redhat9 ~]# w --help
  
 Usage: Usage:
Ligne 2637: Ligne 2803:
 </code> </code>
  
-====3.3 - La Commande iostat====+====4.3 - La Commande iostat====
  
-La commande **iostat** affiche des statistiques sur l'utilisation des disques, des terminaux et des lecteurs de cartouche :+La commande **iostat** affiche des statistiques sur l'utilisation des disques, des terminaux et des lecteurs de cartouche. Commencez par installer le paquet **sysstat** :
  
 <code> <code>
-[root@centos8 ~]# iostat +[root@redhat9 ~]# dnf install sysstat -y 
-bash: iostat: command not found... +</code>
-Install package 'sysstat' to provide command 'iostat'? [N/y] y+
  
 +Exécutez ensuite la commande **iostat** : 
  
- * Waiting in queue...  +<code> 
-The following packages have to be installed: +[root@redhat9 ~]# iostat 
- lm_sensors-libs-3.4.0-22.20180522git70f7e08.el8.x86_64 Lm_sensors core libraries +Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
- sysstat-11.7.3-5.el8.x86_64    Collection of performance monitoring tools for Linux +
-Proceed with changes? [N/y+
- +
- +
- * Waiting in queue...  +
- * Waiting for authentication...  +
- * Waiting in queue...  +
- * Downloading packages...  +
- * Requesting data...  +
- * Testing changes...  +
- * Installing packages...  +
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(CPU)+
  
 avg-cpu:  %user   %nice %system %iowait  %steal   %idle avg-cpu:  %user   %nice %system %iowait  %steal   %idle
-           0.03    0.00    0.03    0.01    0.00   99.93+           0.14    0.01    0.17    0.05    0.00   99.63
  
-Device             tps    kB_read/   kB_wrtn/   kB_read    kB_wrtn +Device             tps    kB_read/   kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd 
-sda               0.28         7.67         1.49     735338     142510 +dm-0              0.75         9.72         4.09         0.00     748282     315002          0 
-sdb               0.00         0.03         0.00       2995          0 +dm-1              0.00         0.03         0.00         0.00       2220                   0 
-scd0              0.00         0.00         0.00                   0 +sda               0.66        10.49         4.12         0.00     807403     317133          0 
-dm-0              0.26         7.25         1.55     694786     148837 +sdb               0.00         0.03         0.00         0.00       2100          0          0
-dm-1              0.00         0.02         0.00       2220          0+
 </code> </code>
  
Ligne 2697: Ligne 2850:
  
 <code> <code>
-[root@centos8 ~]# iostat -d -x +[root@redhat9 ~]# iostat -d -x 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_        (CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-Device            r/s     w/s     rkB/s     wkB/s   rrqm/s   wrqm/ %rrqm  %wrqm r_await w_await aqu-sz rareq-sz wareq-sz  svctm  %util +Device            r/s     rkB/s   rrqm/ %rrqm r_await rareq-sz     w/s     wkB/  wrqm/ %wrqm w_await wareq-sz     d/s     dkB/  drqm/ %drqm d_await dareq-sz     f/s f_await  aqu-sz  %util 
-sda              0.20    0.16     11.67      1.81     0.00     0.03   0.48  17.45    6.79   69.99   0.01    58.28    11.33   9.13   0.33 +dm-            0.19      9.72     0.00   0.00    6.27    50.38    0.56      4.09     0.00   0.00   80.87     7.36    0.00      0.00     0.00   0.00    0.00     0.00    0.00    0.00    0.05   1.01 
-sdb              0.00    0.00      0.02      0.00     0.00     0.00   0.00   0.00    0.13    0.00   0.00     8.81     0.00   0.51   0.00 +dm-1             0.00      0.03     0.00   0.00    0.34    22.65    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00    0.00    0.00   0.00 
-scd0             0.00    0.00      0.00      0.00     0.00     0.00   0.00   0.00    0.20    0.00   0.00     0.20     0.00   0.90   0.00 +sda              0.20     10.48     0.00   0.14    6.29    51.55    0.46      4.12     0.10  17.25   73.40     8.94    0.00      0.00     0.00   0.00    0.00     0.00    0.12   12.27    0.04   1.01 
-dm-0             0.12    0.19      3.98      1.90     0.00     0.00   0.00   0.00    4.18   79.07   0.02    32.88    10.07  10.34   0.32 +sdb              0.00      0.03     0.00   0.00    0.87    20.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00      0.00     0.00   0.00    0.00     0.00    0.00    0.00    0.00   0.00
-dm-1             0.00    0.00      0.01      0.00     0.00     0.00   0.00   0.00    0.76    0.00   0.00    21.35     0.00   0.68   0.00+
 </code> </code>
  
-Les options de cette commande sont : +====4.4 - La Commande hdparm====
- +
-<code> +
-[root@centos8 ~]# iostat --help +
-Usage: iostat [ options ] [ <interval> [ <count> ] ] +
-Options are: +
-[ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ] +
-[ -j { ID | LABEL | PATH | UUID | ... } ] [ --human ] [ -o JSON ] +
-[ [ -H ] -g <group_name> ] [ -p [ <device> [,...] | ALL ] ] +
-[ <device> [...] | ALL ] +
-</code> +
- +
-====3.4 - La Commande hdparm====+
  
 Pour surveiller la vitesse des entrées et des sorties du disque, vous pouvez utiliser la commande **hdparm** : Pour surveiller la vitesse des entrées et des sorties du disque, vous pouvez utiliser la commande **hdparm** :
  
 <code> <code>
-[root@centos8 ~]# hdparm -t /dev/sda+[root@redhat9 ~]# hdparm -t /dev/sda
  
 /dev/sda: /dev/sda:
- Timing buffered disk reads: 1410 MB in  3.00 seconds = 469.98 MB/sec+ Timing buffered disk reads: 348 MB in  3.00 seconds = 115.91 MB/sec
 </code> </code>
  
-====3.5 - La Commande vmstat====+====4.5 - La Commande vmstat====
  
 La commande **vmstat** affiche des statistiques sur la mémoire, la pagination et la charge ponctuelle du processeur : La commande **vmstat** affiche des statistiques sur la mémoire, la pagination et la charge ponctuelle du processeur :
  
 <code> <code>
-[root@centos8 ~]# vmstat 1 10+[root@redhat9 ~]# vmstat 1 10
 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
   b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st   b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
-  0      0 1765216   2256 866336       0         0    9   12   0 100  0  0 +  0      0 6183436   2192 914452       0         1   33   51   0 100  0  0 
-  0      0 1765136   2256 866336       0           57   80   0 100  0  0 +  0      0 6183436   2192 914492       0          158  238   0 100  0  0 
-  0      0 1765136   2256 866376       0           54   77   0 100  0  0 +  0      0 6183436   2192 914492       0           90  151   0 100  0  0 
-  0      0 1765136   2256 866376       0           66  100   0 100  0  0 +  0      0 6183436   2192 914492       0           87  144   0 100  0  0 
-  0      0 1765136   2256 866376       0         0  103  125   0 100  0  0 +  0      0 6183436   2192 914492       0           99  156   0 100  0  0 
-  0      0 1765108   2256 866376       0           64   86   0 100  0  0 +  0      0 6183436   2192 914492       0           99  159   0 100  0  0 
-  0      0 1765108   2256 866376       0           62   88   0 100  0  0 +  0      0 6183436   2192 914492       0           92  152   0 100  0  0 
-  0      0 1765108   2256 866376       0           68   97   0 100  0  0 +  0      0 6183436   2192 914492       0           93  156   0 100  0  0 
-  0      0 1765108   2256 866376       0           60   88   0 100  0  0 +  0      0 6183436   2192 914492       0           92  156   0 100  0  0 
-  0      0 1765108   2256 866376       0         0  177  251   0 100  0  0+  0      0 6183436   2192 914492       0           88  150   0 100  0  0
 </code> </code>
  
Ligne 2790: Ligne 2930:
  
 <code> <code>
-[root@centos8 ~]# vmstat --help+[root@redhat9 ~]# vmstat --help
  
 Usage: Usage:
Ligne 2818: Ligne 2958:
 </WRAP> </WRAP>
  
-====3.6 - La Commande mpstat====+====4.6 - La Commande mpstat====
  
 La commande **mpstat** affiche des statistiques détaillées sur le CPU : La commande **mpstat** affiche des statistiques détaillées sur le CPU :
  
 <code> <code>
-[root@centos8 ~]# mpstat +[root@redhat9 ~]# mpstat 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-04:53:22     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:03:16 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:53:22     all    0.03    0.00    0.01    0.02    0.01    0.01    0.00    0.00    0.00   99.92+01:03:16 PM  all    0.14    0.01    0.12    0.05    0.04    0.02    0.00    0.00    0.00   99.63
 </code> </code>
  
Ligne 2833: Ligne 2973:
  
 <code> <code>
-[root@centos8 ~]# mpstat -P ALL +[root@redhat9 ~]# mpstat -P ALL 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-04:54:28     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:03:38 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:54:28     all    0.03    0.00    0.01    0.02    0.01    0.01    0.00    0.00    0.00   99.92 +01:03:38 PM  all    0.14    0.01    0.12    0.05    0.04    0.02    0.00    0.00    0.00   99.63 
-04:54:28          0.03    0.00    0.01    0.00    0.01    0.00    0.00    0.00    0.00   99.94 +01:03:38 PM       0.13    0.00    0.12    0.05    0.04    0.02    0.00    0.00    0.00   99.64 
-04:54:28          0.02    0.00    0.02    0.03    0.02    0.00    0.00    0.00    0.00   99.91 +01:03:38 PM       0.14    0.01    0.12    0.04    0.03    0.01    0.00    0.00    0.00   99.65 
-04:54:28          0.02    0.00    0.01    0.01    0.01    0.04    0.00    0.00    0.00   99.90 +01:03:38 PM       0.14    0.01    0.12    0.05    0.04    0.02    0.00    0.00    0.00   99.62 
-04:54:28          0.01    0.00    0.01    0.02    0.00    0.00    0.00    0.00    0.00   99.95 +01:03:38 PM       0.14    0.01    0.12    0.06    0.04    0.02    0.00    0.00    0.00   99.62
-04:54:28          0.05    0.00    0.02    0.03    0.01    0.00    0.00    0.00    0.00   99.88 +
-04:54:28          0.03    0.01    0.01    0.02    0.01    0.00    0.00    0.00    0.00   99.92 +
-04:54:28          0.02    0.00    0.02    0.01    0.01    0.00    0.00    0.00    0.00   99.95 +
-04:54:28          0.02    0.00    0.01    0.01    0.01    0.00    0.00    0.00    0.00   99.94+
 </code> </code>
  
Ligne 2851: Ligne 2987:
  
 <code> <code>
-[root@centos8 ~]# mpstat -P ALL 2 5 +[root@redhat9 ~]# mpstat -P ALL 2 5 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-04:55:11     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:04:15 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:55:13     all    0.00    0.00    0.00    0.00    0.00    0.00    0.06    0.00    0.00   99.94 +01:04:17 PM  all    0.00    0.00    0.00    0.00    0.00    0.12    0.00    0.00    0.00   99.88 
-04:55:13       0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:17 PM    0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:13       1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:17 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:13       2    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:17 PM    2    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:13       3    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:17 PM    3    0.00    0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00   99.50
-04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.50    0.00    0.00   99.50 +
-04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:13          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00+
  
-04:55:13     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:04:17 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:55:15     all    0.00    0.00    0.00    0.00    0.06    0.00    0.00    0.00    0.00   99.94 +01:04:19 PM  all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:19 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:19 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:19 PM    2    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:19 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:15          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:15          0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00    0.00   99.50+
  
-04:55:15     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:04:19 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:55:17     all    0.00    0.00    0.00    0.00    0.06    0.00    0.00    0.00    0.00   99.94 +01:04:21 PM  all    0.00    0.00    0.12    0.00    0.25    0.00    0.00    0.00    0.00   99.63 
-04:55:17       0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:21 PM    0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:17       1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:21 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:17       2    0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00    0.00   99.50 +01:04:21 PM    2    0.00    0.00    0.50    0.00    0.50    0.00    0.00    0.00    0.00   99.01 
-04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:21 PM       0.00    0.00    0.00    0.00    0.50    0.00    0.00    0.00    0.00   99.50
-04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:17          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00+
  
-04:55:17     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:04:21 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:55:19     all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:23 PM  all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:19       0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:23 PM    0    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:19       1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:23 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:23 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:23 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:19          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00+
  
-04:55:19     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle +01:04:23 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 
-04:55:21     all    0.06    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.94 +01:04:25 PM  all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:25 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:25 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:25 PM    2    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +01:04:25 PM       0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:21          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-04:55:21          0.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.50+
  
 Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
-Average:     all    0.01    0.00    0.00    0.00    0.02    0.00    0.01    0.00    0.00   99.95+Average:     all    0.00    0.00    0.03    0.00    0.05    0.03    0.00    0.00    0.00   99.90
 Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
 Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
-Average:          0.00    0.00    0.00    0.00    0.10    0.00    0.00    0.00    0.00   99.90 +Average:          0.00    0.00    0.10    0.00    0.10    0.00    0.00    0.00    0.00   99.80 
-Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +Average:          0.00    0.00    0.00    0.00    0.10    0.10    0.00    0.00    0.00   99.80
-Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.10    0.00    0.00   99.90 +
-Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-Average:          0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00 +
-Average:          0.10    0.00    0.00    0.00    0.10    0.00    0.00    0.00    0.00   99.80+
 </code> </code>
  
-Les options de cette commande sont : +====4.7 - La Commande sar====
- +
-<code> +
-[root@centos8 ~]# mpstat --help +
-Usage: mpstat [ options ] [ <interval> [ <count> ] ] +
-Options are: +
-[ -A ] [ -n ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] +
-[ -N { <node_list> | ALL } ] [ -o JSON ] [ -P { <cpu_list> | ALL } ] +
-</code> +
- +
-====3.7 - La Commande sar====+
  
 La commande **sar** (**S**ystem **A**ctivity **R**eporter) permet de surveiller toutes les ressources du système selon l'option qui est passée en argument à la commande.  La commande **sar** (**S**ystem **A**ctivity **R**eporter) permet de surveiller toutes les ressources du système selon l'option qui est passée en argument à la commande. 
  
-Sous RHEL/CentOS 8 la commande **/usr/lib64/sa/sadc** permet de collecter les informations :+Sous RedHat 9 la commande **/usr/lib64/sa/sadc** permet de collecter les informations :
  
 <code> <code>
-[root@centos8 ~]# ls /usr/lib64/sa+[root@redhat9 ~]# ls /usr/lib64/sa
 sa1  sa2  sadc sa1  sa2  sadc
 </code> </code>
Ligne 2948: Ligne 3050:
 | -n | Nombre de collectes | | -n | Nombre de collectes |
  
-Le script **/usr/lib64/sa/sa2** exécute la commande **sar** et consigne les informations dans un fichier au format **/var/log/sa/sar<jj>** :+Le script **/usr/lib64/sa/sa2** exécute la commande **sar** et consigne les informations dans un fichier au format **/var/log/sa/sar<jj>**.
  
-<code> +Sous RedHat 9, l'intervalle entre les collectes des informations est configuré par les **timers** de systemd au lieu des cron jobs :
-[root@centos8 ~]# ls /var/log/sa/ +
-sa29  s +
- +
- +
-ar29 +
-</code> +
- +
-Sous CentOS / RHEL 8, l'intervalle entre les collectes des informations est configuré par les **timers** de systemd au lieu des cron jobs :+
  
 <code> <code>
-[root@centos8 ~]# cat /usr/lib/systemd/system/sysstat-collect.timer+[root@redhat9 ~]# cat /usr/lib/systemd/system/sysstat-collect.timer
 # /usr/lib/systemd/system/sysstat-collect.timer # /usr/lib/systemd/system/sysstat-collect.timer
 # (C) 2014 Tomasz Torcz <tomek@pipebreaker.pl> # (C) 2014 Tomasz Torcz <tomek@pipebreaker.pl>
 # #
-# sysstat-11.7.systemd unit file:+# sysstat-12.5.systemd unit file:
 #        Activates activity collector every 10 minutes #        Activates activity collector every 10 minutes
  
Ligne 2983: Ligne 3077:
  
 <code> <code>
-[root@centos8 ~]# systemctl edit sysstat-collect.timer +[root@redhat9 ~]# systemctl edit sysstat-collect.timer 
-[root@centos8 ~]# cat /etc/systemd/system/sysstat-collect.timer.d/override.conf + 
 +[root@redhat9 ~]# cat /etc/systemd/system/sysstat-collect.timer.d/override.conf 
 [Unit] [Unit]
 Description=Run system activity accounting tool every 2 minutes Description=Run system activity accounting tool every 2 minutes
Ligne 3001: Ligne 3096:
  
 <code> <code>
-[root@centos8 ~]# systemctl status sysstat-collect.timer+[root@redhat9 ~]# systemctl status sysstat-collect.timer 
 +○ sysstat-collect.timer - Run system activity accounting tool every 2 minutes 
 +     Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; preset: disabled) 
 +    Drop-In: /etc/systemd/system/sysstat-collect.timer.d 
 +             └─override.conf 
 +     Active: inactive (dead) 
 +    Trigger: n/a 
 +   Triggers: ● sysstat-collect.service 
 +</code> 
 + 
 +Démarrez le timer : 
 + 
 +<code> 
 +[root@redhat9 ~]# systemctl start sysstat-collect.timer 
 + 
 +[root@redhat9 ~]# systemctl status sysstat-collect.timer
 ● sysstat-collect.timer - Run system activity accounting tool every 2 minutes ● sysstat-collect.timer - Run system activity accounting tool every 2 minutes
-   Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: disabled) +     Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; preset: disabled) 
-  Drop-In: /etc/systemd/system/sysstat-collect.timer.d +    Drop-In: /etc/systemd/system/sysstat-collect.timer.d 
-           └─override.conf +             └─override.conf 
-   Active: active (waiting) since Tue 2021-06-29 06:16:04 EDT3h 2min ago +     Active: active (waiting) since Wed 2024-10-23 13:12:22 CEST4s ago 
-  Trigger: Tue 2021-06-29 09:20:00 EDT; 1min 19s left+      Until: Wed 2024-10-23 13:12:22 CEST; 4s ago 
 +    Trigger: Wed 2024-10-23 13:14:00 CEST; 1min 32s left 
 +   Triggers: ● sysstat-collect.service
  
-Jun 29 06:16:04 centos8.ittraining.loc systemd[1]: Started Run system activity accounting tool every 10 minutes.+Oct 23 13:12:22 redhat9.ittraining.loc systemd[1]: Started Run system activity accounting tool every minutes.
 </code> </code>
 +
 +Attendez 4 minutes, puis lancez la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# journalctl -g sysstat-collect.service +[root@redhat9 ~]# journalctl -g sysstat-collect.service 
--- Logs begin at Mon 2021-06-28 02:04:10 EDT, end at Tue 2021-06-29 09:18:00 EDT. -- +Oct 23 13:14:00 redhat9.ittraining.loc systemd[1]: sysstat-collect.service: Deactivated successfully
-Jun 29 06:20:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded+Oct 23 13:16:00 redhat9.ittraining.loc systemd[1]: sysstat-collect.service: Deactivated successfully.
-Jun 29 06:26:29 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 06:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 06:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 06:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:00:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:10:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:20:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:30:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:40:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:50:33 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:53:56 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:54:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:56:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 07:58:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-Jun 29 08:00:00 centos8.ittraining.loc systemd[1]: sysstat-collect.service: Succeeded. +
-...+
 </code> </code>
  
-Saisissez la commande suivante :+Saisissez la commande sar :
  
 <code> <code>
-[root@centos8 ~]# sar +[root@redhat9 ~]# sar 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (CPU) +Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
- +
-06:16:04     LINUX RESTART      (8 CPU) +
- +
-06:20:33        CPU     %user     %nice   %system   %iowait    %steal     %idle +
-06:26:29        all      0.03      0.00      0.03      0.00      0.00     99.94 +
-06:30:33        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-06:40:33        all      0.02      0.00      0.03      0.00      0.00     99.94 +
-06:50:33        all      0.02      0.00      0.02      0.00      0.00     99.95 +
-07:00:33        all      0.02      0.00      0.02      0.00      0.00     99.95 +
-07:10:33        all      0.02      0.00      0.02      0.00      0.00     99.95 +
-07:20:33        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-07:30:33        all      0.02      0.01      0.03      0.00      0.00     99.94 +
-07:40:33        all      0.03      0.00      0.04      0.00      0.00     99.93 +
-07:50:33        all      0.03      0.00      0.03      0.00      0.00     99.94 +
-07:53:56        all      0.08      0.00      0.06      0.00      0.00     99.86 +
-07:54:00        all      0.09      0.00      0.06      0.00      0.00     99.85 +
-Average:        all      0.03      0.00      0.03      0.00      0.00     99.94 +
- +
-07:55:44     LINUX RESTART      (8 CPU) +
- +
-07:56:00        CPU     %user     %nice   %system   %iowait    %steal     %idle +
-07:58:00        all      0.03      0.00      0.03      0.00      0.00     99.94 +
-08:00:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:02:00        all      0.02      0.00      0.03      0.00      0.00     99.94 +
-08:04:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:06:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:08:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:10:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:12:00        all      0.03      0.00      0.03      0.00      0.00     99.95 +
-08:14:00        all      0.02      0.00      0.03      0.01      0.00     99.94 +
-08:16:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:18:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:20:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:22:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:24:00        all      0.02      0.00      0.02      0.00      0.00     99.95 +
-08:26:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:28:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:30:00        all      0.02      0.05      0.05      0.00      0.00     99.87 +
-08:32:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:34:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:36:00        all      0.03      0.00      0.04      0.00      0.00     99.94 +
-08:38:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:40:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:42:00        all      0.02      0.00      0.03      0.00      0.00     99.94 +
-08:44:00        all      0.03      0.00      0.03      0.00      0.00     99.94 +
-08:46:00        all      0.02      0.00      0.03      0.00      0.00     99.94 +
-08:48:00        all      0.03      0.00      0.03      0.00      0.00     99.95 +
-08:50:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:52:00        all      0.02      0.00      0.06      0.00      0.00     99.92 +
-08:54:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-08:56:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-08:58:00        all      0.02      0.00      0.02      0.00      0.00     99.96 +
-09:00:00        all      0.07      0.00      0.05      0.00      0.00     99.88 +
-09:02:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-09:04:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-09:06:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-09:08:00        all      0.02      0.00      0.04      0.00      0.00     99.94 +
-09:10:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +
-09:12:00        all      0.02      0.00      0.03      0.00      0.00     99.94+
  
-09:12:00        CPU     %user     %nice   %system   %iowait    %steal     %idle +01:14:00 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle 
-09:14:00        all      0.02      0.00      0.03      0.00      0.00     99.95 +01:16:00 PM     all      0.09      0.00      0.09      0.00      0.00     99.81 
-09:16:00        all      0.02      0.00      0.06      0.00      0.00     99.92 +Average:        all      0.09      0.00      0.09      0.00      0.00     99.81
-09:18:00        all      0.03      0.00      0.03      0.00      0.00     99.95 +
-09:20:00        all      0.02      0.00      0.03      0.00      0.00     99.94 +
-Average:        all      0.02      0.00      0.03      0.00      0.00     99.94+
 </code> </code>
  
Ligne 3112: Ligne 3148:
  
 <code> <code>
-[root@centos8 ~]# sar -u 5 3 +[root@redhat9 ~]# sar -u 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-09:22:52        CPU     %user     %nice   %system   %iowait    %steal     %idle +01:17:30 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle 
-09:22:57        all      0.03      0.00      0.03      0.00      0.00     99.95 +01:17:35 PM     all      0.00      0.00      0.05      0.05      0.00     99.90 
-09:23:02        all      0.03      0.00      0.03      0.00      0.00     99.95 +01:17:40 PM     all      0.00      0.00      0.10      0.00      0.00     99.90 
-09:23:07        all      0.00      0.00      0.03      0.00      0.00     99.97 +01:17:45 PM     all      0.00      0.00      0.05      0.00      0.00     99.95 
-Average:        all      0.02      0.00      0.03      0.00      0.00     99.96+Average:        all      0.00      0.00      0.07      0.02      0.00     99.92
 </code> </code>
  
Ligne 3125: Ligne 3161:
  
 <code> <code>
-[root@centos8 ~]# sar -u ALL 5 3 +[root@redhat9 ~]# sar -u ALL 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_(CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-01:49:14        CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle +01:18:19 PM     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle 
-01:49:19        all      0.03      0.00      0.00      0.00      0.00      0.03      0.00      0.00      0.00     99.95 +01:18:24 PM     all      0.00      0.00      0.00      0.00      0.00      0.00      0.05      0.00      0.00     99.95 
-01:49:24        all      0.03      0.00      0.03      0.00      0.00      0.10      0.05      0.00      0.00     99.80 +01:18:29 PM     all      0.00      0.00      0.00      0.00      0.00      0.00      0.05      0.00      0.00     99.95 
-01:49:29        all      0.00      0.00      0.00      0.25      0.00      0.10      0.05      0.00      0.00     99.60 +01:18:34 PM     all      0.00      0.00      0.00      0.00      0.00      0.05      0.00      0.00      0.00     99.95 
-Average:        all      0.02      0.00      0.01      0.08      0.00      0.08      0.03      0.00      0.00     99.78+Average:        all      0.00      0.00      0.00      0.00      0.00      0.02      0.03      0.00      0.00     99.95
 </code> </code>
  
Ligne 3138: Ligne 3174:
  
 <code> <code>
-[root@centos8 ~]# sar -u -P 1 5 3 +[root@redhat9 ~]# sar -u -P 1 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-01:51:52        CPU     %user     %nice   %system   %iowait    %steal     %idle +01:19:18 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle 
-01:51:57          1      0.00      0.00      0.00      0.00      0.00    100.00 +01:19:23 PM       1      0.00      0.00      0.00      0.00      0.00    100.00 
-01:52:02          1      0.20      0.00      0.00      0.00      0.00     99.80 +01:19:28 PM       1      0.00      0.00      0.00      0.00      0.00    100.00 
-01:52:07          1      0.00      0.00      0.00      0.00      0.00    100.00 +01:19:33 PM       1      0.00      0.00      0.00      0.00      0.00    100.00 
-Average:          1      0.07      0.00      0.00      0.00      0.00     99.93 +Average:          1      0.00      0.00      0.00      0.00      0.00    100.00
-[root@centos8 ~]# sar -u -P 5 5 3 +
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU)+
  
-01:52:16        CPU     %user     %nice   %system   %iowait    %steal     %idle +[root@redhat9 ~]# sar -u -P 3 5 3 
-01:52:21          5      0.00      0.00      0.00      0.00      0.00    100.00 +Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (4 CPU) 
-01:52:26          5      0.00      0.00      0.00      0.00      0.00    100.00 + 
-01:52:31          5      0.00      0.00      0.00      0.00      0.00    100.00 +01:19:57 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle 
-Average:               0.00      0.00      0.00      0.00      0.00    100.00+01:20:02 PM            0.40      0.00      0.60      0.00      0.00     99.00 
 +01:20:07 PM            0.00      0.00      0.20      0.00      0.00     99.80 
 +01:20:12 PM            0.20      0.00      0.00      0.00      0.00     99.80 
 +Average:               0.20      0.00      0.27      0.00      0.00     99.53
 </code> </code>
  
Ligne 3161: Ligne 3198:
  
 <code> <code>
-[root@centos8 ~]# sar -r 5 3 +[root@redhat9 ~]# sar -r 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_(CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-07:33:32    kbmemfree   kbavail kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty +01:21:09 PM kbmemfree   kbavail kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty 
-07:33:37      1647240   2297232   2177792     56.94      3356    827396   5096432     70.94    359072   1486368         0 +01:21:14 PM   6291048   6884172    614788      7.81      2780    830192   3436776     26.21    815820    487516         8 
-07:33:42      1647232   2297224   2177800     56.94      3356    827396   5095788     70.93    359072   1486300         0 +01:21:19 PM   6291048   6884172    614788      7.81      2780    830192   3436776     26.21    815872    487516         8 
-07:33:47      1647232   2297224   2177800     56.94      3356    827396   5095788     70.93    359072   1486376         0 +01:21:24 PM   6291048   6884172    614788      7.81      2780    830192   3436776     26.21    815872    487516         8 
-Average:      1647235   2297227   2177797     56.94      3356    827396   5096003     70.94    359072   1486348         0+Average:      6291048   6884172    614788      7.81      2780    830192   3436776     26.21    815855    487516         8
 </code> </code>
  
Ligne 3174: Ligne 3211:
  
 <code> <code>
-[root@centos8 ~]# sar -S 5 3 +[root@redhat9 ~]# sar -S 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_(CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-07:31:58    kbswpfree kbswpused  %swpused  kbswpcad   %swpcad +01:21:48 PM kbswpfree kbswpused  %swpused  kbswpcad   %swpcad 
-07:32:03      3358716         0      0.00              0.00 +01:21:53 PM   5242876         0      0.00              0.00 
-07:32:08      3358716         0      0.00              0.00 +01:21:58 PM   5242876         0      0.00              0.00 
-07:32:13      3358716         0      0.00              0.00 +01:22:03 PM   5242876         0      0.00              0.00 
-Average:      3358716         0      0.00              0.00+Average:      5242876         0      0.00              0.00
 </code> </code>
  
Ligne 3189: Ligne 3226:
  
 <code> <code>
-[root@centos8 ~]# sar -b 5 3 +[root@redhat9 ~]# sar -b 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (CPU)+Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
  
-09:24:49          tps      rtps      wtps   bread/  bwrtn/+01:22:37 PM       tps      rtps      wtps      dtps   bread/  bwrtn/s   bdscd/s 
-09:24:54         0.00      0.00      0.00      0.00      0.00 +01:22:42 PM      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-09:24:59         1.20      0.00      1.20      0.00     20.20 +01:22:47 PM      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-09:25:04         0.00      0.00      0.00      0.00      0.00 +01:22:52 PM      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-Average:         0.40      0.00      0.40      0.00      6.73+Average:         0.00      0.00      0.00      0.00      0.00      0.00      0.00
 </code> </code>
  
Ligne 3204: Ligne 3241:
  
 <code> <code>
-[root@centos8 ~]# sar -d 5 3 +[root@redhat9 ~]# sar -d 5 3 
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        29/06/21        _x86_64_        (8 CPU) +Linux 5.14.0-427.37.1.el9_4.x86_64 (redhat9.ittraining.loc)     10/23/2024      _x86_64_        (CPU)
- +
-09:25:45          DEV       tps     rkB/s     wkB/s   areq-sz    aqu-sz     await     svctm     %util +
-09:25:50       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:50      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:50      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:50     dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:50     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
- +
-09:25:50          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +
-09:25:55       dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:55      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:55      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:55     dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:25:55     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
- +
-09:25:55          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +
-09:26:00       dev8-0      0.60      0.00      0.30      0.50      0.01     13.00     13.00      0.78 +
-09:26:00      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:26:00      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-09:26:00     dev253-0      0.60      0.00      0.50      0.83      0.01     12.67     13.00      0.78 +
-09:26:00     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
- +
-Average:          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +
-Average:       dev8-0      0.20      0.00      0.10      0.50      0.00     13.00     13.00      0.26 +
-Average:      dev8-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-Average:      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-Average:     dev253-0      0.20      0.00      0.17      0.83      0.00     12.67     13.00      0.26 +
-Average:     dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +
-</code> +
- +
-La colonne **DEV** indentifie les disques par leurs majeurs et mineurs. Pour voir les informations avec les noms des disques, ajoutez l'option **-p** : +
- +
-<code> +
-[root@centos8 ~]# sar -p -d 5 3 +
-Linux 4.18.0-305.3.1.el8.x86_64 (centos8.ittraining.loc)        30/06/21        _x86_64_        (CPU)+
  
-07:48:32          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +01:23:14 PM       DEV       tps     rkB/    wkB/s     dkB/s   areq-sz    aqu-sz     await     %util 
-07:48:37          sda      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:19 PM       sda      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-07:48:37          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:19 PM       sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-07:48:37          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:19 PM      dm-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-07:48:37    cl_centos8-root      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:19 PM      dm-     0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
-07:48:37    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00+
  
-07:48:37          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +01:23:19 PM       DEV       tps     rkB/    wkB/s     dkB/s   areq-sz    aqu-sz     await     %util 
-07:48:42          sda      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:24 PM       sda      0.20      0.00      0.80      0.00      4.00      0.02     78.00      1.58 
-07:48:42          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:24 PM       sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-07:48:42          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:24 PM      dm-0      0.20      0.00      0.80      0.00      4.00      0.02     78.00      1.58 
-07:48:42    cl_centos8-root      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:24 PM      dm-     0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
-07:48:42    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00+
  
-07:48:42          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +01:23:24 PM       DEV       tps     rkB/    wkB/s     dkB/s   areq-sz    aqu-sz     await     %util 
-07:48:47          sda      0.40      0.00      0.40      1.00      0.02     56.00     56.50      2.26 +01:23:29 PM       sda      1.00      0.00      5.00      0.00      5.00      0.03     27.20      2.46 
-07:48:47          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:29 PM       sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 
-07:48:47          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +01:23:29 PM      dm-0      1.00      0.00      5.00      0.00      5.00      0.03     27.00      2.46 
-07:48:47    cl_centos8-root      0.40      0.00      0.80      2.00      0.02     56.00     56.50      2.26 +01:23:29 PM      dm-     0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
-07:48:47    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00+
  
-Average:          DEV       tps     rkB/    wkB/  areq-sz    aqu-sz     await     svctm     %util +Average:          DEV       tps     rkB/    wkB/s     dkB/s   areq-sz    aqu-sz     await     %util 
-Average:          sda      0.13      0.00      0.13      1.00      0.01     56.00     56.50      0.75+Average:          sda      0.40      0.00      1.93      0.00      4.83      0.02     35.67      1.35
 Average:          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 Average:          sdb      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
-Average:          sr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00 +Average:         dm-0      0.40      0.00      1.93      0.00      4.83      0.01     35.50      1.35 
-Average:    cl_centos8-root      0.13      0.00      0.27      2.00      0.01     56.00     56.50      0.75 +Average:         dm-     0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
-Average:    cl_centos8-swap      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00+
 </code> </code>
  
Ligne 3274: Ligne 3272:
  
 <code> <code>
-[root@centos8 ~]# sar --help+[root@redhat9 ~]# sar --help
 Usage: sar [ options ] [ <interval> [ <count> ] ] Usage: sar [ options ] [ <interval> [ <count> ] ]
 Main options and reports (report name between square brackets): Main options and reports (report name between square brackets):
Ligne 3317: Ligne 3315:
                 FC      Fibre channel HBAs                 FC      Fibre channel HBAs
                 SOFT    Software-based network processing                 SOFT    Software-based network processing
-        -q      Queue length and load average statistics [A_QUEUE]+        -q [ <keyword> [,...] | PSI | ALL ] 
 +                System load and pressure-stall statistics 
 +                Keywords are: 
 +                LOAD    Queue length and load average statistics [A_QUEUE
 +                CPU     Pressure-stall CPU statistics [A_PSI_CPU] 
 +                IO      Pressure-stall I/O statistics [A_PSI_IO] 
 +                MEM     Pressure-stall memory statistics [A_PSI_MEM]
         -r [ ALL ]         -r [ ALL ]
                 Memory utilization statistics [A_MEMORY]                 Memory utilization statistics [A_MEMORY]
Ligne 3385: Ligne 3389:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/udev/udev.conf+[root@redhat9 ~]# cat /etc/udev/udev.conf
 # see udev.conf(5) for details # see udev.conf(5) for details
 # #
Ligne 3391: Ligne 3395:
 # also want to rebuild the initrd, so that it will include the modified configuration. # also want to rebuild the initrd, so that it will include the modified configuration.
  
-#udev_log="info"+#udev_log=info 
 +#children_max= 
 +#exec_delay= 
 +#event_timeout=180 
 +#timeout_signal=SIGKILL 
 +#resolve_names=early
 </code> </code>
  
Ligne 3397: Ligne 3406:
  
 <code> <code>
-[root@centos8 ~]# ls /lib/udev/rules.d/ +[root@redhat9 ~]# ls /lib/udev/rules.d/ 
-01-md-raid-creating.rules              70-uaccess.rules +01-md-raid-creating.rules  60-persistent-alsa.rules               65-scsi-cciss_id.rules                70-uaccess.rules                   77-mm-nokia-port-types.rules     90-alsa-restore.rules 
-10-dm.rules                            70-wacom.rules +10-dm.rules                60-persistent-input.rules              66-kpartx.rules                       70-wacom.rules                     77-mm-qcom-soc.rules             90-bolt.rules 
-11-dm-lvm.rules                        71-biosdevname.rules +11-dm-lvm.rules            60-persistent-storage.rules            66-md-auto-readd.rules                71-nvmf-netapp.rules               77-mm-quectel-port-types.rules   90-fwupd-devices.rules 
-11-dm-mpath.rules                      71-nvmf-iopolicy-netapp.rules +11-dm-mpath.rules          60-persistent-storage-tape.rules       68-del-part-nodes.rules               71-prefixdevname.rules             77-mm-sierra.rules               90-iprutils.rules 
-11-dm-parts.rules                      71-prefixdevname.rules +11-dm-parts.rules          60-persistent-v4l.rules                69-cd-sensors.rules                   71-seat.rules                      77-mm-simtech-port-types.rules   90-libinput-fuzz-override.rules 
-13-dm-disk.rules                       71-seat.rules +13-dm-disk.rules           60-sensor.rules                        69-dm-lvm.rules                       73-seat-late.rules                 77-mm-telit-port-types.rules     90-nm-thunderbolt.rules 
-39-usbmuxd.rules                       73-idrac.rules +40-elevator.rules          60-serial.rules                        69-libmtp.rules                       75-net-description.rules           77-mm-tplink-port-types.rules    90-pipewire-alsa.rules 
-40-elevator.rules                      73-seat-late.rules +40-libgphoto2.rules        60-tpm-udev.rules                      69-md-clustered-confirm-device.rules  75-probe_mtd.rules                 77-mm-ublox-port-types.rules     90-vconsole.rules 
-40-libgphoto2.rules                    75-net-description.rules +40-redhat.rules            61-gdm.rules                           70-camera.rules                       77-mm-broadmobi-port-types.rules   77-mm-x22x-port-types.rules      91-drm-modeset.rules 
-40-redhat.rules                        75-probe_mtd.rules +40-usb-blacklist.rules     61-gnome-bluetooth-rfkill.rules        70-hypervfcopy.rules                  77-mm-cinterion-port-types.rules   77-mm-zte-port-types.rules       95-cd-devices.rules 
-40-usb-blacklist.rules                 75-rdma-description.rules +40-usb_modeswitch.rules    61-gnome-settings-daemon-rfkill.rules  70-hypervkvp.rules                    77-mm-dell-port-types.rules        78-sound-card.rules              95-dm-notify.rules 
-40-usb_modeswitch.rules                77-mm-cinterion-port-types.rules +50-udev-default.rules      61-mutter.rules                        70-hypervvss.rules                    77-mm-dlink-port-types.rules       80-drivers.rules                 95-upower-hid.rules 
-50-udev-default.rules                  77-mm-dell-port-types.rules +60-autosuspend.rules       61-scsi-sg3_id.rules                   70-joystick.rules                     77-mm-ericsson-mbm.rules           80-iio-sensor-proxy.rules        95-upower-wup.rules 
-60-alias-kmsg.rules                    77-mm-ericsson-mbm.rules +60-block.rules             62-multipath.rules                     70-libfprint-2.rules                  77-mm-fibocom-port-types.rules     80-libinput-device-groups.rules  98-kexec.rules 
-60-block.rules                         77-mm-fibocom-port-types.rules +60-cdrom_id.rules          63-fc-wwpn-id.rules                    70-memory.rules                       77-mm-foxconn-port-types.rules     80-mm-candidate.rules            99-qemu-guest-agent.rules 
-60-cdrom_id.rules                      77-mm-haier-port-types.rules +60-drm.rules               63-md-raid-arrays.rules                70-mouse.rules                        77-mm-gosuncn-port-types.rules     80-net-setup-link.rules          99-systemd.rules 
-60-drm.rules                           77-mm-huawei-net-port-types.rules +60-evdev.rules             63-scsi-sg3_symlink.rules              70-nvmf-autoconnect.rules             77-mm-haier-port-types.rules       80-udisks2.rules                 99-vmware-scsi-udev.rules 
-60-evdev.rules                         77-mm-longcheer-port-types.rules +60-fido-id.rules           64-btrfs.rules                         70-power-switch.rules                 77-mm-huawei-net-port-types.rules  81-net-dhcp.rules                README 
-60-fido-id.rules                       77-mm-mtk-port-types.rules +60_flashrom.rules          64-md-raid-assembly.rules              70-printers.rules                     77-mm-linktop-port-types.rules     84-nm-drivers.rules 
-60-input-id.rules                      77-mm-nokia-port-types.rules +60-input-id.rules          65-libwacom.rules                      70-spice-vdagentd.rules               77-mm-longcheer-port-types.rules   85-nm-unmanaged.rules 
-60-libfprint-2-autosuspend.rules       77-mm-pcmcia-device-blacklist.rules +60-net.rules               65-sane-backends.rules                 70-touchpad.rules                     77-mm-mtk-port-types.rules         85-regulatory.rules
-60-net.rules                           77-mm-quectel-port-types.rules +
-60-persistent-alsa.rules               77-mm-sierra.rules +
-60-persistent-input.rules              77-mm-simtech-port-types.rules +
-60-persistent-storage.rules            77-mm-telit-port-types.rules +
-60-persistent-storage-tape.rules       77-mm-ublox-port-types.rules +
-60-persistent-v4l.rules                77-mm-usb-device-blacklist.rules +
-60-raw.rules                           77-mm-usb-serial-adapters-greylist.rules +
-60-rdma-ndd.rules                      77-mm-x22x-port-types.rules +
-60-rdma-persistent-naming.rules        77-mm-zte-port-types.rules +
-60-sensor.rules                        78-sound-card.rules +
-60-serial.rules                        80-drivers.rules +
-60-tpm-udev.rules                      80-iio-sensor-proxy.rules +
-61-gdm.rules                           80-libinput-device-groups.rules +
-61-gnome-bluetooth-rfkill.rules        80-mm-candidate.rules +
-61-gnome-settings-daemon-rfkill.rules  80-net-setup-link.rules +
-61-scsi-sg3_id.rules                   80-udisks2.rules +
-62-multipath.rules                     81-kvm-rhel.rules +
-63-fc-wwpn-id.rules                    84-nm-drivers.rules +
-63-md-raid-arrays.rules                85-nm-unmanaged.rules +
-63-scsi-sg3_symlink.rules              85-regulatory.rules +
-64-btrfs.rules                         90-alsa-restore.rules +
-64-md-raid-assembly.rules              90-bolt.rules +
-65-libwacom.rules                      90-fwupd-devices.rules +
-65-md-incremental.rules                90-iprutils.rules +
-65-sane-backends.rules                 90-libinput-fuzz-override.rules +
-66-kpartx.rules                        90-nm-thunderbolt.rules +
-68-del-part-nodes.rules                90-pulseaudio.rules +
-69-btattach-bcm.rules                  90-rdma-hw-modules.rules +
-69-cd-sensors.rules                    90-rdma-ulp-modules.rules +
-69-dm-lvm-metad.rules                  90-rdma-umad.rules +
-69-libmtp.rules                        90-vconsole.rules +
-69-md-clustered-confirm-device.rules   91-drm-modeset.rules +
-70-hypervfcopy.rules                   95-cd-devices.rules +
-70-hypervkvp.rules                     95-dm-notify.rules +
-70-hypervvss.rules                     95-upower-csr.rules +
-70-joystick.rules                      95-upower-hid.rules +
-70-mouse.rules                         95-upower-wup.rules +
-70-nvmf-autoconnect.rules              98-kexec.rules +
-70-power-switch.rules                  99-qemu-guest-agent.rules +
-70-printers.rules                      99-systemd.rules +
-70-spice-vdagentd.rules                99-vmware-scsi-udev.rules +
-70-touchpad.rules+
 </code> </code>
  
Ligne 3470: Ligne 3437:
  
 <code> <code>
-[root@centos8 ~]# cat /lib/udev/rules.d/50-udev-default.rules | more+[root@redhat9 ~]# cat /lib/udev/rules.d/50-udev-default.rules | more
 # do not edit this file, it will be overwritten on update # do not edit this file, it will be overwritten on update
  
Ligne 3476: Ligne 3443:
 ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
 ACTION=="remove", GOTO="default_end" ACTION=="remove", GOTO="default_end"
 +
 +# The md driver increments diskseq *after* emitting 'change' uevent.
 +# Drop the line below if it is fixed on the kernel side.
 +SUBSYSTEM=="block", KERNEL=="md*", ENV{ID_IGNORE_DISKSEQ}="1"
  
 SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
Ligne 3485: Ligne 3456:
 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
 ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
 +
 +SUBSYSTEM=="net", IMPORT{builtin}="net_driver"
  
 ACTION!="add", GOTO="default_end" ACTION!="add", GOTO="default_end"
Ligne 3511: Ligne 3484:
 SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0666" SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0666"
 SUBSYSTEM=="kfd", GROUP="render", MODE="0666" SUBSYSTEM=="kfd", GROUP="render", MODE="0666"
 +
 +SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
 +SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660"
 +
 +# When using static_node= with non-default permissions, also update
 +# tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized.
  
 SUBSYSTEM=="sound", GROUP="audio", \ SUBSYSTEM=="sound", GROUP="audio", \
Ligne 3545: Ligne 3524:
  
 <code> <code>
-[root@centos8 ~]# udevadm info --query=all -n /dev/sda +[root@redhat9 ~]# udevadm info --query=all -n /dev/sda 
-P: /devices/pci0000:00/0000:00:07.0/ata3/host2/target2:0:0/2:0:0:0/block/sda+P: /devices/pci0000:00/0000:00:05.0/0000:01:01.0/virtio2/host0/target0:0:0/0:0:0:0/block/sda 
 +M: sda 
 +U: block 
 +T: disk 
 +D: b 8:0
 N: sda N: sda
-Sdisk/by-id/ata-QEMU_HARDDISK_QM00005 +L0 
-S: disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00005 +S: disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 
-S: disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00005 +S: disk/by-path/pci-0000:01:01.0-scsi-0:0:0:0 
-Sdisk/by-id/scsi-SATA_QEMU_HARDDISK_QM00005 +S: disk/by-diskseq/
-S: disk/by-path/pci-0000:00:07.0-ata-+Q: 1 
-E: DEVLINKS=/dev/disk/by-path/pci-0000:00:07.0-ata-1 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00005 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00005 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00005 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00005+E: DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:01:01.0/virtio2/host0/target0:0:0/0:0:0:0/block/sda
 E: DEVNAME=/dev/sda E: DEVNAME=/dev/sda
-E: DEVPATH=/devices/pci0000:00/0000:00:07.0/ata3/host2/target2:0:0/2:0:0:0/block/sda 
 E: DEVTYPE=disk E: DEVTYPE=disk
-E: ID_ATA=1 +E: DISKSEQ=1 
-E: ID_ATA_FEATURE_SET_SMART=1 +E: MAJOR=8 
-E: ID_ATA_FEATURE_SET_SMART_ENABLED=1 +E: MINOR=0 
-E: ID_ATA_SATA=1 +E: SUBSYSTEM=block 
-E: ID_ATA_WRITE_CACHE=1 +E: USEC_INITIALIZED=11296575 
-E: ID_ATA_WRITE_CACHE_ENABLED=1 +E: ID_SCSI=1 
-E: ID_BUS=ata+E: ID_VENDOR=QEMU 
 +E: ID_VENDOR_ENC=QEMU\x20\x20\x20\x20
 E: ID_MODEL=QEMU_HARDDISK E: ID_MODEL=QEMU_HARDDISK
 E: ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20 E: ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20
-E: ID_PART_TABLE_TYPE=dos 
-E: ID_PART_TABLE_UUID=b39ec5c8 
-E: ID_PATH=pci-0000:00:07.0-ata-1 
-E: ID_PATH_TAG=pci-0000_00_07_0-ata-1 
 E: ID_REVISION=2.5+ E: ID_REVISION=2.5+
-E: ID_SCSI=1 
-E: ID_SCSI_INQUIRY=1 
-E: ID_SERIAL=QEMU_HARDDISK_QM00005 
-E: ID_SERIAL_SHORT=QM00005 
 E: ID_TYPE=disk E: ID_TYPE=disk
-E: ID_VENDOR=ATA +E: ID_SERIAL=0QEMU_QEMU_HARDDISK_drive-scsi0 
-E: ID_VENDOR_ENC=ATA\x20\x20\x20\x20\x20 +E: ID_SERIAL_SHORT=drive-scsi0 
-E: MAJOR=8 +E: ID_BUS=scsi 
-E: MINOR=0 +E: ID_PATH=pci-0000:01:01.0-scsi-0:0:0:
-E: SCSI_IDENT_LUN_ATA=QEMU_HARDDISK_QM00005 +E: ID_PATH_TAG=pci-0000_01_01_0-scsi-0_0_0_0 
-E: SCSI_IDENT_LUN_T10=ATA_QEMU_HARDDISK_QM00005 +E: ID_PART_TABLE_UUID=d00dfc8a 
-E: SCSI_IDENT_LUN_VENDOR=QM00005 +E: ID_PART_TABLE_TYPE=dos 
-E: SCSI_IDENT_SERIAL=QM00005+E: SCSI_TPGS=
 +E: SCSI_TYPE=disk 
 +E: SCSI_VENDOR=QEMU 
 +E: SCSI_VENDOR_ENC=QEMU\x20\x20\x20\x20
 E: SCSI_MODEL=QEMU_HARDDISK E: SCSI_MODEL=QEMU_HARDDISK
 E: SCSI_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20 E: SCSI_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20
 E: SCSI_REVISION=2.5+ E: SCSI_REVISION=2.5+
-E: SCSI_TPGS=0 +E: ID_SCSI_INQUIRY=1 
-E: SCSI_TYPE=disk +E: SCSI_IDENT_LUN_VENDOR=drive-scsi0 
-E: SCSI_VENDOR=ATA +E: DEVLINKS=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 /dev/disk/by-path/pci-0000:01:01.0-scsi-0:0:0:0 /dev/disk/by-diskseq/1
-ESCSI_VENDOR_ENC=ATA\x20\x20\x20\x20\x20 +
-ESUBSYSTEM=block+
 E: TAGS=:systemd: E: TAGS=:systemd:
-E: USEC_INITIALIZED=8735808+E: CURRENT_TAGS=:systemd:
 </code> </code>
  
Ligne 3601: Ligne 3577:
  
 <code> <code>
-[root@centos8 ~]# udevadm --help+[root@redhat9 ~]# udevadm --help
 udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS] udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]
  
Ligne 3614: Ligne 3590:
   test          Test an event run   test          Test an event run
   test-builtin  Test a built-in command   test-builtin  Test a built-in command
 +  wait          Wait for device or device symlink
 +  lock          Lock a block device
 +
 +See the udevadm(8) man page for details.
  
-[root@centos8 ~]# udevadm info --help+[root@redhat9 ~]# udevadm info --help
 udevadm info [OPTIONS] [DEVPATH|FILE] udevadm info [OPTIONS] [DEVPATH|FILE]
  
Ligne 3628: Ligne 3608:
        property                 The device properties        property                 The device properties
        all                      All values        all                      All values
 +     --property=NAME          Show only properties by this name
 +     --value                  When showing properties, print only their values
   -p --path=SYSPATH           sysfs device path used for query or attribute walk   -p --path=SYSPATH           sysfs device path used for query or attribute walk
   -n --name=NAME              Node or symlink name used for query or attribute walk   -n --name=NAME              Node or symlink name used for query or attribute walk
Ligne 3633: Ligne 3615:
   -a --attribute-walk         Print all key matches walking along the chain   -a --attribute-walk         Print all key matches walking along the chain
                               of parent devices                               of parent devices
 +  -t --tree                   Show tree of devices
   -d --device-id-of-file=FILE Print major:minor of device containing this file   -d --device-id-of-file=FILE Print major:minor of device containing this file
   -x --export                 Export key/value pairs   -x --export                 Export key/value pairs
Ligne 3638: Ligne 3621:
   -e --export-db              Export the content of the udev database   -e --export-db              Export the content of the udev database
   -c --cleanup-db             Clean up the udev database   -c --cleanup-db             Clean up the udev database
 +  -w --wait-for-initialization[=SECONDS]
 +                              Wait for device to be initialized
 +     --no-pager               Do not pipe output into a pager
 </code> </code>
  
Ligne 3647: Ligne 3633:
  
 <code> <code>
-[root@centos8 ~]# ls -l /sys+[root@redhat9 ~]# ls -l /sys
 total 0 total 0
-drwxr-xr-x.   2 root root 0 Jul 12 08:15 block +drwxr-xr-x.   2 root root 0 Oct 22 15:36 block 
-drwxr-xr-x.  33 root root 0 Jul 12 08:15 bus +drwxr-xr-x.  36 root root 0 Oct 22 15:36 bus 
-drwxr-xr-x.  57 root root 0 Jul 12 08:15 class +drwxr-xr-x.  60 root root 0 Oct 22 15:36 class 
-drwxr-xr-x.   4 root root 0 Jul 12 08:15 dev +drwxr-xr-x.   4 root root 0 Oct 22 15:36 dev 
-drwxr-xr-x.  14 root root 0 Jul 12 08:15 devices +drwxr-xr-x.  16 root root 0 Oct 22 15:36 devices 
-drwxr-xr-x.   6 root root 0 Jul 12 08:15 firmware +drwxr-xr-x.   6 root root 0 Oct 22 15:36 firmware 
-drwxr-xr-x.   root root 0 Jul 12 08:15 fs +drwxr-xr-x.   root root 0 Oct 22 15:36 fs 
-drwxr-xr-x.   2 root root 0 Jul 12 08:15 hypervisor +drwxr-xr-x.   2 root root 0 Oct 22 16:13 hypervisor 
-drwxr-xr-x.  15 root root 0 Jul 12 08:15 kernel +drwxr-xr-x.  16 root root 0 Oct 22 15:36 kernel 
-drwxr-xr-x. 153 root root 0 Jul 12 08:15 module +drwxr-xr-x. 170 root root 0 Oct 22 15:36 module 
-drwxr-xr-x.   root root 0 Jul 12 08:15 power+drwxr-xr-x.   root root 0 Oct 22 15:36 power
 </code> </code>
  
Ligne 3684: Ligne 3670:
  
 <code> <code>
-[root@centos8 ~]# cat /sys/block/sda/sda1/size+[root@redhat9 ~]# cat /sys/block/sda/sda1/size
 2097152 2097152
 </code> </code>
Ligne 3690: Ligne 3676:
 Ce chiffre correspond aux nombre de secteurs. Ce chiffre correspond aux nombre de secteurs.
  
-=====LAB #- Limitation des ressources=====+=====LAB #- Limitation des ressources=====
  
-====4.1 - ulimit====+====5.1 - ulimit====
  
 Les ressources disponibles aux utilisateurs peuvent être limitées par l'utilisation de la commande **ulimit**.  Les ressources disponibles aux utilisateurs peuvent être limitées par l'utilisation de la commande **ulimit**. 
Ligne 3703: Ligne 3689:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/security/limits.conf+[root@redhat9 ~]# cat /etc/security/limits.conf
 # /etc/security/limits.conf # /etc/security/limits.conf
 # #
Ligne 3712: Ligne 3698:
 #which are read in alphabetical order, override the settings in this #which are read in alphabetical order, override the settings in this
 #file in case the domain is the same or more specific. #file in case the domain is the same or more specific.
-#That means for example that setting a limit for wildcard domain here +#That meansfor examplethat setting a limit for wildcard domain here 
-#can be overriden with a wildcard setting in a config file in the +#can be overridden with a wildcard setting in a config file in the 
-#subdirectory, but a user specific setting here can be overriden only+#subdirectory, but a user specific setting here can be overridden only
 #with a user specific setting in the subdirectory. #with a user specific setting in the subdirectory.
 # #
Ligne 3789: Ligne 3775:
  
 <code> <code>
-[root@centos8 ~]# ulimit -a +[root@redhat9 ~]# ulimit -a 
-core file size          (blocks, -c) unlimited +real-time non-blocking time  (microseconds, -R) unlimited 
-data seg size           (kbytes, -d) unlimited +core file size              (blocks, -c) 0 
-scheduling priority             (-e) 0 +data seg size               (kbytes, -d) unlimited 
-file size               (blocks, -f) unlimited +scheduling priority                 (-e) 0 
-pending signals                 (-i) 14702 +file size                   (blocks, -f) unlimited 
-max locked memory       (kbytes, -l) 64 +pending signals                     (-i) 30500 
-max memory size         (kbytes, -m) unlimited +max locked memory           (kbytes, -l) 8192 
-open files                      (-n) 1024 +max memory size             (kbytes, -m) unlimited 
-pipe size            (512 bytes, -p) 8 +open files                          (-n) 1024 
-POSIX message queues     (bytes, -q) 819200 +pipe size                (512 bytes, -p) 8 
-real-time priority              (-r) 0 +POSIX message queues         (bytes, -q) 819200 
-stack size              (kbytes, -s) 8192 +real-time priority                  (-r) 0 
-cpu time               (seconds, -t) unlimited +stack size                  (kbytes, -s) 8192 
-max user processes              (-u) 14702 +cpu time                   (seconds, -t) unlimited 
-virtual memory          (kbytes, -v) unlimited +max user processes                  (-u) 30500 
-file locks                      (-x) unlimited+virtual memory              (kbytes, -v) unlimited 
 +file locks                          (-x) unlimited
 </code> </code>
  
Ligne 3813: Ligne 3800:
  
 <code> <code>
-[root@centos8 ~]# help ulimit+[root@redhat9 ~]# help ulimit
 ulimit: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit] ulimit: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
     Modify shell resource limits.     Modify shell resource limits.
Ligne 3843: Ligne 3830:
       -x        the maximum number of file locks       -x        the maximum number of file locks
       -P        the maximum number of pseudoterminals       -P        the maximum number of pseudoterminals
 +      -R        the maximum time a real-time process can run before blocking
       -T        the maximum number of threads       -T        the maximum number of threads
          
Ligne 3861: Ligne 3849:
 </code> </code>
  
-====4.2 - Groupes de Contrôle====+====5.2 - Groupes de Contrôle====
  
 Les **Groupes de Contrôles** (//Control Groups//) aussi appelés **CGroups**, sont une façon de contrôler et de limiter des ressources. Les groupes de contrôle permettent l'allocation de ressources, même d'une manière dynamique pendant que le système fonctionne, telles le temps processeur, la mémoire système, la bande réseau, ou une combinaison de ces ressources parmi des groupes de tâches (processus) définis par l'utilisateur et exécutés sur un système. Les **Groupes de Contrôles** (//Control Groups//) aussi appelés **CGroups**, sont une façon de contrôler et de limiter des ressources. Les groupes de contrôle permettent l'allocation de ressources, même d'une manière dynamique pendant que le système fonctionne, telles le temps processeur, la mémoire système, la bande réseau, ou une combinaison de ces ressources parmi des groupes de tâches (processus) définis par l'utilisateur et exécutés sur un système.
  
-Les groupes de contrôle sont organisés de manière hiérarchique, comme des processus. Par contre, la comparaison entre les deux démontre que tandis que les processus se trouvent dans une arborescence unique descandant tous du processus init et héritant de l'environnement de leurs parents, les contrôles groupes peuvent être multiples donnant lieu à des arborescences ou **hiérarchies** multiples qui héritent de certains attributs de leurs groupes de contrôle parents.+Les groupes de contrôle v1 sont organisés de manière hiérarchique, comme des processus. Par contre, la comparaison entre les deux démontre que tandis que les processus se trouvent dans une arborescence unique descandant tous du processus init et héritant de l'environnement de leurs parents, les contrôles groupes peuvent être multiples donnant lieu à des arborescences ou **hiérarchies** multiples qui héritent de certains attributs de leurs groupes de contrôle parents.
  
-Ces hiérarchies multiples et séparés sont necéssaires parce que chaque hiérarchie est attaché à un ou plusieurs **sous-système(s)** aussi appelés des **Contrôleurs de Ressources** ou simplement des **Contrôleurs**. Les contrôleurs disponibles sous RHEl/CentOS 7 sont :+Ces hiérarchies multiples et séparés sont necéssaires parce que chaque hiérarchie est attaché à un ou plusieurs **sous-système(s)** aussi appelés des **Contrôleurs de Ressources** ou simplement des **Contrôleurs**. Les contrôleurs disponibles sont :
  
   * **blkio** - utilisé pour établir des limites sur l'accès des entrées/sorties à partir et depuis des périphériques blocs,   * **blkio** - utilisé pour établir des limites sur l'accès des entrées/sorties à partir et depuis des périphériques blocs,
Ligne 3880: Ligne 3868:
   * **hugetlb** - utilisé pour limiter des ressources sur des pages de mémoire virtuelle de grande taille.   * **hugetlb** - utilisé pour limiter des ressources sur des pages de mémoire virtuelle de grande taille.
  
-Pour visualiser les hiérarchiesil convient d'utiliser la commande **lssubsys** :+A l'opposé des cgroups v1cgroup v2 n'a qu'une seule arborescence ou hiérarchie et donc un seul point de montage. Tous les contrôleurs compatibles v2 qui ne sont pas liés à une hiérarchie v1 sont automatiquement liés à la hiérarchie v2. Un contrôleur inactif dans la hiérarchie v2 peut être lié à un autre hiérarchie. La migration d'un contrôleur d'une hiérarchie à une autre hiérarchie n'est possible que dans le cas où le contrôleur est désactivé et n'est plus référencé dans la hiérarchie d'origine. 
 + 
 +Pour vérifier l'utilisation de cgroups v2, il convient de visualiser le point de montage :
  
 <code> <code>
-[root@centos8 ~]# lssubsys -am +[root@redhat9 ~]# mount -l | grep cgroup 
-bash: lssubsys: command not found... +cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot) 
-Install package 'libcgroup-tools' to provide command 'lssubsys'? [N/y] y+</code>
  
 +et de consulter le contenu de ce point de montage :
  
- * Waiting in queue...  +<code> 
-The following packages have to be installed+[root@redhat9 ~]# ls -l /sys/fs/cgroup/ 
- libcgroup-0.41-19.el8.x86_64   Library to control and monitor control groups +total 0 
- libcgroup-tools-0.41-19.el8.x86_64     Command-line utility programs, services and daemons for libcgroup +-r--r--r--.  1 root root 0 Oct 22 15:36 cgroup.controllers 
-Proceed with changes? [N/y] y +-rw-r--r-- 1 root root 0 Oct 23 13:46 cgroup.max.depth 
- +-rw-r--r--.  1 root root 0 Oct 23 13:46 cgroup.max.descendants 
- +-rw-r--r--.  1 root root Oct 22 15:36 cgroup.procs 
- * Waiting in queue...  +-r--r--r--.  1 root root 0 Oct 23 13:46 cgroup.stat 
- * Waiting for authentication...  +-rw-r--r--.  1 root root Oct 23 13:09 cgroup.subtree_control 
- * Waiting in queue...  +-rw-r--r--.  1 root root 0 Oct 23 13:46 cgroup.threads 
- * Downloading packages...  +-r--r--r-- 1 root root 0 Oct 23 13:46 cpuset.cpus.effective 
- * Requesting data...  +-r--r--r-- 1 root root 0 Oct 23 13:46 cpuset.cpus.isolated 
- * Testing changes...  +-r--r--r-- 1 root root 0 Oct 23 13:46 cpuset.mems.effective 
- * Installing packages...  +-r--r--r-- 1 root root 0 Oct 23 13:46 cpu.stat 
-cpuset /sys/fs/cgroup/cpuset +drwxr-xr-x 2 root root 0 Oct 22 15:36 dev-hugepages.mount 
-cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct +drwxr-xr-x.  2 root root 0 Oct 22 15:36 dev-mqueue.mount 
-blkio /sys/fs/cgroup/blkio +drwxr-xr-x 2 root root 0 Oct 22 15:36 init.scope 
-memory /sys/fs/cgroup/memory +-r--r--r--.  1 root root 0 Oct 23 13:46 io.stat 
-devices /sys/fs/cgroup/devices +-r--r--r-- 1 root root 0 Oct 23 13:46 memory.numa_stat 
-freezer /sys/fs/cgroup/freezer +--w-------.  1 root root 0 Oct 23 13:46 memory.reclaim 
-net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio +-r--r--r--.  1 root root 0 Oct 23 13:46 memory.stat 
-perf_event /sys/fs/cgroup/perf_event +-r--r--r--.  1 root root 0 Oct 23 13:46 misc.capacity 
-hugetlb /sys/fs/cgroup/hugetlb +-r--r--r--.  1 root root 0 Oct 23 13:46 misc.current 
-pids /sys/fs/cgroup/pids +drwxr-xr-x.  2 root root 0 Oct 22 15:36 sys-fs-fuse-connections.mount 
-rdma /sys/fs/cgroup/rdma+drwxr-xr-x.  2 root root 0 Oct 22 15:36 sys-kernel-config.mount 
 +drwxr-xr-x.  2 root root 0 Oct 22 15:36 sys-kernel-debug.mount 
 +drwxr-xr-x.  2 root root 0 Oct 22 15:36 sys-kernel-tracing.mount 
 +drwxr-xr-x. 37 root root 0 Oct 23 13:46 system.slice 
 +drwxr-xr-x.  4 root root 0 Oct 23 12:40 user.slice
 </code> </code>
  
-<code> +Sous RedHat 9, **Systemd** organise les processus dans chaque CGroup. Par exemple tous les processus démarrés par le serveur Apache se trouveront dans le même CGroup, y compris les scripts CGI. Ceci implique que la gestion des ressources en utilisant des hiérarchies est couplé avec l'arborescence des unités de Systemd.
-[root@centos8 ~]# lssubsys -am +
-cpuset /sys/fs/cgroup/cpuset +
-cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct +
-blkio /sys/fs/cgroup/blkio +
-memory /sys/fs/cgroup/memory +
-devices /sys/fs/cgroup/devices +
-freezer /sys/fs/cgroup/freezer +
-net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio +
-perf_event /sys/fs/cgroup/perf_event +
-hugetlb /sys/fs/cgroup/hugetlb +
-pids /sys/fs/cgroup/pids +
-rdma /sys/fs/cgroup/rdma +
-</code>  +
- +
-Sous RHEL/CentOS 8, **Systemd** organise les processus dans chaque CGroup. Par exemple tous les processus démarrés par le serveur Apache se trouveront dans le même CGroup, y compris les scripts CGI. Ceci implique que la gestion des ressources en utilisant des hiérarchies est couplé avec l'arborescence des unités de Systemd.+
  
 En haut de l'arborescence des unités de Systemd se trouve la tranche root - **-.slice**, dont dépend : En haut de l'arborescence des unités de Systemd se trouve la tranche root - **-.slice**, dont dépend :
Ligne 3946: Ligne 3926:
  
 <code> <code>
-[root@centos8 ~]# systemctl list-units --type=slice +[root@redhat9 ~]# systemctl list-units --type=slice 
-UNIT                                        LOAD   ACTIVE SUB    DESCRIPTION                                 +  UNIT                                        LOAD   ACTIVE SUB    DESCRIPTION                            
--.slice                                     loaded active active Root Slice                                  +  -.slice                                     loaded active active Root Slice 
-machine.slice                               loaded active active Virtual Machine and Container Slice         +  system-getty.slice                          loaded active active Slice /system/getty 
-system-getty.slice                          loaded active active system-getty.slice                          +  system-modprobe.slice                       loaded active active Slice /system/modprobe 
-system-lvm2\x2dpvscan.slice                 loaded active active system-lvm2\x2dpvscan.slice                 +  system-sshd\x2dkeygen.slice                 loaded active active Slice /system/sshd-keygen 
-system-sshd\x2dkeygen.slice                 loaded active active system-sshd\x2dkeygen.slice                 +  system-systemd\x2dhibernate\x2dresume.slice loaded active active Slice /system/systemd-hibernate-resume 
-system-systemd\x2dfsck.slice                loaded active active system-systemd\x2dfsck.slice                +  system.slice                                loaded active active System Slice 
-system-systemd\x2dhibernate\x2dresume.slice loaded active active system-systemd\x2dhibernate\x2dresume.slice +  user-1000.slice                             loaded active active User Slice of UID 1000 
-system-user\x2druntime\x2ddir.slice         loaded active active system-user\x2druntime\x2ddir.slice         +  user-42.slice                               loaded active active User Slice of UID 42 
-system-vncserver.slice                      loaded active active system-vncserver.slice                      +  user.slice                                  loaded active active User and Session Slice
-system.slice                                loaded active active System Slice                                +
-user-1000.slice                             loaded active active User Slice of UID 1000                      +
-user-42.slice                               loaded active active User Slice of UID 42                        +
-user.slice                                  loaded active active User and Session Slice                     +
  
 LOAD   = Reflects whether the unit definition was properly loaded. LOAD   = Reflects whether the unit definition was properly loaded.
 ACTIVE = The high-level unit activation state, i.e. generalization of SUB. ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
 SUB    = The low-level unit activation state, values depend on unit type. SUB    = The low-level unit activation state, values depend on unit type.
- +loaded units listed. Pass --all to see loaded but inactive units, too.
-13 loaded units listed. Pass --all to see loaded but inactive units, too.+
 To show all installed unit files use 'systemctl list-unit-files'. To show all installed unit files use 'systemctl list-unit-files'.
 </code> </code>
Ligne 3973: Ligne 3948:
  
 <code> <code>
-[root@centos8 ~]# systemd-cgls+[root@redhat9 ~]# systemd-cgls | more
 Control group /: Control group /:
 -.slice -.slice
-├─user.slice +├─user.slice (#1202) 
-│ ├─user-42.slice +│ → user.invocation_id: f644c59b13764d598a66e47b9f64fdd8 
-│ │ ├─session-c1.scope +│ → trusted.invocation_id: f644c59b13764d598a66e47b9f64fdd8 
-│ │ │ ├─1317 gdm-session-worker [pam/gdm-launch-environment] +│ ├─user-42.slice (#4140) 
-│ │ │ ├─1459 /usr/libexec/gdm-wayland-session --register-session gnome-session --autostart /usr/share/gdm/greeter/autostart +│ │ → user.invocation_id: a6d1a9aebb5f4d4d97c358cffc55c31c 
-│ │ │ ├─1856 /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart +│ │ → trusted.invocation_id: a6d1a9aebb5f4d4d97c358cffc55c31c 
-│ │ │ ├─1882 /usr/bin/gnome-shell +│ │ ├─session-c1.scope (#4392) 
-│ │ │ ├─2059 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6 +│ │ │ → user.invocation_id: a63e3d93bdf0417b9448307698944a77 
-│ │ │ ├─2132 ibus-daemon --xim --panel disable +│ │ │ → trusted.invocation_id: a63e3d93bdf0417b9448307698944a77 
-│ │ │ ├─2135 /usr/libexec/ibus-dconf +│ │ │ ├─1036 gdm-session-worker [pam/gdm-launch-environment] 
-│ │ │ ├─2138 /usr/libexec/ibus-x11 --kill-daemon +│ │ │ ├─1626 /usr/libexec/gdm-wayland-session --register-session dbus-run-sessi… 
-│ │ │ ├─2251 /usr/libexec/gsd-xsettings +│ │ │ ├─1631 dbus-run-session -- gnome-session --autostart /usr/share/gdm/greet… 
-│ │ │ ├─2261 /usr/libexec/gsd-a11y-settings +│ │ │ ├─1632 dbus-daemon --nofork --print-address 4 --session 
-│ │ │ ├─2268 /usr/libexec/gsd-clipboard +│ │ │ ├─1633 /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greet… 
-│ │ │ ├─2271 /usr/libexec/gsd-color +│ │ │ ├─1641 /usr/bin/gnome-shell 
-│ │ │ ├─2272 /usr/libexec/gsd-datetime +│ │ │ ├─1660 /usr/libexec/at-spi-bus-launcher 
-│ │ │ ├─2273 /usr/libexec/gsd-housekeeping +│ │ │ ├─1665 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/acc… 
-│ │ │ ├─2274 /usr/libexec/gsd-keyboard +│ │ │ ├─1671 /usr/bin/Xwayland :1024 -rootless -noreset -accessx -core -auth /r… 
-│ │ │ ├─2275 /usr/libexec/gsd-media-keys +│ │ │ ├─1678 /usr/libexec/xdg-permission-store 
-│ │ │ ├─2280 /usr/libexec/gsd-mouse +│ │ │ ├─1741 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifications 
-│ │ │ ├─2281 /usr/libexec/gsd-power +│ │ │ ├─1743 /usr/libexec/at-spi2-registryd --use-gnome-session 
-│ │ │ ├─2283 /usr/libexec/gsd-print-notifications +│ │ │ ├─1747 /usr/libexec/gsd-sharing 
-│ │ │ ├─2284 /usr/libexec/gsd-rfkill +│ │ │ ├─1749 /usr/libexec/gsd-wacom 
-│ │ │ ├─2285 /usr/libexec/gsd-screensaver-proxy +│ │ │ ├─1752 /usr/libexec/gsd-color 
-│ │ │ ├─2290 /usr/libexec/gsd-sharing +│ │ │ ├─1753 /usr/libexec/gsd-keyboard 
-│ │ │ ├─2321 /usr/libexec/gsd-smartcard +│ │ │ ├─1754 /usr/libexec/gsd-print-notifications 
-│ │ │ ├─2328 /usr/libexec/gsd-sound +│ │ │ ├─1755 /usr/libexec/gsd-rfkill 
-│ │ │ ├─2333 /usr/libexec/gsd-wacom +│ │ │ ├─1756 /usr/libexec/gsd-smartcard 
-│ │ │ 2432 /usr/libexec/ibus-engine-simple +│ │ │ ├─1757 /usr/libexec/gsd-datetime 
-│ │ └─user@42.service +│ │ │ ├─1758 /usr/libexec/gsd-media-keys 
-│ │   ├─xdg-permission-store.service +│ │ │ ├─1759 /usr/libexec/gsd-screensaver-proxy 
-│ │   │ └─2170 /usr/libexec/xdg-permission-store +│ │ │ ├─1764 /usr/libexec/gsd-sound 
-│ │   ├─pulseaudio.service +│ │ │ 1765 /usr/libexec/gsd-a11y-settings 
-│ │   │ └─1455 /usr/bin/pulseaudio --daemonize=no --log-target=journal +│ │ │ ├─1766 /usr/libexec/gsd-housekeeping 
-│ │   ├─init.scope +│ │ │ ├─1767 /usr/libexec/gsd-power 
-│ │   │ ├─1357 /usr/lib/systemd/systemd --user +│ │ │ ├─1887 /usr/libexec/gsd-printer 
-│ │   │ └─1377 (sd-pam) +│ │ │ ├─2038 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver 
-│ │   ├─at-spi-dbus-bus.service +│ │ │ ├─2042 ibus-daemon --panel disable ---xim 
-│ │   │ ├─2090 /usr/libexec/at-spi-bus-launcher +│ │ │ ├2053 /usr/libexec/ibus-dconf 
-│ │   │ ├─2095 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 +│ │ │ ├─2055 /usr/libexec/ibus-x11 --kill-daemon 
-│ │   │ └─2098 /usr/libexec/at-spi2-registryd --use-gnome-session +│ │ │ 2060 /usr/libexec/ibus-portal 
-│ │   └─dbus.service +│ │ │ └─2081 /usr/libexec/ibus-engine-simple 
-│ │     ├─1755 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only +│ │ user@42.service … (#4212) 
-│ │     └2143 /usr/libexec/ibus-portal +│ │   → user.delegate: 1 
-│ └─user-1000.slice +│ │   → trusted.delegate: 1 
-│   ├─user@1000.service +│ │   → user.invocation_id: fbec37f4c0ef4488990208d436f2aeb8 
-│   │ ├─gvfs-goa-volume-monitor.service +│ │   → trusted.invocation_id: fbec37f4c0ef4488990208d436f2aeb8 
-│   │ │ └─2369 /usr/libexec/gvfs-goa-volume-monitor +│ │   ├─session.slice (#4509
-│   │ ├─xdg-permission-store.service +│ │   │ ├─pipewire-pulse.service (#4617) 
-│   │ │ 2191 /usr/libexec/xdg-permission-store +│ │   │ │ 1696 /usr/bin/pipewire-pulse 
-│   │ ├─tracker-store.service +│ │   │ ├─wireplumber.service (#4581) 
-│   │ │ └─2653 /usr/libexec/tracker-store +│ │   │ │ 1695 /usr/bin/wireplumber 
-│   │ evolution-calendar-factory.service +│ │   │ └─pipewire.service (#4545) 
-│   │ │ ├─2605 /usr/libexec/evolution-calendar-factory +--More--
-│   │ │ └─2706 /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2605x2 --own-path /org/gnome/evolution> +
-│   │ ├─pulseaudio.service +
-│   │ │ └─1456 /usr/bin/pulseaudio --daemonize=no --log-target=journal +
-│   │ ├─gvfs-daemon.service +
-│   │ │ ├─1896 /usr/libexec/gvfsd +
-│   │ │ └─1901 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes +
-│   │ ├─evolution-source-registry.service +
-│   │ │ └─2206 /usr/libexec/evolution-source-registry +
-│   │ ├─gvfs-udisks2-volume-monitor.service +
-│   │ │ └─2243 /usr/libexec/gvfs-udisks2-volume-monitor +
-│   │ ├─init.scope +
-│   │ │ ├─1239 /usr/lib/systemd/systemd --user +
-│   │ │ └─1318 (sd-pam+
-│   │ ├─gvfs-gphoto2-volume-monitor.service +
-│   │ │ └─2269 /usr/libexec/gvfs-gphoto2-volume-monitor +
-│   │ ├─at-spi-dbus-bus.service +
-│   │ │ ├─1964 /usr/libexec/at-spi-bus-launcher +
-│   │ │ 1969 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 +
-│   │ │ └─1972 /usr/libexec/at-spi2-registryd --use-gnome-session +
-│   │ ├─dbus.service +
-│   │ │ 1786 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only +
-│   │ │ ├─2183 /usr/libexec/ibus-portal +
-│   │ │ ├─2201 /usr/libexec/gnome-shell-calendar-server +
-│   │ │ ├─2225 /usr/libexec/goa-daemon +
-│   │ │ ├─2397 /usr/libexec/goa-identity-service +
-│   │ │ └─2721 /usr/libexec/dconf-service +
-│   │ ├─evolution-addressbook-factory.service +
-│   │ │ ├─2727 /usr/libexec/evolution-addressbook-factory +
-│   │ │ └─2771 /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx2727x2 --own-path /org/gnome/evo> +
-│   │ ├─gvfs-mtp-volume-monitor.service +
-lines 44-86+
 </code> </code>
  
 En utilisant Systemd, plusieurs ressources peuvent être limitées : En utilisant Systemd, plusieurs ressources peuvent être limitées :
  
-  * **CPUShares** - par défault 1024,+  * **CPUWeight** - par défault 1024,
   * **MemoryLimit** - limite exprimée en Mo ou en Go. Pas de valeur par défaut,   * **MemoryLimit** - limite exprimée en Mo ou en Go. Pas de valeur par défaut,
   * **BlockIOWeight** - valeur entre 10 et 1000. Pas de valeur par défaut,   * **BlockIOWeight** - valeur entre 10 et 1000. Pas de valeur par défaut,
-  * **StartupCPUShares** - comme CPUShares mais uniquement appliqué pendant le démarrage,+  * **StartupCPUWeight** - comme CPUShares mais uniquement appliqué pendant le démarrage,
   * **StartupBlockIOWeight** - comme BlockIOWeight mais uniquement appliqué pendant le démarrage,   * **StartupBlockIOWeight** - comme BlockIOWeight mais uniquement appliqué pendant le démarrage,
   * **CPUQuota** - utilisé pour limiter le temps CPU, même quand le système ne fait rien.   * **CPUQuota** - utilisé pour limiter le temps CPU, même quand le système ne fait rien.
Ligne 4076: Ligne 4020:
 </WRAP> </WRAP>
  
-===Limitation de la Mémoire===+Commencez par créer le cgroup enfant **pids** dans le cgroup racine :
  
-Commencez par créer le script **hello-world.sh** qui servira à générer un processus pour travailler avec les CGroups :+<code> 
 +[root@redhat9 ~]# mkdir /sys/fs/cgroup/pids 
 +</code> 
 + 
 +Placez le PID du terminal courant dans le fichier **cgroup.procs** du cgroup enfant :
  
 <code> <code>
-[root@centos8 ~]# vi hello-world.sh +[root@redhat9 ~]# echo $$ 
-[root@centos8 ~]# cat hello-world.sh +78735 
-#!/bin/bash +[root@redhat9 ~]# echo $$ > /sys/fs/cgroup/pids/cgroup.procs
-while [ 1 ]; do +
-        echo "hello world" +
-        sleep 360 +
-done+
 </code> </code>
  
-Rendez le script exécutable et testez-le :+Contrôlez maintenant le contenu du fichier cgroup.procs ainsi que le nombre de PIDs dans le cgroup **pids** :
  
 <code> <code>
-[root@centos8 ~]# chmod u+x hello-world.sh +[root@redhat9 ~]# cat /sys/fs/cgroup/pids/cgroup.procs 
-[root@centos8 ~]# ./hello-world.sh +78735 
-hello world +81077 
-^C+ 
 +[root@redhat9 ~]# cat /sys/fs/cgroup/pids/pids.current 
 +2
 </code> </code>
  
-Créez maintenant un CGroup dans le sous-système **memory** appelé **helloworld** :+<WRAP center round important > 
 +**Important** - Notez que le fichier cgroup.procs contient **deux** PIDs. Le premier est celui du Shell tandis que le deuxième est celui de la commande cat. 
 +</WRAP> 
 + 
 +Injectez maintenant la valeur de **5** dans le fichier **pids.max** du cgroup ** pids** :
  
 <code> <code>
-[root@centos8 ~]# mkdir /sys/fs/cgroup/memory/helloworld+[root@redhat9 ~]# echo 5 > /sys/fs/cgroup/pids/pids.max
 </code> </code>
  
-Par défaut, ce CGroup héritera de l'ensemble de la mémoire disponible. Pour éviter cela, créez maintenant une limite de **40000000** octets pour ce CGroup :+Lancez la commande suivante pour créer 6 pids dans le cgroup :
  
 <code> <code>
-[root@centos8 ~]# echo 40000000 > /sys/fs/cgroup/memory/helloworld/memory.limit_in_bytes +[root@redhat9 ~]# for a in $(seq 1 5); do sleep 60 & done 
-[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld/memory.limit_in_bytes +[181126 
-39997440+[2] 81127 
 +[3] 81128 
 +[4] 81129 
 +-bash: fork: retry: Resource temporarily unavailable 
 +-bash: fork: retry: Resource temporarily unavailable 
 +-bash: fork: retry: Resource temporarily unavailable 
 +-bash: fork: retry: Resource temporarily unavailable 
 +-bash: fork: Resource temporarily unavailable
 </code> </code>
  
-<WRAP center round important 60%+<WRAP center round important > 
-**Important** - Notez que les 40 000 000 demandés sont devenus 39 997 440 ce qui correspond à un nombre entier de pages mémoire du noyau de 4Ko( 39 997 440 / 4096 = 9 765 ).+**Important** - Notez qu'à la tentative de création du 6ème processus, une erreur est retournéeLe système tente ensuite 4 fois de plus puis renonce finalement avec le message d'erreur **-bash: fork: Resource temporarily unavailable**.
 </WRAP> </WRAP>
  
-Lancez maintenant le script **helloworld.sh** : +Dernièrement, essayez de supprimer le cgroup **pids** :
  
 <code> <code>
-[root@centos8 ~]# ./hello-world.sh & +[root@redhat9 ~]# rmdir /sys/fs/cgroup/pids 
-[1] 35148+rmdir: failed to remove '/sys/fs/cgroup/pids': Device or resource busy 
 +[1]   Done                    sleep 60 
 +[2]   Done                    sleep 60 
 +[3]-  Done                    sleep 60 
 +[4]+  Done                    sleep 60 
 +</code>
  
-[root@centos8 ~]# hello world +<WRAP center round important > 
-[Entrée]+**Important** - Notez qu'il n'est pas possible de supprimer un cgroup tant que celui-ci contient un processus. 
 +</WRAP>
  
-[root@centos8 ~]# ps aux | grep hello-world +Déplacez le processus du terminal courant dans le cgroup racine : 
-root       35148  0.0  0.0  12724  2980 pts/1    S    08:48   0:00 /bin/bash ./hello-world.sh + 
-root       35151  0.0  0.0  12136  1044 pts/1    S+   08:48   0:00 grep --color=auto hello-world+<code> 
 +[root@redhat9 ~]# echo $$ > /sys/fs/cgroup/cgroup.procs
 </code> </code>
  
-Notez qu'il n'y a pas de limite de la mémoire, ce qui implique l'héritage par défaut :+Il est maintenant possible de supprimer le cgroup **pids** :
  
 <code> <code>
-[root@centos8 ~]# ps -ww -o cgroup 35148 +[root@redhat9 ~]# rmdir /sys/fs/cgroup/pids 
-CGROUP +[root@redhat9 ~]#
-12:memory:/user.slice/user-1000.slice/session-7.scope,7:devices:/user.slice,4:pids:/user.slice/user-1000.slice/session-7.scope,2:blkio:/user.slice,1:name=systemd:/user.slice/user-1000.slice/session-7.scope+
 </code> </code>
  
-Insérer le PID de notre script dans le CGroup **helloworld** :+Il existe deux façons de limiter les ressources de la CPU : 
 + 
 +  * **CPU bandwidth**, 
 +    * un système de limitation basé sur un pourcentage de CPU pour un ou plusieurs processus, 
 +  * **CPU weight**, 
 +    * un système de limitation basé sur la prioritisassion d'un ou de plusieurs processus par rapports aux autres processus. 
 + 
 +Dans l'exemple suivant, vous allez mettre en place une limite de type **CPU bandwidth**. 
 + 
 +Commencez par créer un service appelé **foo** :
  
 <code> <code>
-[root@centos8 ~]# echo 35148 > /sys/fs/cgroup/memory/helloworld/cgroup.procs+[root@redhat9 ~]# vi /lib/systemd/system/foo.service 
 +[root@redhat9 ~]# cat /lib/systemd/system/foo.service 
 +[Unit] 
 +Description=The foo service that does nothing useful 
 +After=remote-fs.target nss-lookup.target 
 + 
 +[Service] 
 +ExecStart=/usr/bin/sha1sum /dev/zero  
 +ExecStop=/bin/kill -WINCH ${MAINPID} 
 + 
 +[Install] 
 +WantedBy=multi-user.target
 </code> </code>
  
-Notez maintenant l'héritage de la limitation de la mémoire - **12:memory:/helloworld** :+Démarrez et activez le service :
  
 <code> <code>
-[root@centos8 ~]# ps -ww -o cgroup 35148 +[root@redhat9 ~]# systemctl enable --now foo.service 
-CGROUP +Created symlink /etc/systemd/system/multi-user.target.wants/foo.service → /usr/lib/systemd/system/foo.service. 
-12:memory:/helloworld,7:devices:/user.slice,4:pids:/user.slice/user-1000.slice/session-7.scope,2:blkio:/user.slice,1:name=systemd:/user.slice/user-1000.slice/session-7.scope+ 
 +[root@redhat9 ~]# systemctl status foo.service 
 +● foo.service - The foo service that does nothing useful 
 +     Loadedloaded (/usr/lib/systemd/system/foo.service; enabled; preset: disabled) 
 +     Active: active (running) since Wed 2024-10-23 13:59:27 CEST; 10s ago 
 +   Main PID: 81361 (sha1sum) 
 +      Tasks: (limit48800) 
 +     Memory: 808.0K 
 +        CPU: 10.270s 
 +     CGroup: /system.slice/foo.service 
 +             └─81361 /usr/bin/sha1sum /dev/zero 
 + 
 +Oct 23 13:59:27 redhat9.ittraining.loc systemd[1]: Started The foo service that does nothing useful.
 </code> </code>
  
-Constatez ensuite l'occupation mémoire réelle :+Utilisez la commande **ps** pour voir le pourcentage de la CPU utilisé par ce service :
  
 <code> <code>
-[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld/memory.usage_in_bytes +[root@redhat9 ~]# ps -p 81361 -o pid,comm,cputime,%cpu 
-274432+    PID COMMAND             TIME %CPU 
 +  81361 sha1sum         00:00:50 99.3
 </code> </code>
  
-Tuez le script **hello-world.sh** : +Créez maintenant un autre service dénommé **bar** :
  
 <code> <code>
-[root@centos8 ~]# kill 35148 +[root@redhat9 ~]# vi /lib/systemd/system/bar.service 
-[root@centos8 ~]# ps aux | grep hello-world +[root@redhat9 ~]# cat /lib/systemd/system/bar.service 
-root       35307  0.0  0.0  12136  1112 pts/1    S+   08:55   0:00 grep --color=auto hello-world +[Unit] 
-[1]+  Terminated              ./hello-world.sh+Description=The bar service that does nothing useful 
 +After=remote-fs.target nss-lookup.target 
 + 
 +[Service] 
 +ExecStart=/usr/bin/md5sum /dev/zero  
 +ExecStop=/bin/kill -WINCH ${MAINPID} 
 + 
 +[Install] 
 +WantedBy=multi-user.target
 </code> </code>
  
-Créez un second CGroup beaucoup plus restrictif :+Démarrez et activez le service :
  
 <code> <code>
-[root@centos8 ~]# mkdir /sys/fs/cgroup/memory/helloworld1 +[root@redhat9 ~]# systemctl enable --now bar.service 
-[root@centos8 ~]# echo 6000 > /sys/fs/cgroup/memory/helloworld1/memory.limit_in_bytes +Created symlink /etc/systemd/system/multi-user.target.wants/bar.service → /usr/lib/systemd/system/bar.service. 
-[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld1/memory.limit_in_bytes + 
-4096+[root@redhat9 ~]# systemctl status bar.service 
 +● bar.service - The bar service that does nothing useful 
 +     Loaded: loaded (/usr/lib/systemd/system/bar.service; enabled; preset: disabled) 
 +     Active: active (running) since Wed 2024-10-23 14:01:46 CEST; 21s ago 
 +   Main PID: 81448 (md5sum) 
 +      Tasks: 1 (limit: 48800) 
 +     Memory: 808.0K 
 +        CPU: 21.195s 
 +     CGroup: /system.slice/bar.service 
 +             └─81448 /usr/bin/md5sum /dev/zero 
 + 
 +Oct 23 14:01:46 redhat9.ittraining.loc systemd[1]: Started The bar service that does nothing useful.
 </code> </code>
  
-Relancez le script **hello-world.sh** et insérez-le dans le nouveau CGroup :+Utilisez la commande **ps** pour voir le pourcentage de la CPU utilisé par ce service :
  
 <code> <code>
-[root@centos8 ~]# ./hello-world.sh & +[root@redhat9 ~]# ps -p 81448 -o pid,comm,cputime,%cpu 
-[1] 35389+    PID COMMAND             TIME %CPU 
 +  81448 md5sum          00:01:34 99.1 
 +</code>
  
-[root@centos8 ~]# hello world +Vérifiez maintenant la présence des contrôleurs **cpuset** et **cpu** dans l'arborescence du cgroup racine qui est monté à **/sys/fs/cgroup/** :
-[Entrée]+
  
-[root@centos8 ~]# echo 35389 > /sys/fs/cgroup/memory/helloworld1/cgroup.procs+<code> 
 +[root@redhat9 ~]# cat /sys/fs/cgroup/cgroup.controllers 
 +cpuset cpu io memory hugetlb pids rdma misc          
 </code> </code>
  
-Attendez la prochaine sortie de **hello world** sur le canal standard puis constatez que le script s'arrête :+Activez maintenant le contrôleur **cpuset** :
  
 <code> <code>
-[root@centos8 ~]# hello world +[root@redhat9 ~]# cat /sys/fs/cgroup/cgroup.subtree_control 
-[Entrée] +cpu io memory pids
-[1]+  Killed                  ./hello-world.sh +
-</code>+
  
-===La Commande cgcreate===+[root@redhat9 ~]# echo "+cpuset" >> /sys/fs/cgroup/cgroup.subtree_control
  
-Cette commande permet la création d'un CGroup :+[root@redhat9 ~]# cat /sys/fs/cgroup/cgroup.subtree_control 
 +cpuset cpu io memory pids         
 +</code> 
 + 
 +Créez le cgroup **enfant** appelé **FooBar** :
  
 <code> <code>
-[root@centos8 ~]# cgcreate -g memory:helloworld2 +[root@redhat9 ~]# mkdir /sys/fs/cgroup/FooBar/ 
-[root@centos8 ~]# ls -l /sys/fs/cgroup/memory/helloworld2/+ 
 +[root@redhat9 ~]# ls -l /sys/fs/cgroup/FooBar/
 total 0 total 0
--rw-rw-r--. 1 root root 0 Jul 13 10:39 cgroup.clone_children +-r--r--r--. 1 root root 0 Oct 23 14:06 cgroup.controllers 
---w--w----. 1 root root 0 Jul 13 10:39 cgroup.event_control +-r--r--r--. 1 root root 0 Oct 23 14:06 cgroup.events 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 cgroup.procs +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.freeze 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.failcnt +--w-------. 1 root root 0 Oct 23 14:06 cgroup.kill 
---w--w----. 1 root root 0 Jul 13 10:39 memory.force_empty +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.max.depth 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.failcnt +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.max.descendants 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.procs 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.max_usage_in_bytes +-r--r--r--. 1 root root 0 Oct 23 14:06 cgroup.stat 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.slabinfo +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.subtree_control 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.failcnt +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.threads 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cgroup.type 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.max_usage_in_bytes +-rw-r--r--1 root root 0 Oct 23 14:06 cpu.idle 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.tcp.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpu.max 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.kmem.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpu.max.burst 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpuset.cpus 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.max_usage_in_bytes +-r--r--r--. 1 root root 0 Oct 23 14:06 cpuset.cpus.effective 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.failcnt +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpuset.cpus.exclusive 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.limit_in_bytes +-r--r--r--. 1 root root 0 Oct 23 14:06 cpuset.cpus.exclusive.effective 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.memsw.max_usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpuset.cpus.partition 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.memsw.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpuset.mems 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.move_charge_at_immigrate +-r--r--r--. 1 root root 0 Oct 23 14:06 cpuset.mems.effective 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.numa_stat +-r--r--r--. 1 root root 0 Oct 23 14:06 cpu.stat 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.oom_control +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpu.weight 
-----------. 1 root root 0 Jul 13 10:39 memory.pressure_level +-rw-r--r--. 1 root root 0 Oct 23 14:06 cpu.weight.nice 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.soft_limit_in_bytes +-rw-r--r--1 root root 0 Oct 23 14:06 io.bfq.weight 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.stat +-rw-r--r--. 1 root root 0 Oct 23 14:06 io.latency 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.swappiness +-rw-r--r--. 1 root root 0 Oct 23 14:06 io.max 
--r--r--r--. 1 root root 0 Jul 13 10:39 memory.usage_in_bytes +-r--r--r--1 root root 0 Oct 23 14:06 io.stat 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 memory.use_hierarchy +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.current 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 notify_on_release +-r--r--r--1 root root 0 Oct 23 14:06 memory.events 
--rw-rw-r--. 1 root root 0 Jul 13 10:39 tasks+-r--r--r--. 1 root root 0 Oct 23 14:06 memory.events.local 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.high 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.low 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.max 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.min 
 +-r--r--r--1 root root 0 Oct 23 14:06 memory.numa_stat 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.oom.group 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.peak 
 +--w-------1 root root 0 Oct 23 14:06 memory.reclaim 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.stat 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.swap.current 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.swap.events 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.swap.high 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.swap.max 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.swap.peak 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 memory.zswap.current 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 memory.zswap.max 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 pids.current 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 pids.events 
 +-rw-r--r--. 1 root root 0 Oct 23 14:06 pids.max 
 +-r--r--r--. 1 root root 0 Oct 23 14:06 pids.peak       
 </code> </code>
  
-Il n'existe cependant pas de commande pour affecter une limitation de la mémoire :+Activez les contrôleurs **cpuset** et **cpu** pour le cgroup **FooBar** :
  
 <code> <code>
-[root@centos8 ~]# echo 40000000 > /sys/fs/cgroup/memory/helloworld2/memory.limit_in_bytes+[root@redhat9 ~]# echo "+cpu" >> /sys/fs/cgroup/FooBar/cgroup.subtree_control 
 + 
 +[root@redhat9 ~]# echo "+cpuset" >> /sys/fs/cgroup/FooBar/cgroup.subtree_control 
 + 
 +[root@redhat9 ~]# cat /sys/fs/cgroup/cgroup.subtree_control /sys/fs/cgroup/FooBar/cgroup.subtree_control 
 +cpuset cpu io memory pids 
 +cpuset cpu         
 </code> </code>
  
-==La Commande cgexec==+<WRAP center round important > 
 +**Important** - Notez qu'il n'est pas possible d'activer les contrôleurs pour un cgroup enfant si ces mêmes contrôleurs ne sont pas déjà activés pour le cgroup parent. Notez aussi que dans le cgroup **FooBar**, les contrôleurs **memory** et **pids** ne sont **pas** activés. 
 +</WRAP>
  
-Cette commande permet d'insérer la limitation dans le CGroup **et** de lancer le script en une seule ligne :+Créez maintenant le répertoire **/sys/fs/cgroup/FooBar/tasks** :
  
 <code> <code>
-[root@centos8 ~]# cgexec -g memory:helloworld2 ./hello-world.sh & +[root@redhat9 ~]# mkdir /sys/fs/cgroup/FooBar/tasks
-[1] 37670+
  
-[root@centos8 ~]# hello world +[root@redhat9 ~]# ls -l /sys/fs/cgroup/FooBar/tasks 
-[Entrée]+total 0 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cgroup.controllers 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cgroup.events 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.freeze 
 +--w-------. 1 root root 0 Oct 23 14:08 cgroup.kill 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.max.depth 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.max.descendants 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.procs 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cgroup.stat 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.subtree_control 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.threads 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cgroup.type 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpu.idle 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpu.max 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpu.max.burst 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpuset.cpus 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cpuset.cpus.effective 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpuset.cpus.exclusive 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cpuset.cpus.exclusive.effective 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpuset.cpus.partition 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpuset.mems 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cpuset.mems.effective 
 +-r--r--r--. 1 root root 0 Oct 23 14:08 cpu.stat 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpu.weight 
 +-rw-r--r--. 1 root root 0 Oct 23 14:08 cpu.weight.nice        
 +</code> 
 + 
 +<WRAP center round important > 
 +**Important** - Le répertoire **/sys/fs/cgroup/FooBar/tasks** définit un groupe //enfant// du cgroup FooBar qui ne concerne que les contrôleurs **cpuset** et **cpu**. 
 +</WRAP> 
 + 
 +De façon à ce que les deux processus issus des services **foo** et **bar** se font concurrence sur la même CPU, injectez la valeur de **1** dans le fichier **/sys/fs/cgroup/FooBar/tasks/cpuset.cpus** : 
 + 
 +<code> 
 +[root@redhat9 ~]# echo "1" > /sys/fs/cgroup/FooBar/tasks/cpuset.cpus 
  
-[root@centos8 ~]# +[root@redhat9 ~]# cat /sys/fs/cgroup/FooBar/tasks/cpuset.cpus 
 +1     
 </code> </code>
  
-==La Commande cgdelete==+<WRAP center round important > 
 +**Important** - Notez que dans les faits, le contrôleur **cpu** n'est activé **que** dans le cas où le cgroup contient au moins 2 processus qui se font concurrence sur la même CPU. 
 +</WRAP>
  
-Une fois le script terminé, cette commande permet de supprimer le cgroup :+Mettez en place une limitation des ressources de la CPU avec la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# ps aux | grep *.sh +[root@redhat9 ~]# echo "200000 1000000"/sys/fs/cgroup/FooBar/tasks/cpu.max           
-root       37670  0.0  0.0  12724  3112 pts/1    S    10:41   0:00 /bin/bash ./hello-world.sh +</code>
-root       37685  0.0  0.0  12136  1148 pts/1    S+   10:42   0:00 grep --color=auto hello-world.sh+
  
-[root@centos8 ~]# kill 37670+<WRAP center round important > 
 +**Important** - Dans la commande ci-dessus, le premier nombre est un quota en microsecondes pendant lequel les processus dans le cgroup peuvent s'exécuter dans une **période** de temps donnée. Le deuxième nombre, également exprimé en microsecondes, et la **période**. Autrement dit, les processus dans le cgroup seront limités à une exécution de 200 000 / 1 000 000 = 0.2 secondes pendant chaque seconde.  
 +</WRAP>
  
-root@centos8 ~]# ps aux | grep *.sh +Ajoutez maintenant les processus des services **foo** et **bar** au cgroup **FooBar** : 
-root       37726  0.0  0.0  12136  1156 pts/1    R+   10:43   0:00 grep --color=auto hello-world.sh +
-[1]+  Terminated              cgexec -g memory:helloworld2 ./hello-world.sh+
  
-[root@centos8 ~]# cgdelete memory:helloworld2+<code> 
 +[root@redhat9 ~]# echo "81361" > /sys/fs/cgroup/FooBar/tasks/cgroup.procs
  
-[root@centos8 ~]# ls -l /sys/fs/cgroup/memory/helloworld2/ +[root@redhat9 ~]# echo "81448"/sys/fs/cgroup/FooBar/tasks/cgroup.procs         
-ls: cannot access '/sys/fs/cgroup/memory/helloworld2/': No such file or directory+
 </code> </code>
  
-==Le Fichier /etc/cgconfig.conf==+Vérifiez la prise en compte par le système de la commande précédente :
  
-Afin de les rendre persistantsil convient d'éditer le fichier **/etc/cgconfig.conf** :+<code> 
 +[root@redhat9 ~]# cat /proc/81361/cgroup /proc/81448/cgroup 
 +0::/FooBar/tasks 
 +0::/FooBar/tasks          
 +</code> 
 + 
 +Dernièrementutilisez la commande **top** pour constater que la consommation de la CPU et limitée à 20% sur l'ensemble des processus du cgroup **FooBar** **et** que ces 20% sont répartis en parts égales sur les deux processus **foo** et **bar** :
  
 <code> <code>
-[root@centos8 ~]# vi /etc/cgconfig.conf +top - 14:14:12 up 22:37,  1 user,  load average: 0.29, 1.23, 0.95 
-[root@centos8 ~]# cat /etc/cgconfig.conf +Tasks: 205 total,   3 running, 202 sleeping,   0 stopped,   0 zombie 
-# +%Cpu(s):  5.1 us,  0.1 sy,  0.0 ni, 94.7 id,  0.0 wa,  0.1 hi,  0.1 si,  0.0 st 
- Copyright IBM Corporation2007 +MiB Mem :   7685.1 total  6139.8 free   961.7 used,    885.4 buff/cache 
-+MiB Swap:   5120.0 total  5120.0 free,      0.0 used.   6723.4 avail Mem  
- Authors:     Balbir Singh <balbir@linux.vnet.ibm.com> + 
- This program is free software; you can redistribute it and/or modify it +    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                     
- under the terms of version 2.1 of the GNU Lesser General Public License +  81361 root      20    225364   3456   3072 R  10.0   0.0  12:56.32 sha1sum                                                                                                                                     
- as published by the Free Software Foundation. +  81448 root      20    225364   3328   2944 R  10.0   0.0  10:47.05 md5sum               
-+
-#  This program is distributed in the hope that it would be usefulbut +
-#  WITHOUT ANY WARRANTY; without even the implied warranty of +
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE+
-+
-+
-# By defaultwe expect systemd mounts everything on boot, +
-# so there is not much to do+
-# See man cgconfig.conf for further detailshow to create groups +
-# on system boot using this file. +
-group helloworld2 { +
-        cpu { +
-                cpu.shares = 100; +
-        } +
-        memory { +
-                memory.limit_in_bytes = 40000; +
-        } +
-}+
 </code> </code>
  
-<WRAP center round important 60%> +===5.3 - La Commande systemctl set-property===
-**Important** Notez la création de **deux** limitations, une de 40 000 octets de mémoire et l'autre de **100** **cpu.shares**. Cette dernière est une valeur exprimée sur 1 024, où 1 024 représente 100% du temps CPU. La limite fixée est donc equivalente à 9,77% du temps CPU. +
-</WRAP>+
  
-Créez donc les deux CGroups concernés :+Comme déjà vu, systemd organise les processus dans des **slices**, par exemple les utilisateurs sont regroupés dans **/sys/fs/cgroup/user.slice** :
  
 <code> <code>
-[root@centos8 ~]# cgcreate -g memory:helloworld2 +[root@redhat9 ~]# ls -l /sys/fs/cgroup/user.slice
-[root@centos8 ~]# ls -l /sys/fs/cgroup/memory/helloworld2/+
 total 0 total 0
--rw-rw-r--. 1 root root 0 Jul 13 10:46 cgroup.clone_children +-r--r--r--. 1 root root 0 Oct 22 15:36 cgroup.controllers 
---w--w----. 1 root root 0 Jul 13 10:46 cgroup.event_control +-r--r--r--. 1 root root 0 Oct 22 15:36 cgroup.events 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 cgroup.procs +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.freeze 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.failcnt +--w-------. 1 root root 0 Oct 22 15:36 cgroup.kill 
---w--w----. 1 root root 0 Jul 13 10:46 memory.force_empty +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.max.depth 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.failcnt +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.max.descendants 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.procs 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.max_usage_in_bytes +-r--r--r--. 1 root root 0 Oct 22 15:36 cgroup.stat 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.slabinfo +-rw-r--r--. 1 root root 0 Oct 23 14:01 cgroup.subtree_control 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.failcnt +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.threads 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 22 15:36 cgroup.type 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.max_usage_in_bytes +-rw-r--r--1 root root 0 Oct 22 15:36 cpu.idle 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.tcp.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 22 15:36 cpu.max 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.kmem.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 22 15:36 cpu.max.burst 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.limit_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:05 cpuset.cpus 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.max_usage_in_bytes +-r--r--r--. 1 root root 0 Oct 23 14:05 cpuset.cpus.effective 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.failcnt +-rw-r--r--. 1 root root 0 Oct 23 14:05 cpuset.cpus.exclusive 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.limit_in_bytes +-r--r--r--. 1 root root 0 Oct 23 14:05 cpuset.cpus.exclusive.effective 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.memsw.max_usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:05 cpuset.cpus.partition 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.memsw.usage_in_bytes +-rw-r--r--. 1 root root 0 Oct 23 14:05 cpuset.mems 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.move_charge_at_immigrate +-r--r--r--. 1 root root 0 Oct 23 14:05 cpuset.mems.effective 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.numa_stat +-r--r--r--. 1 root root 0 Oct 22 15:36 cpu.stat 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.oom_control +-rw-r--r--. 1 root root 0 Oct 22 15:36 cpu.weight 
-----------. 1 root root 0 Jul 13 10:46 memory.pressure_level +-rw-r--r--. 1 root root 0 Oct 22 15:36 cpu.weight.nice 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.soft_limit_in_bytes +-rw-r--r--1 root root 0 Oct 22 15:36 io.bfq.weight 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.stat +-rw-r--r--. 1 root root 0 Oct 22 15:36 io.latency 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.swappiness +-rw-r--r--. 1 root root 0 Oct 22 15:36 io.max 
--r--r--r--. 1 root root 0 Jul 13 10:46 memory.usage_in_bytes +-r--r--r--1 root root 0 Oct 22 15:36 io.stat 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 memory.use_hierarchy +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.current 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 notify_on_release +-r--r--r--1 root root 0 Oct 22 15:36 memory.events 
--rw-rw-r--. 1 root root 0 Jul 13 10:46 tasks+-r--r--r--. 1 root root 0 Oct 22 15:36 memory.events.local 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.high 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.low 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.max 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.min 
 +-r--r--r--1 root root 0 Oct 22 15:36 memory.numa_stat 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.oom.group 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.peak 
 +--w-------1 root root 0 Oct 22 15:36 memory.reclaim 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.stat 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.swap.current 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.swap.events 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.swap.high 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.swap.max 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.swap.peak 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 memory.zswap.current 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 memory.zswap.max 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 pids.current 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 pids.events 
 +-rw-r--r--. 1 root root 0 Oct 22 15:36 pids.max 
 +-r--r--r--. 1 root root 0 Oct 22 15:36 pids.peak 
 +drwxr-xr-x. 4 root root 0 Oct 23 14:14 user-1000.slice 
 +drwxr-xr-x. 4 root root 0 Oct 22 15:37 user-42.slice
 </code> </code>
 +
 +et les processus d'un utilisateur spécifique dans un slice dénommé **user-UID.slice** :
  
 <code> <code>
-[root@centos8 ~]# cgcreate -g cpu:helloworld2 +[root@redhat9 ~]# ls -l /sys/fs/cgroup/user.slice/user-1000.slice
-[root@centos8 ~]# ls -l /sys/fs/cgroup/cpu/helloworld2/+
 total 0 total 0
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cgroup.clone_children +-r--r--r--. 1 root    root    0 Oct 23 12:40 cgroup.controllers 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cgroup.procs +-r--r--r--. 1 root    root    0 Oct 23 12:40 cgroup.events 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.stat +-rw-r--r--. 1 root    root    0 Oct 23 12:40 cgroup.freeze 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpuacct.usage +--w-------. 1 root    root    0 Oct 23 12:40 cgroup.kill 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_all +-rw-r--r--. 1 root    root    Oct 23 12:40 cgroup.max.depth 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu +-rw-r--r--. 1 root    root    0 Oct 23 12:40 cgroup.max.descendants 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu_sys +-rw-r--r--. 1 root    root    Oct 23 12:40 cgroup.procs 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_percpu_user +-r--r--r--. 1 root    root    Oct 23 12:40 cgroup.stat 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_sys +-rw-r--r--. 1 root    root    Oct 23 14:01 cgroup.subtree_control 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpuacct.usage_user +-rw-r--r--. 1 root    root    0 Oct 23 12:40 cgroup.threads 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.cfs_period_us +-rw-r--r--. 1 root    root    Oct 23 12:40 cgroup.type 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.cfs_quota_us +-r--r--r--. 1 root    root    Oct 23 12:40 cpu.stat 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.rt_period_us +-r--r--r--. 1 root    root    Oct 23 12:40 memory.current 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.rt_runtime_us +-r--r--r--. 1 root    root    Oct 23 12:40 memory.events 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 cpu.shares +-r--r--r--. 1 root    root    Oct 23 12:40 memory.events.local 
--r--r--r--. 1 root root 0 Jul 13 10:47 cpu.stat +-rw-r--r--. 1 root    root    0 Oct 23 12:40 memory.high 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 notify_on_release +-rw-r--r--. 1 root    root    Oct 23 12:40 memory.low 
--rw-rw-r--. 1 root root 0 Jul 13 10:47 tasks+-rw-r--r--. 1 root    root    Oct 23 12:40 memory.max 
 +-rw-r--r--. 1 root    root    Oct 23 12:40 memory.min 
 +-r--r--r--. 1 root    root    Oct 23 12:40 memory.numa_stat 
 +-rw-r--r--. 1 root    root    Oct 23 12:40 memory.oom.group 
 +-r--r--r--. 1 root    root    Oct 23 12:40 memory.peak 
 +--w-------. 1 root    root    0 Oct 23 12:40 memory.reclaim 
 +-r--r--r--. 1 root    root    Oct 23 12:40 memory.stat 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 memory.swap.current 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 memory.swap.events 
 +-rw-r--r--. 1 root    root    0 Oct 23 12:40 memory.swap.high 
 +-rw-r--r--. 1 root    root    Oct 23 12:40 memory.swap.max 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 memory.swap.peak 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 memory.zswap.current 
 +-rw-r--r--. 1 root    root    0 Oct 23 12:40 memory.zswap.max 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 pids.current 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 pids.events 
 +-rw-r--r--. 1 root    root    Oct 23 12:40 pids.max 
 +-r--r--r--. 1 root    root    0 Oct 23 12:40 pids.peak 
 +drwxr-xr-x. 2 root    root    0 Oct 23 12:40 session-2395.scope 
 +drwxr-xr-x. 5 trainee trainee 0 Oct 23 12:45 user@1000.service
 </code> </code>
  
-==La Commande cgconfigparser==+De ce fait, il est possible d'utiliser systemd pour la mise en place des limitations des ressources en utilisant la commande **systemd set-property** :
  
-Appliquez le contenu du fichier **/etc/cgconfig.conf** grâce à l'utilisation de la commande **cgconfigparser** :+==CPU==
  
 <code> <code>
-[root@centos8 ~]# cgconfigparser -l /etc/cgconfig.conf +[root@redhat9 ~]# systemctl set-property user-1000.slice CPUQuota=40% 
-[root@centos8 ~]# cat /sys/fs/cgroup/memory/helloworld2/memory.limit_in_bytes + 
-36864 +[root@redhat9 ~]# cat /sys/fs/cgroup/user.slice/user-1000.slice/cpu.max 
-[root@centos8 ~]# cat /sys/fs/cgroup/cpu/helloworld2/cpu.shares +40000 100000
-100+
 </code> </code>
 +
 +==Mémoire==
 +
 +<code>
 +[root@redhat9 ~]# systemctl set-property user-1000.slice MemoryMax=1G
 +
 +[root@redhat9 ~]# cat /sys/fs/cgroup/user.slice/user-1000.slice/memory.max
 +1073741824
 +</code>
 +
 +<WRAP center round important >
 +**Important** - Notez que l'utilisation de **MemoryMax** met en place un **hard limit**. Il est aussi possible de mettre en place un **soft limit** en utilisant **MemoryHigh**. 
 +</WRAP>
  
 ----- -----
-Copyright © 2023 Hugh Norris.+Copyright © 2024 Hugh Norris.
Menu