1. 程式人生 > 其它 >Redis之客戶端工具RedisInsight

Redis之客戶端工具RedisInsight

硬體資訊

伺服器型號序列號

dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial" 示例:

[root@halberd1 ~]# dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"
        Manufacturer: VMware, Inc.
        Product Name: VMware Virtual Platform
        Serial Number: VMware-56 4d ed 7d 00 f8 90 c2-76 6f d8 36 bb da 40 9e

主機板型號

dmidecode |grep -A16 "System Information$"

檢視BIOS資訊

dmidecode -t bios

檢視記憶體槽及記憶體條

# 檢視記憶體槽
dmidecode|grep  -P  -A5  "Memory\s+Device"|grep Size|grep -v Range
# 檢視最大支援記憶體容量
dmidecode|grep -P  'Maximum\s+Capacity'
# 檢視記憶體的頻率
dmidecode|grep -A16 "MemoryDevice"|grep 'Speed'

檢視CPU

# 檢視CPU資訊(型號)
[root@AAA ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
        Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz

# 檢視物理CPU個數
[root@AAA ~]# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 檢視每個物理CPU中core的個數(即核數)
[root@AAA ~]# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores    : 6

# 檢視邏輯CPU的個數
[root@AAA ~]# cat /proc/cpuinfo| grep "processor"| wc -l

檢視記憶體

dmidecode -t memory|grep -E 'Asset|Manufacturer'

檢視磁碟基本資訊

使用 smartctl -x <device> 命令來檢視廠商,型號等。

[root@halberd1 ~]# smartctl -x /dev/sda1
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-147.el8.x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               VMware
Product:              Virtual disk
Revision:             1.0
User Capacity:        107,374,182,400 bytes [107 GB]
Logical block size:   512 bytes
LU is fully provisioned
Device type:          disk
Local Time is:        Tue Apr 28 23:59:27 2020 EDT
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Unavailable
Writeback Cache is:   Unavailable

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging

檢視網絡卡基本資訊

使用lshw 命令來檢視

[root@halberd1 ~]# lshw -c network
  *-network
       description: Ethernet interface
       product: VMXNET3 Ethernet Controller
       vendor: VMware
       physical id: 0
       bus info: pci@0000:0b:00.0
       logical name: ens192
       version: 01
       serial: 00:0c:29:da:40:9e
       size: 10Gbit/s
       capacity: 10Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list rom ethernet physical logical tp 1000bt-fd 10000bt-fd
       configuration: autonegotiation=off broadcast=yes driver=vmxnet3 driverversion=1.4.16.0-k-NAPI duplex=full ip=10.10.100.150 latency=0 link=yes multicast=yes port=twisted pair speed=10Gbit/s
       resources: irq:19 memory:fd4fc000-fd4fcfff memory:fd4fd000-fd4fdfff memory:fd4fe000-fd4fffff ioport:5000(size=16) memory:fd400000-fd40ffff
  *-network
       description: Ethernet interface
       product: VMXNET3 Ethernet Controller
       vendor: VMware
       physical id: 0
       bus info: pci@0000:13:00.0
       logical name: ens224
       version: 01
       serial: 00:0c:29:da:40:a8
       size: 10Gbit/s
       capacity: 10Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list rom ethernet physical logical tp 1000bt-fd 10000bt-fd
       configuration: autonegotiation=off broadcast=yes driver=vmxnet3 driverversion=1.4.16.0-k-NAPI duplex=full ip=172.26.9.19 latency=0 link=yes multicast=yes port=twisted pair speed=10Gbit/s
       resources: irq:16 memory:fd3fc000-fd3fcfff memory:fd3fd000-fd3fdfff memory:fd3fe000-fd3fffff ioport:6000(size=16) memory:fd300000-fd30ffffe

 

效能分析

佔用CPU最高的程序

ps -aux | sort -k3nr | head -n 10 或者使用pidstat 命令,示例如下:

pidstat -ul| head -3;pidstat -u |awk '{if ($6 >1) print $0}'

只是pid 的命令不是很合適,因為不同的作業系統輸出的列數不是固定的。需要自行修改awk if 中的$6。

佔用實體記憶體最多的程序

ps -aux | sort -k4nr | head -n 10

時間相關

  • 修改時區

    • CentOS 7 /CentOS8
    timedatectl set-timezone 'Asia/Shanghai'
    

Author: halberd.lee

Created: 2020-04-29 Wed 18:04

Validate