Linux 服务器配置信息查询方法,国产化申威服务器配置信息查看演示

简介: Linux 服务器配置信息查询方法,国产化申威服务器配置信息查看演示

   

申威服务器配置信息查看演示

第一章:常用命令

① 显示服务器信息

通过 dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product" 命令可以显示服务器信息。

申威服务器没查出来,其它服务器可用,下面这个是飞腾服务器的。

root@compute9:/opt/dmdbms/tool# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product"
        Manufacturer: GreatWall
        Product Name: 擎天DF720

下面这个是泰山服务器的

[root@taishan-kylinosv10-18 yonyou_nc]# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product"
        Manufacturer: Huawei
        Product Name: TaiShan 2280 V2

② 显示操作系统信息

通过 uname -a 命令可以显示内核操作系统信息。

root@sw6a:~# uname -a
Linux sw6a 4.4.15-deepin-aere #176 SMP Thu Dec 19 17:36:51 CST 2019 sw_64 GNU/Linux

通过 cat /proc/version 命令可以显示内核操作系统详细信息。

root@compute9:/data/nccode/0522DM# cat /proc/version
Linux version 4.4.131-20190301.kylin.server.YUN+-generic (YHKYLIN-OS@Kylin) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) ) #kylin SMP Fri Mar 1 15:57:26 CST 2019

通过 lsb_release -a 命令可以显示操作系统详细信息。

root@compute9:/data/nccode/0522DM# lsb_release -a
No LSB modules are available.
Distributor ID: Kylin
Description:    Kylin 4.0.2
Release:        4.0.2
Codename:       juniper

通过 cat /etc/issue 命令可以显示操作系统简略信息。

root@compute9:/data/nccode/0522DM# cat /etc/issue
Kylin 4.0.2 \n \l

③ 显示CPU相关信息

通过 cat /proc/cpuinfo 命令可以显示 CPU 相关信息。

root@sw6a:~# cat /proc/cpuinfo
cpu                     : sw
cpu model               : sw
cpu variation           : 1
cpu revision            : SW6A
cpu serial number       :
system type             : Aere
system variation        : Aere
system revision         : 0
system serial number    :
CPU frequency [MHz]     : 1600.00
cpu MHz : 1600.00
page size [bytes]       : 8192
phys. address bits      : 48
BogoMIPS                : 3200.00
kernel unaligned acc    : 0 (pc=0,va=0)
user unaligned acc      : 11024109263 (pc=120e79c00,va=2000151a666)
platform string         : N/A
cpus detected           : 16
cpus active             : 16
cpu active mask         : 000000000000ffff
cpus core_start         : 000000000000ffff
L1 Icache               : 32K, 4-way, 128b line
L1 Dcache               : 32K, 4-way, 128b line
L2 cache                : 512K, 8-way, 128b line
L3 cache                : 32768K, 8-way, 128b line

④ 显示磁盘使用情况

通过 df -h 命令可以显示磁盘使用情况。

root@sw6a:~# df -h
文件系统        容量  已用  可用 已用% 挂载点
udev             63G     0   63G    0% /dev
tmpfs            13G   25M   13G    1% /run
/dev/sda2        99G   32G   63G   34% /
tmpfs            63G     0   63G    0% /dev/shm
tmpfs           5.0M     0  5.0M    0% /run/lock
tmpfs            63G     0   63G    0% /sys/fs/cgroup
/dev/sda1       232M   60M  161M   27% /boot
tmpfs            13G  8.0K   13G    1% /run/user/110
tmpfs            13G   72K   13G    1% /run/user/0
tmpfs            13G     0   13G    0% /run/user/1001

⑤ 显示网卡信息

通过 ethtool eth0 命令可以显示网卡相关信息。

root@sw6a:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: ug
        Wake-on: d
        Current message level: 0x0000003f (63)
                               drv probe link timer ifdown ifup
        Link detected: yes

⑥ 显示centos版本信息

通过 cat /etc/issue 命令可以显示 centos 版本信息。

root@sw6a:~# cat /etc/issue
deepin GNU/Linux 15 \n \l

⑦ 显示磁盘分区情况

通过 fdisk -l 命令可以显示磁盘分区情况。

root@sw6a:~# fdisk -l
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EB619DDD-154F-4C5F-8F8E-A3398071DD57
Device         Start       End   Sectors   Size Type
/dev/sda1       2048    499711    497664   243M Linux filesystem
/dev/sda2     499712 212082687 211582976 100.9G Linux filesystem
/dev/sda3  212082688 468860927 256778240 122.5G Linux swap

⑧ 显示内存相关信息

通过 cat /proc/meminfo 命令可以显示内存相关信息。

root@sw6a:~# cat /proc/meminfo
MemTotal:       131469720 kB
MemFree:        95030168 kB
MemAvailable:   119071160 kB
Buffers:         1539048 kB
Cached:         21550632 kB
SwapCached:            0 kB
Active:         31452832 kB
Inactive:        3369336 kB
Active(anon):   11738056 kB
Inactive(anon):    26504 kB
Active(file):   19714776 kB
Inactive(file):  3342832 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:      128389112 kB
SwapFree:       128389112 kB
Dirty:               240 kB
Writeback:             0 kB
AnonPages:      11732696 kB
Mapped:           364904 kB
Shmem:             32040 kB
Slab:            1239864 kB
SReclaimable:    1155200 kB
SUnreclaim:        84664 kB
KernelStack:       12496 kB
PageTables:        34520 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    194123968 kB
Committed_AS:   41329400 kB
VmallocTotal:    8388608 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       8192 kB

⑨ 显示可用块设备情况

通过 lsblk 命令可以显示可用块设备情况。

root@sw6a:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 223.6G  0 disk
├─sda1   8:1    0   243M  0 part /boot
├─sda2   8:2    0 100.9G  0 part /
└─sda3   8:3    0 122.5G  0 part [SWAP]

第二章:获取更多信息

① 显示开机相关信息

通过 dmesg | more 命令可以显示开机信息,里面会包含开机过程中所有内核可以检测到的驱动和设备信息,常用该命令来检测系统故障。

root@sw6a:~# dmesg | more
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.15-deepin-aere (deepin@node1) (SWREACH GCC5.3.0-54 (20181101)
) #176 SMP Thu Dec 19 17:36:51 CST 2019
[    0.000000] Setup arch sys_type = 0x37, hwrpb->cpuid:0xb,hwrpb = 0xfffffc0000820000
[    0.000000] hwrpb->revision = 0x0.
[    0.000000] sw_mv.vector_name = sw.
[    0.000000] Booting on Aere variation Aere using machine vector sw
[    0.000000] Major Options: SMP LEGACY_START DISCONTIGMEM NUMA MAGIC_SYSRQ
[    0.000000] Command line: quiet splash net.ifnames=0 audit=0 apparmor=0 root=UUID=0d170bfd-
f28e-4ba8-96a4-195abcb3a5ae
[    0.000000] Raw memory layout:
[    0.000000]  memcluster  0, usage 0, start     1144, end  4194304
[    0.000000]  memcluster  1, usage 0, start  4195448, end  8388608
[    0.000000]  memcluster  2, usage 0, start  8389752, end 12582912
[    0.000000]  memcluster  3, usage 0, start 12584056, end 16777216
[    0.000000] Initializing bootmem allocator on Node ID 0
[    0.000000]  memcluster  0, usage 0, start     1144, end  4194304
[    0.000000]  Detected node memory:   start     1144, end  4194304
[    0.000000]  freeing pages 1144:4194304
[    0.000000] Initializing bootmem allocator on Node ID 1
[    0.000000]  memcluster  1, usage 0, start  4195448, end  8388608
[    0.000000]  Detected node memory:   start  4195448, end  8388608
[    0.000000]  freeing pages 4195448:8388608
[    0.000000] Initializing bootmem allocator on Node ID 2
[    0.000000]  memcluster  2, usage 0, start  8389752, end 12582912
[    0.000000]  Detected node memory:   start  8389752, end 12582912
[    0.000000]  freeing pages 8389752:12582912
[    0.000000] Initializing bootmem allocator on Node ID 3
[    0.000000]  memcluster  3, usage 0, start 12584056, end 16777216
[    0.000000]  Detected node memory:   start 12584056, end 16777216
[    0.000000]  freeing pages 12584056:16777216
[    0.000000] reserved pages for pcie memory space 458752:524288
--More--

② 显示详细硬件信息

通过 dmidecode | more 命令可以显示各硬件的详细信息。

[root@taishan-kylinosv10-18 proc]# dmidecode | more
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Table at 0x2FC60000.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
        Vendor: Huawei Corp.
        Version: 0.86
        Release Date: 07/17/2019
        Address: 0x5F000
        Runtime Size: 644 kB
        ROM Size: 6144 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
                Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
                5.25"/360 kB floppy services are supported (int 13h)
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                8042 keyboard services are supported (int 9h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 0.0
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Huawei
        Product Name: TaiShan 2280 V2
--More--

喜欢的点个赞❤吧!


目录
相关文章
|
Ubuntu 物联网 Linux
从零安装一个Linux操作系统几种方法,以Ubuntu18.04为例
一切就绪后,我们就可以安装操作系统了。当系统通过优盘引导起来之后,我们就可以看到跟虚拟机中一样的安装向导了。之后,大家按照虚拟机中的顺序安装即可。 好了,今天主要介绍了Ubuntu Server版操作系统的安装过程,关于如何使用该操作系统,及操作系统更深层的原理,还请关注本号及相关圈子。
|
XML 缓存 Linux
在Linux环境下解决Visual Studio Code字体显示异常和字体替换方法。
解决Linux下VS Code字体显示异常,需要对Linux字体渲染机制有所理解,并对VS Code的配置选项进行合理设置。替换字体时则要通过系统字体配置或VS Code设置来完成。通过上述方法,可以有效地解决字体显示问题,从而提升代码编辑的视觉体验。
1717 21
|
12月前
|
缓存 监控 Linux
Linux系统清理缓存(buff/cache)的有效方法。
总结而言,在大多数情形下你不必担心Linux中buffer与cache占用过多内存在影响到其他程序运行;因为当程序请求更多内存在没有足够可用资源时,Linux会自行调整其占有量。只有当你明确知道当前环境与需求并希望立即回收这部分资源给即将运行重负载任务之前才考虑上述方法去主动干预。
2621 10
|
12月前
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。
|
Ubuntu Linux 图形学
推广与体验Ubuntu Linux的便捷方法
如果你的朋友或家人对尝试Linux感兴趣,但希望在安装之前先体验一下,你可以分享以下链接给他们:Ubuntu在线导览。通过这个链接,他们可以在任何地方轻松体验Ubuntu,无需安装即可深入了解这个流行的操作系统。
|
监控 Linux 网络安全
FinalShell SSH工具下载,服务器管理,远程桌面加速软件,支持Windows,macOS,Linux
FinalShell是一款国人开发的多平台SSH客户端工具,支持Windows、Mac OS X和Linux系统。它提供一体化服务器管理功能,支持shell和sftp同屏显示,命令自动提示,操作便捷。软件还具备加速功能,提升访问服务器速度,适合普通用户和专业人士使用。
3811 0
|
网络协议 Ubuntu Linux
Wireguard in Linux的安装方法
本文介绍了如何在Ubuntu和Rocky Linux中安装配置WireGuard,并探讨了配置过程中可能出现的DNS泄露问题及解决方法,包括通过nmtui设置DNS及调整DNS优先级参数。
|
弹性计算 运维 监控
ECS使用与Linux环境搭建
本文主要记录ECS使用中,安全组配置,Linux下生成环境搭建等。
ECS使用与Linux环境搭建
|
10月前
|
弹性计算 运维 安全
阿里云轻量应用服务器与云服务器ECS啥区别?新手帮助教程
阿里云轻量应用服务器适合个人开发者搭建博客、测试环境等低流量场景,操作简单、成本低;ECS适用于企业级高负载业务,功能强大、灵活可扩展。二者在性能、网络、镜像及运维管理上差异显著,用户应根据实际需求选择。
821 10