Compare commits
2 Commits
601bed9a34
...
ca77ce4c45
Author | SHA1 | Date | |
---|---|---|---|
ca77ce4c45 | |||
9a9a98edf7 |
|
@ -3,5 +3,5 @@
|
||||||
Agent for my-idlers
|
Agent for my-idlers
|
||||||
|
|
||||||
```
|
```
|
||||||
export API_KEY=<API_KEY> HOST=https://idlers.test2.sysdeploy.org/api/servers;python3 main.py
|
export AGENT_API=<API_KEY> HOST=https://idlers.test2.sysdeploy.org/api/servers;python3 agent.py
|
||||||
```
|
```
|
6
agent.py
6
agent.py
|
@ -295,8 +295,14 @@ class ServerData:
|
||||||
size = ram.get('Size', 'Unknown')
|
size = ram.get('Size', 'Unknown')
|
||||||
speed = ram.get('Speed', 'Unknown')
|
speed = ram.get('Speed', 'Unknown')
|
||||||
configured_speed = ram.get('Configured Memory Speed', 'Unknown')
|
configured_speed = ram.get('Configured Memory Speed', 'Unknown')
|
||||||
|
try:
|
||||||
total_width = int(ram.get('Total Width', "0").split()[0])
|
total_width = int(ram.get('Total Width', "0").split()[0])
|
||||||
|
except ValueError:
|
||||||
|
total_width = 0
|
||||||
|
try:
|
||||||
data_width = int(ram.get('Data Width', "0").split()[0])
|
data_width = int(ram.get('Data Width', "0").split()[0])
|
||||||
|
except ValueError:
|
||||||
|
data_width = 0
|
||||||
ecc = 'Yes' if total_width > data_width else 'No'
|
ecc = 'Yes' if total_width > data_width else 'No'
|
||||||
serial_number = ram.get('Serial Number', 'Unknown')
|
serial_number = ram.get('Serial Number', 'Unknown')
|
||||||
ram_type = ram.get('Type', 'Unknown')
|
ram_type = ram.get('Type', 'Unknown')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user