С ее помощью служба технической поддержки или разработчики могу проанализировать состояние системы с целью получения информации что и как настроено и где возможно может что-то не так. По сути создаем архив со слепком состояния системы.

Установка программы sosreport выполняется из дефолтных репозитариев текущей системы. Т.к. я использую сейчас дистрибутив Ubuntu 22.04 Server LTS, то все последующее ниже разбирается на его основе:

ekzorchik@ud2204a:~$ apt-cache search sosreport

sosreport - Set of tools to gather troubleshooting data from a system

cockpit-sosreport - Cockpit user interface for diagnostic reports

ekzorchik@ud2204a:~$

ekzorchik@ud2204a:~$ sudo rm -f /var/lib/dpkg/{lock-frontend,lock}

ekzorchik@ud2204a:~$ sudo rm -Rf /var/lib/apt/lists

ekzorchik@ud2204a:~$ sudo apt-get update && sudo apt-get install -y sosreport mc

ekzorchik@ud2204a:~$ dpkg -l | grep sosreport

ii  sosreport                                  4.8.2-0ubuntu0~22.04.1                  amd64        Set of tools to gather troubleshooting data from a system

ekzorchik@ud2204a:~$ whereis sosreport

sosreport: /usr/bin/sosreport /usr/share/man/man1/sosreport.1.gz

Шаг №1: Пробую запустить sosreport, но интерпретатот сообщает, что вместо sosreport нужно использовать команду sos:

ekzorchik@ud2204a:~$ sosreport

WARNING: the 'sosreport' command has been deprecated in favor of the new 'sos' command, E.G. 'sos report', and will be removed in the upcoming sos-4.9 release.

Redirecting to 'sos report '

Could not initialize 'report': Component must be run with root privileges

ekzorchik@ud2204a:~$

Шаг №2: Всегда перед использованием чего-либо не лишним будет прочитать справку по использованию, хоть бегло, хоть вдумчиво.

ekzorchik@ud2204a:~$ man sos

Шаг №3: Инициирую запуск утилиты sos:

ekzorchik@ud2204a:~$ sos

usage: sos <component> [options]

Available components:

        report, rep                   Collect files and command output in an archive

        clean, cleaner, mask          Obfuscate sensitive networking information in a report

        help                          Detailed help infomation

        collect, collector            Collect an sos report from multiple nodes simultaneously

sos: error: the following arguments are required: component

ekzorchik@ud2204a:~$

ekzorchik@ud2204a:~$ sos report

Could not initialize 'report': Component must be run with root privileges

ekzorchik@ud2204a:~$ sudo sos report

Шаг №4: Пробую сформировать первый отчет о системе:

ekzorchik@ud2204a:~$ sudo sos report

sos report (version 4.8.2)

This command will collect system configuration and diagnostic

information from this Ubuntu system.

For more information on Canonical visit:

        Community Website  : https://www.ubuntu.com/

        Commercial Support : https://www.canonical.com

The generated archive may contain data considered sensitive and its

content should be reviewed by the originating organization before being

passed to any third party.

No changes will be made to system configuration.

Press ENTER to continue, or CTRL-C to quit.

Optionally, please enter the case id that you are generating this report for []: нажимаю клавишу "ENTER"

 Setting up archive ...

 Setting up plugins ...

[plugin:firewall_tables] skipped command 'nft -a list ruleset': required kmods missing: nf_tables, nfnetlink.   Use '--allow-system-changes' to enable collection.

[plugin:firewall_tables] skipped command 'iptables -vnxL': required kmods missing: iptable_filter, nf_tables.

[plugin:firewall_tables] skipped command 'ip6tables -vnxL': required kmods missing: ip6table_filter, nf_tables.

[plugin:fwupd] skipped command 'fwupdmgr get-approved-firmware': required services missing: fwupd.

[plugin:fwupd] skipped command 'fwupdmgr get-devices --no-unreported-check': required services missing: fwupd.

[plugin:fwupd] skipped command 'fwupdmgr get-history': required services missing: fwupd.

[plugin:fwupd] skipped command 'fwupdmgr get-remotes': required services missing: fwupd.

[plugin:fwupd] skipped command '/usr/libexec/fwupd/fwupdagent get-devices': required services missing: fwupd.

[plugin:fwupd] skipped command '/usr/libexec/fwupd/fwupdagent get-updates': required services missing: fwupd.

[plugin:networking] skipped command 'ip -s macsec show': required kmods missing: macsec.   Use '--allow-system-changes' to enable collection.

[plugin:networking] skipped command 'ss -peaonmi': required kmods missing: inet_diag, unix_diag, tcp_diag, af_packet_diag, netlink_diag, mptcp_diag, udp_diag, raw_diag, xsk_diag.   Use '--allow-system-changes' to enable collection.

[plugin:ubuntu] skipped command 'ua status': required kmods missing: tls.   Use '--allow-system-changes' to enable collection.

[plugin:ubuntu] skipped command 'ua status --format json': required kmods missing: tls.   Use '--allow-system-changes' to enable collection.

[plugin:ufw] skipped command 'ufw status numbered': required kmods missing: iptable_filter, bpfilter.

[plugin:ufw] skipped command 'ufw app list': required kmods missing: iptable_filter, bpfilter.

Running plugins. Please wait ...

Finishing plugins              [Running: ubuntu]

  Finished running plugins

Creating compressed archive...

Your sos report has been generated and saved in:

        /tmp/sosreport-ud2204a-2025-05-23-pgrlvxn.tar.xz

Size   3.99MiB

 Owner  root

 sha256 eda284f462e6fd11d2b1d5f807142a591db55c390d3492d2d8850eb27d5fc3b7

Please send this file to your support representative.

ekzorchik@ud2204a:~$

Шаг №5: Из вывода выше вижу, что отчет/слепок сформировался в каталоге /tmp

ekzorchik@ud2204a:~$ ls -l /tmp/sosreport-ud2204a-2025-05-23-pgrlvxn.tar.xz

-rw------- 1 root root 4188508 мая 23 11:32 /tmp/sosreport-ud2204a-2025-05-23-pgrlvxn.tar.xz

ekzorchik@ud2204a:~$

Шаг №6: Как посмотреть содержимое сформированного слепка системы?

ekzorchik@ud2204a:~$ sudo mc

перехожу в каталог /tmp

и перехожу в архив sosreport-ud2204a-2025-05-23-pgrlvxn.tar.xz

Просматриваем собранную информацию о системе с помощью sos report через MC

ну вроде да, информация собрана.

В принципе все интересуемое по системе есть в этом слепке.

Шаг №7: Сформировываем слепок системы в удобный каталог:

ekzorchik@ud2204a:~$ sudo sos --report  --tmp-dir=/home/ekzorchik

Creating compressed archive...

Your sos report has been generated and saved in:

        /home/ekzorchik/sosreport-ud2204a-2025-05-23-sljckfc.tar.xz

Size   4.02MiB

Owner  root

sha256 2b9f5179f476ccd881b1ea635677bb871b6c294f043ce7ad1559fb31afc8f13b

Please send this file to your support representative.

(Пожалуйста, отправьте этот файл вашему представителю службы поддержки.)

Ну что я могу пока сказать, использовать утилиту можно, да и не лишним будет, когда принимаем систему в подчинение собрать вот такой вот слепок и уже получить предварительную информацию что настроено в едином виде. Можно даже периодически делать так.

Пока на этом я прощаюсь, с уважением автор блога Олло Александр aka ekzorchik.