-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ATA disk mapping, zpool check, netdev check, and a config file #15
Conversation
Hope someone with other devices can test the new script (especially those have DXP6800), and check the outputs of the above commands. It uses the ATA mapping by default. |
Awesome! ugreen-netdevmon@.service working fine, including gateway check and link speed detection and colors. |
I can confirm the correctness for DXP6800 for these two mappings |
scripts/ugreen-diskiomon
Outdated
for i in "${!led_map[@]}"; do | ||
led=${led_map[i]} | ||
if [[ -d /sys/class/leds/$led ]]; then | ||
echo oneshot > /sys/class/leds/$led/trigger | ||
echo 1 > /sys/class/leds/$led/invert | ||
echo 100 > /sys/class/leds/$led/delay_on | ||
echo 100 > /sys/class/leds/$led/delay_off | ||
echo "255 255 255" > /sys/class/leds/$led/color | ||
echo "$COLOR_DISK_HEALTH" > /sys/class/leds/$led/color | ||
|
||
# find corresponding device | ||
_tmp_str=${MAPPING_METHOD}_map[@] | ||
_tmp_arr=(${!_tmp_str}) | ||
dev=${dev_map[${_tmp_arr[i]}]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I get two errors: (because I only have 6 and not 8 disk slots)
/usr/bin/ugreen-diskiomon: line 147: dev_map: bad array subscript
/usr/bin/ugreen-diskiomon: line 147: dev_map: bad array subscript
DEBUG: _tmp_arr[0]='ata3'
DEBUG: _tmp_arr[1]='ata4'
DEBUG: _tmp_arr[2]='ata5'
DEBUG: _tmp_arr[3]='ata6'
DEBUG: _tmp_arr[4]='ata1'
DEBUG: _tmp_arr[5]='ata2'
DEBUG: _tmp_arr[6]=''
DEBUG: _tmp_arr[7]=''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is fixed now
There is no model series DX4600, the correct series would be DXP4800 (Plus). DXP4800*) # tested on DXP4800 Plus
echo "Found UGREEN DXP4800 series" |
Oh, my model is 4600, it is a version sold only in China (~2023). |
Oh how interesting, then the block has to be expanded to include the 4800 models. |
/etc/ugreen-leds.conf
for environment variables used inugreen-diskiomon
(seescripts/ugreen-leds.conf
)ugreen-diskiomon.service
andugreen-netdevmon@<device name>.service
Below are some de-compiled codes of
hwmonitor
in UGOS, so I think the ATA mapping would be a good choice: