mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
hw monitoring
This commit is contained in:
@@ -44,10 +44,14 @@ RUN pip install -r requirements.txt
|
||||
RUN mkdir -p \
|
||||
/etc/kvmd/nginx \
|
||||
/var/lib/kvmd/msd/{images,meta} \
|
||||
/opt/vc/bin \
|
||||
/fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0 \
|
||||
&& cd /fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0 \
|
||||
&& touch file \
|
||||
&& echo 1 > cdrom \
|
||||
&& echo 1 > ro
|
||||
/fake_sysfs/sys/class/thermal/thermal_zone0 \
|
||||
/fake_procfs/proc/device-tree
|
||||
|
||||
COPY testenv/fakes/vcgencmd /opt/vc/bin/
|
||||
COPY testenv/fakes/msd/* /fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0/
|
||||
COPY testenv/fakes/cpu_temp /fake_sysfs/sys/class/thermal/thermal_zone0/temp
|
||||
COPY testenv/fakes/dt_model /fake_procfs/proc/device-tree/model
|
||||
|
||||
CMD /bin/bash
|
||||
|
||||
1
testenv/fakes/cpu_temp
Normal file
1
testenv/fakes/cpu_temp
Normal file
@@ -0,0 +1 @@
|
||||
36511
|
||||
1
testenv/fakes/dt_model
Normal file
1
testenv/fakes/dt_model
Normal file
@@ -0,0 +1 @@
|
||||
Virtual Raspberry Pi
|
||||
1
testenv/fakes/msd/cdrom
Normal file
1
testenv/fakes/msd/cdrom
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
0
testenv/fakes/msd/file
Normal file
0
testenv/fakes/msd/file
Normal file
1
testenv/fakes/msd/ro
Normal file
1
testenv/fakes/msd/ro
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
5
testenv/fakes/vcgencmd
Executable file
5
testenv/fakes/vcgencmd
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
case $1 in
|
||||
get_throttled) echo "throttled=0x0";;
|
||||
measure_temp) echo "temp=35.0'C";;
|
||||
esac
|
||||
@@ -2,6 +2,10 @@ kvmd:
|
||||
server:
|
||||
unix_mode: 0666
|
||||
|
||||
hw:
|
||||
procfs_prefix: /fake_procfs
|
||||
sysfs_prefix: /fake_sysfs
|
||||
|
||||
hid:
|
||||
device: /dev/ttyS10
|
||||
noop: true
|
||||
|
||||
@@ -2,6 +2,10 @@ kvmd:
|
||||
server:
|
||||
unix_mode: 0666
|
||||
|
||||
hw:
|
||||
procfs_prefix: /fake_procfs
|
||||
sysfs_prefix: /fake_sysfs
|
||||
|
||||
hid:
|
||||
keyboard:
|
||||
device: /dev/null
|
||||
|
||||
Reference in New Issue
Block a user