Skip to content

Commit 7da4af4

Browse files
committed
include soc temp in /api/cpu
1 parent 9e5b0ab commit 7da4af4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Server/rpi_metrics_server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ def api_ip():
133133
def api_cpu():
134134
"""Return the CPU usage as JSON"""
135135
cpu = get_cpu_usage()
136-
return jsonify({"CPU Usage": cpu})
136+
temp = get_soc_temp()
137+
return jsonify({"CPU Usage": cpu,
138+
"SoC Temperature": temp
139+
})
137140

138141
@app.route("/api/shutdown", methods=['POST'])
139142
@limiter.limit("5 per hour")

0 commit comments

Comments
 (0)