-
Notifications
You must be signed in to change notification settings - Fork 29
/
debug.py
executable file
·54 lines (44 loc) · 1.03 KB
/
debug.py
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
#!/usr/bin/env python3
import getpass
import traceback
import qnapstats
host = input("Host (prefix with 'https://' if needed): ")
port = int(input("Port: "))
username = input("Username: ")
password = getpass.getpass("Password: ")
qnap = qnapstats.QNAPStats(host, port, username, password, debugmode=True, verify_ssl=False)
try:
qnap.get_system_stats()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_system_health()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_smart_disk_health()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_volumes()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_bandwidth()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_external_drive()
except Exception as e:
print(e.args)
traceback.print_exc()
try:
qnap.get_storage_information_on_external_device()
except Exception as e:
print(e.args)
traceback.print_exc()