Log2ram se rempli vite

Bonjour, j’utilise sur mon raspberry pi avec Log2ram, par contre, la taille augmente considérablement.

Pourtant je suis passé de 256Mo à 512Mo.

J’ai remarqué que dans /var/log/, le fichier log Xorg.0.log fait plus de 50Mo, je trouves ça énorme.

En faisant un df -h:

Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/root 29G 7,7G 20G 29% /
devtmpfs 3,6G 0 3,6G 0% /dev
tmpfs 3,9G 988K 3,9G 1% /dev/shm
tmpfs 1,6G 3,2M 1,6G 1% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
/dev/mmcblk0p1 253M 52M 202M 21% /boot
log2ram 512M 342M 171M 67% /var/log
/dev/sdc1 1,9T 693G 1,2T 38% /media/USBHDD1/MONNAS/DATA
/dev/sda1 1,9T 693G 1,2T 38% /media/USBHDD2
/dev/sdb1 3,7T 693G 3,0T 19% /media/USBHDD3
tmpfs 782M 24K 782M 1% /run/user/1000

On peut voir que Log2ram fait 342Mo sur les 512Mo.

Je trouves ça beaucoup!

SI tes logs sont trop lourd, regarde les pour savoir ce qui cause ça, un problème logiciel ? Un mode debug actif ? Ou une activation du mode Verbose ?

Je ne connais pas l’usage de log2ram (sauf la théorie de ce qu’il doit faire), alors peut-être changer des points de log pour du « /dev/null » si le log est inutile (pour toi).

En faisant un sudo du -hs /var/log/* | sort -h | tail -n 3 j’ai:
25M /var/log/journal
64M /var/log/lighttpd
68M /var/log/Xorg.0.log

Le log Xorg.0.log est enorme je trouve, comment le réduire?J’ai déjà essayé de le supprimer mais il revient!

Comme j’ai dis, consulte le log pour savoir ce qui cause cette « enflure » du fichier. Si tu as un problème qui ce répète par exemple, faudrait le régler.

Après, consulte la doc de xorg (serveur x) pour savoir comment manipuler le log (changer ce qui sera logger, etc…).

J’ai consulté les logs, Xorg.0.log fait 97M et Xorg.0.log.old fait 67M dans le fichier Xorg il y a ainsi de suite…:

[ 27.173] (II) Initializing extension XVideo-MotionCompensation
[ 27.173] (II) Initializing extension SELinux
[ 27.173] (II) SELinux: Disabled on system
[ 27.173] (II) Initializing extension GLX
[ 27.519] (II) AIGLX: Loaded and initialized vc4
[ 27.519] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 27.519] (II) Initializing extension XFree86-VidModeExtension
[ 27.519] (II) Initializing extension XFree86-DGA
[ 27.519] (II) Initializing extension XFree86-DRI
[ 27.521] (II) Initializing extension DRI2
[ 27.528] (II) modeset(0): Damage tracking initialized
[ 27.528] (II) modeset(0): Setting screen physical size to 677 x 381
[ 27.698] (II) config/udev: Adding input device vc4-hdmi-0 (/dev/input/event0)
[ 27.698] () vc4-hdmi-0: Applying InputClass « libinput keyboard catchall »
[ 27.698] (II) LoadModule: « libinput »
[ 27.699] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[ 27.717] (II) Module libinput: vendor=« X.Org Foundation »
[ 27.717] compiled for 1.20.8, module version = 0.30.0
[ 27.717] Module class: X.Org XInput Driver
[ 27.717] ABI class: X.Org XInput driver, version 24.1
[ 27.717] (II) Using input driver ‹ libinput › for ‹ vc4-hdmi-0 ›
[ 27.717] (
) vc4-hdmi-0: always reports core events
[ 27.717] () Option « Device » « /dev/input/event0 »
[ 27.719] (
) Option « _source » « server/udev »
[ 27.750] (II) event0 - vc4-hdmi-0: is tagged by udev as: Keyboard Pointingstick
[ 27.751] (II) event0 - vc4-hdmi-0: device is a pointer
[ 27.751] (II) event0 - vc4-hdmi-0: device is a keyboard
[ 27.751] (II) event0 - vc4-hdmi-0: device removed
[ 27.776] (II) libinput: vc4-hdmi-0: needs a virtual subdevice
[ 27.776] () Option « config_info » « udev:/sys/devices/platform/soc/fef00700.hdmi/rc/rc0/input0/event0 »
[ 27.776] (II) XINPUT: Adding extended input device « vc4-hdmi-0 » (type: MOUSE, id 6)
[ 27.776] (
) Option « AccelerationScheme » « none »
[ 27.776] () vc4-hdmi-0: (accel) selected scheme none/0
[ 27.776] (
) vc4-hdmi-0: (accel) acceleration factor: 2.000
[ 27.776] () vc4-hdmi-0: (accel) acceleration threshold: 4
[ 27.779] (II) event0 - vc4-hdmi-0: is tagged by udev as: Keyboard Pointingstick
[ 27.780] (II) event0 - vc4-hdmi-0: device is a pointer
[ 27.780] (II) event0 - vc4-hdmi-0: device is a keyboard
[ 27.781] (II) config/udev: Adding input device vc4-hdmi-1 (/dev/input/event1)
[ 27.781] (
) vc4-hdmi-1: Applying InputClass « libinput keyboard catchall »
[ 27.781] (II) Using input driver ‹ libinput › for ‹ vc4-hdmi-1 ›
[ 27.781] () vc4-hdmi-1: always reports core events
[ 27.781] (
) Option « Device » « /dev/input/event1 »
[ 27.781] () Option « _source » « server/udev »
[ 27.784] (II) event1 - vc4-hdmi-1: is tagged by udev as: Keyboard Pointingstick
[ 27.785] (II) event1 - vc4-hdmi-1: device is a pointer
[ 27.785] (II) event1 - vc4-hdmi-1: device is a keyboard
[ 27.785] (II) event1 - vc4-hdmi-1: device removed
[ 27.800] (II) libinput: vc4-hdmi-1: needs a virtual subdevice
[ 27.800] (
) Option « config_info » « udev:/sys/devices/platform/soc/fef05700.hdmi/rc/rc1/input1/event1 »
[ 27.800] (II) XINPUT: Adding extended input device « vc4-hdmi-1 » (type: MOUSE, id 7)
[ 27.800] () Option « AccelerationScheme » « none »
[ 27.800] (
) vc4-hdmi-1: (accel) selected scheme none/0
[ 27.800] () vc4-hdmi-1: (accel) acceleration factor: 2.000
[ 27.800] (
) vc4-hdmi-1: (accel) acceleration threshold: 4
[ 27.803] (II) event1 - vc4-hdmi-1: is tagged by udev as: Keyboard Pointingstick
[ 27.803] (II) event1 - vc4-hdmi-1: device is a pointer
[ 27.803] (II) event1 - vc4-hdmi-1: device is a keyboard
[ 27.829] () vc4-hdmi-0: Applying InputClass « libinput keyboard catchall »
[ 27.829] (II) Using input driver ‹ libinput › for ‹ vc4-hdmi-0 ›
[ 27.829] (
) vc4-hdmi-0: always reports core events
[ 27.829] () Option « Device » « /dev/input/event0 »
[ 27.829] (
) Option « _source » « _driver/libinput »
[ 27.829] (II) libinput: vc4-hdmi-0: is a virtual subdevice
[ 27.829] () Option « config_info » « udev:/sys/devices/platform/soc/fef00700.hdmi/rc/rc0/input0/event0 »
[ 27.829] (II) XINPUT: Adding extended input device « vc4-hdmi-0 » (type: KEYBOARD, id 8)
[ 27.829] (
) Option « xkb_model » « pc105 »
[ 27.829] () Option « xkb_layout » « fr »
[ 27.829] (
) Option « xkb_variant » « latin9 »
[ 27.875] () vc4-hdmi-1: Applying InputClass « libinput keyboard catchall »
[ 27.875] (II) Using input driver ‹ libinput › for ‹ vc4-hdmi-1 ›
[ 27.875] (
) vc4-hdmi-1: always reports core events
[ 27.875] () Option « Device » « /dev/input/event1 »
[ 27.875] (
) Option « _source » « _driver/libinput »
[ 27.875] (II) libinput: vc4-hdmi-1: is a virtual subdevice
[ 27.875] () Option « config_info » « udev:/sys/devices/platform/soc/fef05700.hdmi/rc/rc1/input1/event1 »
[ 27.875] (II) XINPUT: Adding extended input device « vc4-hdmi-1 » (type: KEYBOARD, id 9)
[ 27.875] (
) Option « xkb_model » « pc105 »
[ 27.875] () Option « xkb_layout » « fr »
[ 27.875] (
) Option « xkb_variant » « latin9 »
[ 32.075] (II) modeset(0): EDID vendor « SKG », prod id 12803
[ 32.075] (II) modeset(0): Using EDID range info for horizontal sync
[ 32.075] (II) modeset(0): Using EDID range info for vertical refresh
[ 32.075] (II) modeset(0): Printing DDC gathered Modelines:
[ 32.075] (II) modeset(0): Modeline "2560x1440"x0.0 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync (88.8 kHz eP)
[ 32.075] (II) modeset(0): Modeline "1920x1080"x0.0 332.77 1920 1952 2016 2080 1080 1084 1089 1111 +hsync +vsync (160.0 kHz e)
[ 32.075] (II) modeset(0): Modeline "2560x1440"x0.0 497.75 2560 2608 2640 2720 1440 1443 1448 1525 +hsync +vsync (183.0 kHz e)
[ 32.075] (II) modeset(0): Modeline "2560x1440"x0.0 579.29 2560 2576 2640 2700 1440 1443 1448 1490 +hsync +vsync (214.6 kHz e)
[ 32.075] (II) modeset(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "720x480"x0.0 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 32.075] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e)
[ 32.075] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "720x576"x0.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e)
[ 32.075] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e)
[ 32.075] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[ 32.075] (II) modeset(0): Modeline "1920x1080"x0.0 297.00 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (135.0 kHz e)
[ 32.075] (II) modeset(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 32.075] (II) modeset(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 32.075] (II) modeset(0): Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[ 32.076] (II) modeset(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 32.076] (II) modeset(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 32.076] (II) modeset(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 32.076] (II) modeset(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)
[ 32.076] (II) modeset(0): Modeline "1280x1024"x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 32.076] (II) modeset(0): Modeline "1440x900"x0.0 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e)
[ 32.076] (II) modeset(0): Modeline "1600x900"x60.0 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync (55.9 kHz e)
[ 32.076] (II) modeset(0): Modeline "1680x1050"x0.0 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e)
[ 32.085] (–) modeset(0): HDMI max TMDS frequency 600000KHz
[ 32.327] (II) modeset(0): EDID vendor « SKG », prod id 12803
[ 32.327] (II) modeset(0): Using hsync ranges from config file
[ 32.327] (II) modeset(0): Using vrefresh ranges from config file
[ 32.327] (II) modeset(0): Printing DDC gathered Modelines:
[ 32.327] (II) modeset(0): Modeline "2560x1440"x0.0 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync (88.8 kHz eP)
[ 32.327] (II) modeset(0): Modeline "1920x1080"x0.0 332.77 1920 1952 2016 2080 1080 1084 1089 1111 +hsync +vsync (160.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "2560x1440"x0.0 497.75 2560 2608 2640 2720 1440 1443 1448 1525 +hsync +vsync (183.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "2560x1440"x0.0 579.29 2560 2576 2640 2700 1440 1443 1448 1490 +hsync +vsync (214.6 kHz e)
[ 32.328] (II) modeset(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "720x480"x0.0 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e)
[ 32.328] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "720x576"x0.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e)
[ 32.328] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e)
[ 32.328] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[ 32.328] (II) modeset(0): Modeline "1920x1080"x0.0 297.00 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (135.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 32.328] (II) modeset(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 32.328] (II) modeset(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 32.328] (II) modeset(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)
[ 32.328] (II) modeset(0): Modeline "1280x1024"x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 32.328] (II) modeset(0): Modeline "1440x900"x0.0 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e)
[ 32.328] (II) modeset(0): Modeline "1600x900"x60.0 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync (55.9 kHz e)
[ 32.328] (II) modeset(0): Modeline "1680x1050"x0.0 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e)
[ 32.329] (–) modeset(0): HDMI max TMDS frequency 600000KHz
[ 32.387] (II) modeset(0): EDID vendor « SKG », prod id 12803
[ 32.388] (II) modeset(0): Using hsync ranges from config file
[ 32.388] (II) modeset(0): Using vrefresh ranges from config file
[ 32.388] (II) modeset(0): Printing DDC gathered Modelines:
[ 32.388] (II) modeset(0): Modeline "2560x1440"x0.0 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync (88.8 kHz eP)
[ 32.388] (II) modeset(0): Modeline "1920x1080"x0.0 332.77 1920 1952 2016 2080 1080 1084 1089 1111 +hsync +vsync (160.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "2560x1440"x0.0 497.75 2560 2608 2640 2720 1440 1443 1448 1525 +hsync +vsync (183.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "2560x1440"x0.0 579.29 2560 2576 2640 2700 1440 1443 1448 1490 +hsync +vsync (214.6 kHz e)
[ 32.388] (II) modeset(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "720x480"x0.0 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2008 2052 2200 1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e)
[ 32.388] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "720x576"x0.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e)
[ 32.388] (II) modeset(0): Modeline "1280x720"x0.0 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync (37.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "1920x1080i"x0.0 74.25 1920 2448 2492 2640 1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e)
[ 32.388] (II) modeset(0): Modeline "1920x1080"x0.0 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[ 32.388] (II) modeset(0): Modeline "1920x1080"x0.0 297.00 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync (135.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 32.388] (II) modeset(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 32.388] (II) modeset(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 32.388] (II) modeset(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)
[ 32.388] (II) modeset(0): Modeline "1280x1024"x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 32.388] (II) modeset(0): Modeline "1440x900"x0.0 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e)
[ 32.388] (II) modeset(0): Modeline "1600x900"x60.0 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync (55.9 kHz e)
[ 32.388] (II) modeset(0): Modeline "1680x1050"x0.0 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e)
[ 32.391] (–) modeset(0): HDMI max TMDS frequency 600000KHz
[ 32.836] (II) modeset(0): EDID vendor « SKG », prod id 12803
[ 32.836] (II) modeset(0): Using hsync ranges from config file
[ 32.836] (II) modeset(0): Using vrefresh ranges from config file
[ 32.836] (II) modeset(0): Printing DDC gathered Modelines:

Premièrement, install LOGROTATE, qui va supprimer tes ancien logs

sudo nano /etc/logrotate.d/xorg

Dans la config tu fais ceci;

/var/log/xorg.log {
    rotate 1  # Keep 1 rotated copies
    daily     # Rotate logs daily
    missingok # Don't complain if the log file is missing
    compress  # Compress old log files
    notifempty # Don't rotate if the log file is empty
    size 10M # Rotate when the log file reaches 10MB
}

Avec ce setting (que j’ai ajusté), le log sera archivé chaque jour ou quand il atteint 10Mo. Ceci va réduire l’usage d’espace du log.

La réponse est venu de ChatGPT :slight_smile:


Conversation avec ChatGPT;

Moi

J’ai un Raspberry Pi et le fichier de log « xorg » est immense, comment je peut le réduire, voir, a seulement garder les informations critiques ?

ChatGPT

You can use the « logrotate » utility to manage and reduce the size of your « xorg » log file on your Raspberry Pi. Here’s a command to configure log rotation for the « xorg » log file:

bashCopy code

sudo nano /etc/logrotate.d/xorg

Inside the text editor, you can add the following configuration to keep only the most recent log and compress older ones:

bashCopy code

/path/to/xorg.log {
    rotate 5  # Keep 5 rotated copies
    daily     # Rotate logs daily
    missingok # Don't complain if the log file is missing
    compress  # Compress old log files
    notifempty # Don't rotate if the log file is empty
    size 100M # Rotate when the log file reaches 100MB
}

Save the file and exit the text editor. Make sure to replace « /path/to/xorg.log » with the actual path to your « xorg » log file.

This configuration will keep the most recent 5 log files, compress older ones, and rotate them daily or when the log file reaches 100MB in size. This should help you manage and reduce the size of your « xorg » log file.

cool merci, j’ai déjà essayé un peu avec chatGPT mais là j’y ai pas pensé! merci