We all know about SOSReport. It is used to gather system information that can be used for diagnosis. Redhat’s support service recommends that we provide SOSReport to analyze the current system status when submitting the case.

It collects all types of reports to help users find the root cause of problems. We can easily extract and read THE SOSReport, but it is difficult to read. Because each part of it is a separate file.

So what’s the best way to read all this in Linux using syntax highlighting? Yes, this can be done with the XSOS tool.

sosreport

The sosReport command is a tool that collects large amounts of configuration details, system information, and diagnostic information from running systems, especially RHEL and OEL systems. It helps technical support engineers analyze systems in many ways.

This report contains a great deal of information about the system, Such as guide information, file system, memory, host name, installed the RPM, system IP detailed information, network, operating system version, installed kernel, the kernel modules loaded, open the file list, PCI devices list, the mount point and its details, operation process in the information output, system, process tree routing, is located in the/etc All configuration files in the folder, and all log files in the /var folder.

This will take some time to generate the report, depending on your system installation and configuration.

When done, sosReport will generate a compressed archive file in the/TMP directory.

xsos

Xsos is a tool that helps users easily read SOsReport on Linux systems. On the other hand, we can say it is the SOsReport examiner.

It can immediately summarize system information from SOsReport or running systems.

Xsos will attempt to simplify, parse, calculate, and format data from dozens of files (and commands) to give you a detailed overview of your system.

You can immediately summarize system information by running the following command.

# curl -Lo ./xsos bit.ly/xsos-direct; chmod +x ./xsos; ./xsos -ya
Copy the code

How do I install Xsos on Linux

We can easily install XSOS using the following two methods.

If you’re looking for the latest cutting-edge version. Use the following steps:

# curl -Lo /usr/local/bin/xsos bit.ly/xsos-direct
# chmod +x /usr/local/bin/xsos
Copy the code

The following are recommended ways to install XSOS. It will install Xsos from the RPM file.

# yum install http://people.redhat.com/rsawhill/rpms/latest-rsawaroha-release.rpm
# yum install xsos
Copy the code

How do I use Xsos on Linux

Once xSOS is installed through one of the above methods. Simply run the xsos command without any options, and they display basic information about the system.

# xsosOS the Hostname: CentOS7.2daygeek.com Distro: [redhat-release] CentOS Linux release 7.6.1810 (Core) [CentOS -release] CentOS Linux release 7.6.1810 (Core) [OS -release]  CentOS Linux 7 (Core) 7 (Core) RHN: (missing) RHSM: (missing) YUM: 2 enabled plugins: fastestmirror, langpacks Runlevel: N 5 (default graphical) SELinux: enforcing (default enforcing) Arch: X86_64 CPU =x86_64 platform=x86_64 Kernel: Booted Kernel: 3.10.0-957.el7.x86_64 GRUB default: 3.10.0-957. El7. X86_64 Build version: Linux Version 3.10.0-957.el7.x86_64 ([email protected]) (GCC version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC))#1 SMP Thu Nov 8 23:39:32 UTC 2018Booted kernel cmdline: root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8  GRUB default kernel cmdline: root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8  Taint-check: 0 (kernel untainted) - - - - - - - - - - - - - - - - - - - Sys time: Sun May 12 10:05:21 CDT 2019 Boot time: Sun May 12 09:50:20 CDT 2019 (epoch: 1557672620) Time Zone: America/Chicago Uptime: 15 min, 1 user LoadAvg: [1 CPU] 0.00 (0%), 0.04 (4%), 0.09 (9%) /proc/stat:
    procs_running: 2   procs_blocked: 0    processes [Since boot]: 6423
    cpu [Utilization since boot]:
      us 1%, ni 0%, sys 1%, idle 99%, iowait 0%, irq 0%, sftirq 0%, steal 0%
Copy the code

How do I use the xsos command to view the generated SOSReport output in Linux?

We need an SOSReport for further reading using the xsos command.

Yes, I have generated an SOSReport as follows.

# ls -lls -lh /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
9.8M -rw-------. 1 root root 9.8M May 12 10:13 /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
Copy the code

Run the following command to untangle it.

# tar xf sosreport-CentOS7-01-1005-2019-05-12-pomeqsa.tar.xz
Copy the code

To see all information, run xsos with either the -a or –all switch:

# xsos --all /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
Copy the code

To view BIOS information, run Xsos with the -b or — BIOS switch.

# xsos --bios /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaDMIDECODE BIOS: Vend: innotek GmbH Vers: VirtualBox Date: 12/01/2006 BIOS Rev: FW Rev: System: Mfr: innotek GmbH Prod: VirtualBox Vers: 1.2ser: 0 UUID: 002f47b8-2AF2-48F5-be1D-67b67e03514C CPU: 0 of 0 CPU sockets populated, 0 cores/0 threads per CPU 0 total cores, 0 total threads Mfr: Fam: Freq: Vers: Memory: Total: 0 MiB (0 GiB) DIMMs: 0 of 0 Populated MaxCapacity: 0 MiB (0 GiB / 0.00 TiB)Copy the code

To view basic system information, such as host name, distribution, SELinux, kernel information, uptime, etc., run Xsos with the -o or — OS switch.

# xsos --os /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaOS the Hostname: CentOS7.2daygeek.com Distro: [redhat-release] CentOS Linux release 7.6.1810 (Core) [CentOS -release] CentOS Linux release 7.6.1810 (Core) [OS -release]  CentOS Linux 7 (Core) 7 (Core) RHN: (missing) RHSM: (missing) YUM: 2 enabled plugins: fastestmirror, langpacks SELinux: enforcing (default enforcing) Arch: mach=x86_64 cpu=x86_64 platform=x86_64 Kernel: Booted kernel: 3.10.0-957.el7.x86_64 GRUB default: 3.10.0-957.el7.x86_64 Build version: Linux Version 3.10.0-957.el7.x86_64 ([email protected]) (GCC version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC))#1 SMP Thu Nov 8 23:39:32 UTC 2018Booted kernel cmdline: root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8  GRUB default kernel cmdline: root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8  Taint-check: 536870912 (see https://access.redhat.com/solutions/40594) 29 TECH_PREVIEW: Technology Preview code is loaded - - - - - - - - - - - - - - - - - - - Sys time: Sun May 12 10:12:22 CDT 2019 Boot time: Sun May 12 09:50:20 CDT 2019 (epoch: 1557672620) Time Zone: America/Chicago Uptime: 22 min, 1 user LoadAvg: [1 CPU] 1.19 (119%), 0.27 (27%), 0.14 (14%) /proc/stat:
    procs_running: 8   procs_blocked: 2    processes [Since boot]: 9005
    cpu [Utilization since boot]:
      us 1%, ni 0%, sys 1%, idle 99%, iowait 0%, irq 0%, sftirq 0%, steal 0%
Copy the code

To see the kdump configuration, run Xsos with either the -k or –kdump switches.

# xsos --kdump /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsa
KDUMP CONFIG
  kexec-tools rpm version:
    kexec-tools-2.0.15-21.el7.x86_64
  Service enablement:
    UNIT           STATE
    kdump.service  enabled
  kdump initrd/initramfs:
    13585734 Feb 19 05:51 initramfs-3.10.0-957.el7.x86_64kdump.img
  Memory reservation config:
    /proc/cmdline { crashkernel=auto }
    GRUB default  { crashkernel=auto }
  Actual memory reservation per /proc/iomem:
      2a000000-340fffff : Crash kernel
  kdump.conf:
    path /var/crash
    core_collector makedumpfile -l --message-level 1 -d 31
  kdump.conf "path"Available space: System MemTotal (uncompressed core size) {1.80gib} available free space on target path's fs {22.68 GiB} (fs=/) Panic sysctls: kernel.sysrq [bitmask] = "16" (see proc man page) kernel.panic [secs] = 0 (no autoreboot on panic) kernel.hung_task_panic = 0 kernel.panic_on_oops = 1 kernel.panic_on_io_nmi = 0 kernel.panic_on_unrecovered_nmi = 0 kernel.panic_on_stackoverflow = 0 kernel.softlockup_panic = 0 kernel.unknown_nmi_panic = 0 kernel.nmi_watchdog = 1 vm.panic_on_oom [0-2] = 0 (no panic)Copy the code

To see information about the CPU, run xsos with the -c or — CPU switch.

# xsos --cpu /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaCPU 1 Logical Processors 1 Intel Core I7-6700HQ CPU @ 2.60GHz (FLAGS: AES, Constant_TSC, HT, LM, NX, PAE, RDRAND)Copy the code

To see memory utilization, run xsos with the -m or –mem switch.

# xsos --mem /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaThe MEMORY Stats graphed as percent of MemTotal: MemUsed ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊... 58.8% Buffers... 0.6% Cached ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊... 29.9% HugePages... 0.0% Dirty... 0.7% of RAM: 1.8 GiB Total RAM 1.1 GiB (59%) Used 0.5 GiB (28%) Used excluding Buffers/Cached 0.01 GiB (1%) Dirty HugePages: No ram pre - allocated to HugePages LowMem/Slab/PageTables/Shmem: 0.09 GiB (5%) of total ram, informsfor Slab
    0.02 GiB (1%) of total ram used for PageTables
    0.01 GiB (1%) of total ram used for Shmem
  Swap:
    0 GiB (0%) used of 2 GiB total
Copy the code

To view information about the added disks, run xsos using the -d and -disks switches.

# xsos --disks /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaSTORAGE Whole Disks from /proc/partitions: 2 Disks, totaling 40 GiB (0.04tib) - - - - - - - - - - - - - - - - - - - - - Disk Sizein GiB
    ----    -----------
    sda     30
    sdb     10
Copy the code

To see the network interface configuration, run Xsos with the -e or –ethtool switch.

# xsos --ethtool /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaETHTOOL Interface Status: Enp0s10 0000:00:0a.0 link= UP 1000Mb/s full (Autoneg =Y) rx ring 256/4096 DRV E1000 v7.3.21-k8-nAPI/fw UNKNOWN ENP0s9 0000:00:09.0 link= UP 1000Mb/s full (Autoneg =Y) rx ring 256/4096 DRV E1000 v7.3.21-k8-nAPI/fw UNKNOWN virbr0 N/A Link =DOWN rx ring UNKNOWN DRV Bridge V2.3 / fw N/A virbr0-nic Tap link=DOWN rx ring UNKNOWN DRV Tun V1.6 / fw UNKNOWNCopy the code

To see information about IP addresses, run xsos with the -i or — IP switch.

# xsos --ip /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaIP4 Interface Master IF MAC Address MTU State IPv4 Address ========= ========= ================= ====== ===== = = = = = = = = = = = = = = = = = = lo - 65536 up 127.0.0.1/8 enp0s9-08:00:27:0 b: BC: e9 up 192.168.1.8/24 enp0s10-1500 08:00:27:b2:08:91 1500 UP 192.168.1.9/24 virbr0-52:54:00: AE :01:94 1500 up 192.168.122.1/24 virbr0-nic Virbr0 52:54:00:ae:01:94 1500 DOWN - IP6 Interface Master IF MAC Address MTU State IPv6 Address Scope ========= ========= ================= ====== ===== =========================================== ===== lo - - 65536 up ::1/128 host enp0s9 - 08:00:27:0b:bc:e9 1500 up fe80::945b:8333:f4bc:9723/64 link enp0s10 - 08:00:27:b2:08:91 1500 up fe80::7ed4:1fab:23c3:3790/64 link virbr0 - 52:54:00:ae:01:94 1500 up - - virbr0-nic virbr0 52:54:00:ae:01:94 1500 DOWN -  -Copy the code

To see running processes through ps, run xsos with either the -p or –ps switch.

# xsos --ps /var/tmp/sosreport-CentOS7-01-1005-2019-05-12-pomeqsaPS CHECK Total number of threads/processes: 501 / 171 Top users of CPU & MEM: USER %CPU %MEM RSS root 20.6% 14.1% 0.30 GiB GDM 0.3% 16.8% 0.33 GiB Postfix 0.0% 0.6% 0.01 GiB Polkitd 0.0% 0.6% 0.01 GiB DayGeek 0.0% 0.2% 0.00 GiB colord 0.0% 0.4% 0.01 GiB Uninteruptible Sleep Threads /processes (0/0): [None] Defunct zombie threads/processes (0/0): [None] Top CPU-using processes: USER PID %CPU %MEM vsZ-MIB RSS-MIB TTY STAT START TIME COMMAND root 6542 15.6 4.2 875 78 PTS /0 Sl+ 10:11 0:07 /usr/bin/python/sbin/sosreport root 7582 3.0 0.1 10 2 PTS /0 S 10:12:00 /bin/bash /usr/sbin/dracut --print-cmdline Root 7969 0.7 0.1 95 4? Ss 10:12:00 /usr/sbin/certmonger -s -p root 7889 0.4 0.2 24 4? Ss 10:12:00 /usr/lib/systemd/systemd-hostnamed GDM 3866 0.3 7.1 2856 131? Sl 09:50 0:04 /usr/bin/gnOMe-shell root 8553 0.2 0.1 47 3? S 10:12:00 /usr/lib/systemd/systemd-udevd root 6971 0.2 0.4 342 9? Sl 10:12:00 /usr/sbin/abrt-dbus-t133 root 3200 0.2 0.9 982 18? Ssl 09:50 0:02 /usr/sbin/libvirtd root 2855 0.1 0.1 88 3? Ss 09:50 0:01 /sbin/rngd-fRtkit 2826 0.0 0.0 194 2? SNsl 09:50 0:00 /usr/libexec/rtkit-daemon Top MEM-using processes: USER PID %CPU %MEM vsZ-MIB RSS-MIB TTY STAT START TIME COMMAND GDM 3866 0.3 7.1 2856 131? Sl 09:50 0:04 /usr/bin/gnOMe-shell root 6542 15.6 4.2 875 78 PTS /0 Sl+ 10:11 0:07 /usr/bin/python.sbin/sosreport root 3264 0.0 1.2 271 23 tty1 Ssl+ 09:50 0:00 /usr/bin/x :0 -background root 200 0.2 0.9 982 18? Ssl 09:50 0:02 /usr/sbin/libvirtd root 3189 0.0 0.9 560 17? Ssl 09:50 0:00 /usr/bin/python2 -es /usr/sbin/tuned GDM 4072 0.0 0.9 988 17? Sl 09:50 0:00 /usr/libexec/gsD-media-keys GDM 4076 0.0 0.8 625 16? Sl 09:50 0:00 /usr/libexec/gSD-power GDM 4056 0.0 0.8 697 16? Sl 09:50 0:00 /usr/libexec/gsD-color root 2853 0.0 0.7 622 14? Ssl 09:50 0:00 /usr/sbin/networkManager --no-daemon GDM 4110 0.0 0.7 544 14? Sl 09:50 0:00 /usr/libexec/gsd-wacom Top thread-spawning processes:# USER PID %CPU %MEM VSZ-MiB RSS-MiB TTY STAT START TIME COMMAND17 root 3200 0.2 0.9 982 18? -09:50 0:02 /usr/sbin/libvirtd 12 root 6542 16.1 4.5 876 83 PTS / 0-10:11 0:07 /usr/bin/python/sbin/sosreport 10 GDM 3866 0.3 7.1 2856 131? -09:50 0:04 /usr/bin/gnOMe-shell 7 Polkitd 2864 0.0 0.6 602 13? -09:50 0:01 /usr/lib/polkit-1/polkitd --no-debug 6 root 2865 0.0 0.0 203 1? -09:50 0:00 /usr/sbin/gssproxy -d 5 root 3189 0.0 0.9 560 17? -09:50 0:00 /usr/bin/python2 -es /usr/sbin/tuned 5 root 2823 0.0 0.3 443 6? - 09:50 0:00 / usr/libexec/udisks2 udisksd 5 GDM 4102 0.0 0.2 461? -09:50 0:00 /usr/libexec/gsd- SmartCard 4 root 3215 0.0 0.2 470 4? -09:50 0:00 /usr/sbin/gdm 4 GDM 4106 0.0 0.2 444 5? - 09:50 0:00 /usr/libexec/gsd-soundCopy the code

Via: www.2daygeek.com/xsos-a-tool…

By Magesh Maruthamuthu, lujun9972

This article is originally compiled by LCTT and released in Linux China