QNAP QTS
API
Quelle:
v5: https://download.qnap.com/dev/QNAP_QTS_File_Station_API_v5.pdf
v4: https://download.qnap.com/dev/QNAP_QTS_File_Station_API_v4.1.pdf
- Login
Das Passwort muss Base64-encodiert werden. Bei erfolgreichem Login erhält man ein JSON mit einer Session-ID namens
sid
zurück, die für spätere Anfragen verwendet werden muss.curl "http://$HOST:8080/cgi-bin/filemanager/wfm2Login.cgi?user=$USER&pwd=$BASE64_ENCODED_PASSWORD"
Ergebnis:
{ "status": 1, "sid": "1x93w4qy", ... "authPassed": 1, "version": "5.1.0", "build": "20200907" }
- Ordnergrösse abfragen
size
wird in Bytes zurückgeliefert. Im Beispiel ist fürQNAME
der Name eines Unterverzeichnisses angegeben.QPATH=/backups/daily QNAME=documents curl "http://$HOST:8080/cgi-bin/filemanager/utilRequest.cgi?func=get_file_size&sid=$SID&path=$QPATH&name=$QNAME&total=1"
Ergebnis:
{ "status": 1, "size": "27596096", "folderCnt": "11", "fileCnt": "161" }
Netzwerk
Prüfen, welcher Bonding-Mode aktiv ist, per SSH:
[~] # cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth4
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth4
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 24:5e:...
Slave queue ID: 0
Slave Interface: eth5
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 24:5e:...
Slave queue ID: 0
Built on 2023-09-21