# CPU 占用

轮询 COLUMNS=200 TERM=dumb top -1 -n 1 -b

1
%Cpu0  : 27.8 us, 33.3 sy,  0.0 ni, 38.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
  • % Cpu0: 表示这是关于 CPU 核心 0 的统计信息。如果你的系统有多个核心(例如,% Cpu0, % Cpu1, % Cpu2 等),并且你使用了显示单核心统计的选项(如之前的 -1),就会看到类似的针对每个核心的行。如果没有使用该选项或者只显示了一个 % Cpu (s) 的总览行,那么这些统计数据就是所有核心的平均值。
  • us: user (us)。表示 CPU 在用户空间运行非优先级的进程所占用的时间百分比。这通常是你的应用程序(比如浏览器、文本编辑器、自定义脚本等)运行的时间。在这个例子中,CPU 0 有 27.8% 的时间在跑用户进程。
  • sy: system (sy)。表示 CPU 在内核空间运行进程所占用的时间百分比。这包括执行系统调用、处理内核任务等。在这个例子中,CPU 0 有 33.3% 的时间在跑内核任务。
  • ni: nice (ni)。表示 CPU 在用户空间运行已经被赋予了非标准优先级(通过 nice 或 renice 命令调整)的进程所占用的时间百分比。这个例子中是 0.0%,表示没有运行或没有花时间在运行被调整过优先级的用户进程。
  • id: idle (id)。表示 CPU 处于空闲状态的时间百分比。CPU 没有在执行任何任务。这个例子中,CPU 0 有 38.9% 的时间是空闲的。
  • wa: iowait (wa)。表示 CPU 在等待 I/O 操作完成所花费的时间百分比。例如,当一个进程需要读写磁盘,而磁盘很慢时,CPU 可能会进入等待状态。CPU 虽然空闲,但它是在等待外部设备。这个例子中是 0.0%,表示 CPU 0 没有因为等待 I/O 而空闲。
  • hi: hardware interrupt (hi)。表示 CPU 在处理硬件中断所花费的时间百分比。硬件中断由硬件设备(如网卡、硬盘控制器)发出。这个例子中是 0.0%。
  • si: software interrupt (si)。表示 CPU 在处理软件中断(也称为软中断或延迟过程调用 - DPC)所花费的时间百分比。这些通常与内核子系统有关,比如处理网络数据包的下半部分。这个例子中是 0.0%。
  • st: steal (st)。这个指标主要出现在虚拟化环境中(如 KVM, Xen)。它表示 CPU 的计算时间被宿主机(hypervisor)“偷走” 去执行其他任务(例如,服务其他虚拟机)所占用的百分比。如果你的系统是物理机,这个值通常是 0.0%。这个例子中是 0.0%,可能表示这不是一个虚拟化环境,或者宿主机没有 “偷” 这个核心的时间。

占用率的计算方式是:

1
占用率 = (us + sy + ni) / (us + sy + ni + id + wa + hi + si + st) * 100%

在这个例子中:

1
2
占用率 = (27.8 + 33.3 + 0.0) / (27.8 + 33.3 + 0.0 + 38.9 + 0.0 + 0.0 + 0.0 + 0.0) * 100%
占用率 = 61.1 / 100 * 100% = 61.1%

# 获取主板、CPU 等型号

1
2
3
dmidecode
dmidecode -t baseboard
dmidecode -t processor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
dmidecode -t processor
# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0015, DMI type 4, 48 bytes
Processor Information
Socket Designation: AM4
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: ******
Signature: Family 25, Model 80, Stepping 0
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
HTT (Multi-threading)
Version: AMD Ryzen 7 5700G with Radeon Graphics
Voltage: 1.4 V
External Clock: 100 MHz
Max Speed: 4650 MHz
Current Speed: 3800 MHz
Status: Populated, Enabled
Upgrade: Socket AM4
L1 Cache Handle: 0x0012
L2 Cache Handle: 0x0013
L3 Cache Handle: 0x0014
Serial Number: Unknown
Asset Tag: Unknown
Part Number: Unknown
Core Count: 8
Core Enabled: 8
Thread Count: 16
Characteristics:
64-bit capable
Multi-Core
Hardware Thread
Execute Protection
Enhanced Virtualization
Power/Performance Control

# 获取挂载的硬盘

1
lsblk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  63.4M  1 loop /lib
loop1         7:1    0 339.2M  1 loop /usr
loop2         7:2    0     1G  0 loop /etc/libvirt
sda           8:0    1  29.9G  0 disk /boot
sdb           8:16   0  14.6T  0 disk 
└─sdb1        8:17   0  14.6T  0 part 
sdc           8:32   0   7.3T  0 disk 
└─sdc1        8:33   0   7.3T  0 part 
sdd           8:48   0   7.3T  0 disk 
└─sdd1        8:49   0   7.3T  0 part 
md1p1         9:1    0  14.6T  0 md   /mnt/disk1
md2p1         9:2    0   7.3T  0 md   /mnt/disk2
md3p1         9:3    0   7.3T  0 md   /mnt/disk3
nvme0n1     259:0    0 931.5G  0 disk 
└─nvme0n1p1 259:1    0 931.5G  0 part /mnt/cache

# 内存占用

1
free
1
2
3
               total        used        free      shared  buff/cache   available
Mem: 38Gi 17Gi 307Mi 242Mi 20Gi 20Gi
Swap: 0B 0B 0B

Mem 行 (物理内存):

  • total: 系统总的物理内存大小。
  • used: 当前被各种进程和服务正在使用的内存总量(包括应用程序、内核、缓冲区和缓存的总和)。
  • free: 完全没有被使用的物理内存。
  • shared: 被进程共享使用的内存,通常由 tmpfs 或进程间通信使用。
  • buff/cache: 被内核用于缓冲区和页面缓存的内存。这些内存是为了提高系统性能(如文件读写速度)而使用的。重要提示: 这部分内存虽然被标记为 “使用”,但它是可以随时被应用程序回收利用的。当应用程序需要更多内存时,内核会自动减少 buff/cache 的大小来释放内存给应用程序使用。
  • available: 这是估算的应用程序可以不经过交换过程(swapping)而直接获得的内存量。它是 free 内存加上 buff/cache 中可回收的部分。通常,available 是衡量当前系统有多少内存可以用于启动新应用或满足现有应用内存需求的一个更好指标,而不是看 free。

Swap 行 (交换空间):

  • total: 总的交换空间大小。
  • used: 正在使用的交换空间大小。
  • free: 空闲的交换空间大小。交换空间是硬盘上的一块区域,当物理内存不足时,系统会将不常用的内存页写入交换空间。

# 获取网卡信息

1
2
ip l
ip a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq master bond0 state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff

# 获取网卡流量

轮询 ip -s link show

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped missed mcast
6611929 11622 0 0 0 0
TX: bytes packets errors dropped carrier collsns
6611929 11622 0 0 0 0
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq master bond0 state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
615773925477 1322090044 0 0 908 2065926
TX: bytes packets errors dropped carrier collsns
1781318282193 2901165835 0 0 0 0
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
615773925477 1322090044 0 824 908 2065926
TX: bytes packets errors dropped carrier collsns
1781318282193 2901165835 0 0 0 0
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
502586498842 400264772 0 0 0 5941722
TX: bytes packets errors dropped carrier collsns
3026135465340 206266198 0 0 0 0
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether *MAC* brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
1617902250793 2702923795 0 0 0 0
TX: bytes packets errors dropped carrier collsns
3079978182171 2940703536 0 434726 0 0
  • RX packets: Receiver packets(接收的数据包)。表示该网络接口自启动(或上次统计重置)以来,成功接收到的网络数据包总数。
  • TX packets: Transmitter packets(发送的数据包)。表示该网络接口自启动以来,成功发送出去的网络数据包总数。
  • RX bytes: Receiver bytes(接收的字节数)。表示该网络接口自启动以来,成功接收到的总数据量,以字节为单位。
  • TX bytes: Transmitter bytes(发送的字节数)。表示该网络接口自启动以来,成功发送出去的总数据量,以字节为单位。

# 获取风扇转速

1
sensors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
amdgpu-pci-0500
Adapter: PCI adapter
vddgfx: 1.38 V
vddnb: 949.00 mV
edge: +42.0°C
PPT: 39.00 W

k10temp-pci-00c3
Adapter: PCI adapter
CPU Temp: +59.6°C

nct6798-isa-0290
Adapter: ISA adapter
in0: 696.00 mV (min = +0.00 V, max = +1.74 V)
in1: 1.69 V (min = +0.00 V, max = +0.00 V) ALARM
in2: 3.47 V (min = +0.00 V, max = +0.00 V) ALARM
in3: 3.34 V (min = +0.00 V, max = +0.00 V) ALARM
in4: 1.82 V (min = +0.00 V, max = +0.00 V) ALARM
in5: 952.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in6: 1.20 V (min = +0.00 V, max = +0.00 V) ALARM
in7: 3.46 V (min = +0.00 V, max = +0.00 V) ALARM
in8: 3.30 V (min = +0.00 V, max = +0.00 V) ALARM
in9: 912.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in10: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM
in11: 632.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in12: 1.07 V (min = +0.00 V, max = +0.00 V) ALARM
in13: 920.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in14: 912.00 mV (min = +0.00 V, max = +0.00 V) ALARM
fan2: 1355 RPM (min = 0 RPM)
Array Fan: 1111 RPM (min = 0 RPM)
MB Temp: +35.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
CPUTIN: +40.5°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
AUXTIN0: +15.5°C sensor = thermistor
AUXTIN1: -61.0°C sensor = thermistor
AUXTIN2: +12.0°C sensor = thermistor
AUXTIN3: +31.0°C sensor = thermistor
SMBUSMASTER 0: +59.5°C
TSI0_TEMP: +59.6°C
intrusion0: ALARM
intrusion1: ALARM
beep_enable: disabled

nvme-pci-0400
Adapter: PCI adapter
Composite: +38.9°C (low = -273.1°C, high = +81.8°C)
(crit = +84.8°C)
Sensor 1: +38.9°C (low = -273.1°C, high = +65261.8°C)
Sensor 2: +44.9°C (low = -273.1°C, high = +65261.8°C)

上文信息有:风扇转速、主板温度、CPU 温度

# 获取硬盘的 SMART 信息、型号以及温度

1
2
smartctl -a /dev/sdb
smartctl -i /dev/sdb

# 信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.106-Unraid] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Exos X16
Device Model: ST16000NM001G
Serial Number: *******
LU WWN Device Id: *******
Firmware Version: SN03
User Capacity: 16,000,900,661,248 bytes [16.0 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5610
ATA Version is: ACS-4 (minor revision not indicated)
SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue May 13 17:36:05 2025 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

# 温度

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 080 064 044 Pre-fail Always - 109299896
3 Spin_Up_Time 0x0003 090 090 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1105
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 080 060 045 Pre-fail Always - 93549216
9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 5614
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 25
18 Head_Health 0x000b 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 062 051 040 Old_age Always - 38 (Min/Max 21/40)
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 7
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 1235
194 Temperature_Celsius 0x0022 038 049 000 Old_age Always - 38 (0 21 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Pressure_Limit 0x0023 100 100 001 Pre-fail Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 5335h+05m+03.690s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 33984019625
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 60300925881

Airflow_Temperature_Cel 字段是温度

# NVME 硬盘

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 41 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 10%
Data Units Read: 53,160,090 [27.2 TB]
Data Units Written: 74,644,446 [38.2 TB]
Host Read Commands: 1,186,718,335
Host Write Commands: 1,453,271,174
Controller Busy Time: 17,262
Power Cycles: 134
Power On Hours: 11,817
Unsafe Shutdowns: 74
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 41 Celsius
Temperature Sensor 2: 47 Celsius

Temperature 字段是温度

# 硬盘剩余空间

1
df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Filesystem       1K-blocks        Used   Available Use% Mounted on
rootfs 20202672 236296 19966376 2% /
tmpfs 131072 5400 125672 5% /run
/dev/sda 31297736 479072 30818664 2% /boot
overlay 20202672 236296 19966376 2% /lib
overlay 20202672 236296 19966376 2% /usr
devtmpfs 8192 0 8192 0% /dev
tmpfs 20219764 0 20219764 0% /dev/shm
tmpfs 131072 5392 125680 5% /var/log
tmpfs 1024 0 1024 0% /mnt/disks
tmpfs 1024 0 1024 0% /mnt/remotes
tmpfs 1024 0 1024 0% /mnt/addons
tmpfs 1024 0 1024 0% /mnt/rootshare
/dev/md1p1 15623792588 11378927852 4244864736 73% /mnt/disk1
/dev/md2p1 7811939620 4745452712 3066486908 61% /mnt/disk2
/dev/md3p1 7811939620 643467780 7168471840 9% /mnt/disk3
/dev/nvme0n1p1 976761560 415004580 558803084 43% /mnt/cache
shfs 31247671828 16767848344 14479823484 54% /mnt/user0
shfs 31247671828 16767848344 14479823484 54% /mnt/user
/dev/loop2 1048576 5980 924356 1% /etc/libvirt

# 获取硬盘休眠状态

smartctl -n standby -i /dev/sdb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.106-Unraid] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Exos X16
Device Model: ST16000NM001G-****
Serial Number: *******
Firmware Version: SN03
User Capacity: 16,000,900,661,248 bytes [16.0 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5610
ATA Version is: ACS-4 (minor revision not indicated)
SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Thu May 15 12:30:19 2025 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Power mode was: IDLE_A

Power mode 字段

休眠中

1
2
3
4
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.106-Unraid] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in STANDBY mode, exit(2)

# 获取 APC UPS 电源状态

/sbin/apcaccess

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
APC      : 001,036,0863
DATE : 2025-05-15 14:00:07 +0800
HOSTNAME : Unraid
VERSION : 3.14.14 (31 May 2016) slackware
UPSNAME : Unraid
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2025-05-11 04:40:03 +0800
MODEL : Back-UPS BK650M2-CH
STATUS : ONLINE
LINEV : 220.0 Volts
LOADPCT : 12.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 50.2 Minutes
MBATTCHG : 40 Percent
MINTIMEL : 10 Minutes
MAXTIME : 0 Seconds
SENSE : Low
LOTRANS : 160.0 Volts
HITRANS : 278.0 Volts
ALARMDEL : No alarm
BATTV : 13.5 Volts
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : OK
STATFLAG : 0x05000008
SERIALNO : 9B***48
BATTDATE : 2023-01-04
NOMINV : 220 Volts
NOMBATTV : 12.0 Volts
NOMPOWER : 390 Watts
FIRMWARE : 294803G -292804G
END APC : 2025-05-15 14:00:36 +0800

# 虚拟机

# 获取列表

1
virsh list --all
1
2
3
4
5
 Id   Name                  State
--------------------------------------
1 Windows Server 2025 running
- Home Assistant shut off
- OpenWRT shut off

# 获取网络绑定

1
virsh domifaddr "Windows Server 2025" --source agent
1
2
3
4
5
6
7
8
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
以太网 **MAC** ipv6 *IPV6*
- - ipv6 *IPV6*
- - ipv6 fe80::6e79:7ca7:d634:3909%2/64
- - ipv4 192.168.31.224/24
Loopback Pseudo-Interface 1 ipv6 ::1/128
- - ipv4 127.0.0.1/8

# 获取图片

  1. 执行 virsh dumpxml "Windows Server 2025" 获取 xml,解析 vmtemplate xmlns="unraid" name="Windows 10" icon="windows11.png" os="windows10"/>
  2. 获取 windows11.png

# Docker

# 获取列表

1
docker ps -a
1
2
3
4
CONTAINER ID   IMAGE                                     COMMAND                CREATED        STATUS                      PORTS     NAMES
f5413980c105 docker.xuanyuan.me/qdrant/qdrant:latest "./entrypoint.sh" 5 weeks ago Exited (143) 5 weeks ago Qdrant
bd8487df9798 jellyfin/jellyfin:latest "/jellyfin/jellyfin" 7 months ago Exited (137) 6 months ago Jellyfin
08588b263eb3 portainer/portainer-ce:latest "/portainer" 7 months ago Exited (2) 5 weeks ago PortainerCE

# 获取图片

1
docker inspect $id

[0].Config.Labels."net.unraid.docker.icon" => "https://raw.githubusercontent.com/EMP83/unraid-templates/main/PortainerCE/Portainer.png"
可能不存在,需要做好处理

阅读次数