Server

Version: 25.03

Information Collection

Querying OS Information

  1. Query the OS version.

    shell
    cat /etc/openEuler-latest
    cat /etc/os-release
    cat /etc/openEuler-release
  2. Query the kernel version.

    shell
    uname -a

Querying Hardware Information

  1. Query CPU statistics.

    shell
    lscpu
  2. View CPU parameters.

    shell
    cat /proc/cpuinfo
  3. View system memory information.

    shell
    cat /proc/meminfo
  4. View memory information.

    shell
    dmidecode -t memory
  5. View hard drive and partition distribution.

    shell
    lsblk
  6. View details about hard drives and partitions.

    shell
    fdisk -l
  7. View NIC information.

    shell
    lspci | grep -i 'eth'
  8. View all network interfaces.

    shell
    ip a
    yum install -y net-tools
    ifconfig
  9. View details about a network interface.

    shell
    ethtool enp7s0 # (enp7s0 is used as an example.)
  10. View PCI information.

    shell
    lspci
  11. View the device tree.

    shell
    lspci -t
  12. View BIOS information.

    shell
    dmidecode -t bios

Querying Software Information

  1. Query details about a software package.

    shell
    rpm -qi systemd # (systemd is used as an example.)
  2. View the modules provided by a software package.

    shell
    rpm -q --provides systemd # (systemd is used as an example.)
  3. View all installed software packages.

    shell
    rpm -qa | grep systemd # (systemd is used as an example.)
  4. View the file list of a software package.

    shell
    rpm -ql python3-rpm # (python3-rpm is used as an example.)

Viewing OS Logs

  1. View the information and error logs after the system is started.

    shell
    cat  /var/log/messages
  2. View the security-related logs.

    shell
    cat /var/log/secure
  3. View the email-related logs.

    shell
    cat /var/log/maillog
  4. View the logs related to scheduled tasks.

    shell
    cat /var/log/cron
  5. View the logs related to UUCP and news devices.

    shell
    cat /var/log/spooler
  6. View the logs related to the startup and stop of the daemon process.

    shell
    cat /var/log/boot.log