Commands
From QNAPedia
Contents |
QNAP specific commands
QNAP products have specific commandline tools. They are described below:
hdsuspend
This command sets hdd spindown timeout. The value is probably in minutes.
[~] # hdsuspend Usage:hdsuspend -a -t [timeout] Usage:hdsuspend -n [disk_ number] -t [timeout]
-a All disk
-n disk_ number Specify to set fisk number
-t timeout Specify to set timeout
pic_raw
This command controls the hardware of your QNAP. For example, You can control the blue LED and the buzzer. Reported to work on TS-109, TS-112 and TS-210.
pic_raw 75 # blue led off pic_raw 76 # blue led blinks rapidly pic_raw 77 # blue led on pic_raw 78 # blue led blinks slowly pic_raw 80 # short beep pic_raw 81 # long beep
The following commands control the status LED. Confirmed to work on TS-112, however most commands get reset on my QNAP after a while and the status LED returns to the old state.
pic_raw 84 # status led red blink pic_raw 85 # status led green blink pic_raw 86 # status led green on pic_raw 87 # status led red on pic_raw 88 # status led blink red/green pic_raw 89 # status led off pic_raw 90 # status led green blink slow pic_raw 91 # status led red blink slow pic_raw 92 # status led green/red blink slow
set_status_led
Controls the status led. Reported to work on TS-109, TS-112 and TS-210.
set_status_led 1 1 # green blink set_status_led 1 0 # green on set_status_led 2 1 # red\green blink
setcfg and getcfg
Commands are used for writting and reading field values in a text configuration files.
setcfg
Sets a specified value to a field.
getcfg
Reads value of a specified field.
examples
/etc/default_config/uLinux.conf
/mnt/HDA_ROOT/.config/
setcfg Misc Configured TRUE -f /mnt/HDA_ROOT/.config/uLinux.conf - flag indicating configured system
setcfg Misc "system stop temp" 34 -f /etc/config/uLinux.conf
setcfg Misc "system low temp" 44 -f /etc/config/uLinux.conf
setcfg Misc "system high temp" 60 -f /etc/config/uLinux.conf
getcfg section var2 -d "" -f file.ini
setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf
setcfg global "socket options" "TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_SNDBUF=65536 SO_RCVBUF=65536" -f ${CONFIG}
setcfg global "username level" 0 -f ${CONFIG}
getcfg System "Internal Model" -u -d TS-109
See also
Sources
- http://forum.qnap.com/viewtopic.php?t=18083
- http://forum.qnap.com/viewtopic.php?t=12087
- http://forum.qnap.com/viewtopic.php?t=39875