안녕하세요 오늘은 OS 분석Tool 을 하나 설명드리려 합니다.
나온지는 오래되었지만, 잘 모르시는 분들이 있어서, 이런것이 있다고 말씀드리고자합니다.
xsos는 이 sosreport의 출력을 보다 쉽게 분석할 수 있게 도와주는 명령줄 분석 도구입니다. Red Hat 계열의 시스템 관리 및 문제 해결 시 매우 유용하게 쓰입니다.
또한, sosreport로 생성된 아카이브에서 유용한 정보를 간략하고 구조적으로 보여주는 툴입니다.
bash로 작성된 스크립트이며, 시스템 상태에 대한 요약을 빠르게 확인할 수 있습니다
> 주요 기능(옵션)
. sosreport
의 로그들에서 다음과 같은 정보를 추출해 정리합니다:
-a, --all show everything
-b, --bios show info from dmidecode
-o, --os show hostname, distro, SELinux, kernel info, uptime, etc
-k, --kdump inspect kdump configuration
-c, --cpu show info from /proc/cpuinfo
-f, --intrupt show info from /proc/interrupts
-m, --mem show info from /proc/meminfo
-d, --disks show info from /proc/partitions + dm-multipath synopsis
-t, --mpath show info from dm-multipath
-l, --lspci show info from lspci
-e, --ethtool show info from ethtool
-r, --softirq show info from /proc/net/softnet_stat
-n, --netdev show info from /proc/net/dev
-g, --bonding show info from /proc/net/bonding
-i, --ip show info from ip addr (BASH v4+ required)
--net alias for: --lspci --ethtool --softirq --netdev --bonding --ip
-s, --sysctl show important kernel sysctls
-p, --ps inspect running processes via ps
> 언제 사용하나요?
. 고객 시스템의 sosreport를 받아 전체 상태를 빠르게 파악하고 싶을 때
. 하드웨어, OS, 디스크, 네트워크 구성 요약이 필요할 때
. 시스템 분석 자동화를 위해 스크립트로 요약 정보를 파싱할 때
1. 설치 방법
# yum install xsos
or
#
# rpm -i latest-xsos.rpm
2. 사용 방법
# xsos // 현재 OS의 정보를 간략하게 출력
OS
Hostname: TEST
Distro: [redhat-release] Red Hat Enterprise Linux release 9.5 (Plow)
[os-release] Red Hat Enterprise Linux 9.5 (Plow) 9.5 (Plow)
RHN: (missing)
RHSM: hostname = subscription.rhsm.redhat.com
proxy_hostname =
YUM: 3 enabled plugins: debuginfo-install, product-id, subscription-manager
Runlevel: unknown (default graphical)
SELinux: disabled (default disabled)
Arch: mach=x86_64 cpu=x86_64 platform=x86_64
Kernel:
Booted kernel: 5.14.0-503.38.1.el9_5.x86_64
GRUB default:
Build version:
Linux version 5.14.0-503.38.1.el9_5.x86_64 (mockbuild@x86-64-05.build.eng.rdu2.redhat.com) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld version 2.35.2-54.el9) #1 SMP
PREEMPT_DYNAMIC Sun Apr 13 22:01:49 EDT 2025
Booted kernel cmdline:
BOOT_IMAGE=(hd0,gpt3)/vmlinuz-5.14.0-503.38.1.el9_5.x86_64 root=UUID=a0d33ec2-2d22-4067-ac0d-ac9a2d0fafd3 ro resume=UUID=9a1d4e79-f8a9-475d-8177-b2878dec1105 rhgb quiet
crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
GRUB default kernel cmdline:
Taint-check: 0 (kernel untainted)
- - - - - - - - - - - - - - - - - - -
Sys time: Thu May 1 05:16:11 PM KST 2025
Boot time: Thu May 1 04:34:24 PM KST 2025
Time Zone: Asia/Seoul
Uptime: 41 min, 1 user
LoadAvg: [16 CPU] 0.00 (0%), 0.00 (0%), 0.00 (0%)
/proc/stat:
procs_running: 1 procs_blocked: 0 processes [Since boot]: 42493
cpu [Utilization since boot]:
us 0%, ni 0%, sys 0%, idle 100%, iowait 0%, irq 0%, sftirq 0%, steal 0%
---------------------
# xsos --all // 위에서 설명한 모든 옵션 정보를 출력해줍니다.
DMIDECODE
BIOS:
Vend: American Megatrends Inc.
Vers: 0708
Date: 07/23/2020
BIOS Rev: 7.8
FW Rev:
System:
Mfr: ASUS
Prod: System Product Name
Vers: System Version
Ser: System Serial Number
UUID: 7868a7a1-6b98-a9e5-32d6-3c7c3fd35a60
CPU:
1 of 1 CPU sockets populated, 8 cores/16 threads per CPU
8 total cores, 16 total threads
Mfr: Intel(R) Corporation
Fam: Core i7
Freq: 2871 MHz
Vers: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory:
Total: 131072 MiB (128 GiB)
DIMMs: 4 of 24 populated
MaxCapacity: 65536 MiB (64 GiB / 0.06 TiB)
........
......
..
KDUMP CONFIG
kexec-tools rpm version:
kexec-tools-2.0.27-16.el9_5.1.x86_64
Service enablement:
UNIT STATE
kdump.service enabled enabled
kdump initrd/initramfs:
-rw------- 1 root root 116204032 Jul 2 2024 initramfs-5.14.0-427.22.1.el9_4.x86_64kdump.img
-rw------- 1 root root 34440192 Apr 16 20:05 initramfs-5.14.0-427.31.1.el9_4.x86_64kdump.img
-rw------- 1 root root 73123840 Apr 16 20:13 initramfs-5.14.0-503.38.1.el9_5.x86_64kdump.img
Memory reservation config:
/proc/cmdline { crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M }
GRUB default { crashkernel param not present }
Actual memory reservation per /proc/iomem:
4e000000-6dffffff : Crash kernel
kdump.conf:
auto_reset_crashkernel yes
path /var/crash
core_collector makedumpfile -l --message-level 7 -d 31
kdump.conf "path" available space:
System MemTotal (uncompressed core size) { 125.20 GiB }
Available free space on target path's fs { 190.13 GiB } (fs=/)
Panic sysctls:
kernel.sysrq [bitmask] = "1" (all SysRqs allowed)
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 =
kernel.softlockup_panic = 0
kernel.unknown_nmi_panic = 0
kernel.nmi_watchdog = 1
vm.panic_on_oom [0-2] = 0 (no panic)
CPU
16 logical processors (8 CPU cores)
1 Intel Core i7-10700 CPU @ 2.90GHz (flags: aes,constant_tsc,ht,lm,nx,pae,rdrand,vmx)
└─16 threads / 8 cores each
.......
.....
..
MEMORY
Stats graphed as percent of MemTotal:
MemUsed ▊▊................................................ 3.7%
Buffers .................................................. 0.0%
Cached .................................................. 0.8%
HugePages .................................................. 0.0%
Dirty .................................................. 0.0%
RAM:
125.2 GiB total ram
4.7 GiB (4%) used
3.6 GiB (3%) used excluding Buffers/Cached
0 GiB (0%) dirty
HugePages:
No ram pre-allocated to HugePages
LowMem/Slab/PageTables/Shmem:
1.19 GiB (1%) of total ram used for Slab
0 GiB (0%) of total ram used for PageTables
0.01 GiB (0%) of total ram used for Shmem
Swap:
0 GiB (0%) used of 10 GiB total
STORAGE
Whole Disks from /proc/partitions:
2 disks, totaling 456 GiB (0.45 TiB)
- - - - - - - - - - - - - - - - - - - - -
Disk Size in GiB
---- -----------
sda 224
sdb 233
....
...
- 지금까지는 해당 서버에 대해 나오는것이고 만약 sosreport를 보려고 한다면 아래와 같이 사용하시면 됩니다.
# xsos sosreport-TEST-2025-05-01-ao --all
>> 서버의 상태를 간략하게 파악 하고 싶을때 유용합니다. sosreport를 추출하지 못할때 TEXT로 출력할수있어 좋습니다.
감사합니다.