QuecManager 1.0.2 BETA
- Added signal graphs for RSRP, RSRQ, and SINR - Added ethernet connection details - Added memory usage details - Added ping graph Known bug: Signal graphs may sometimes show inaccurate values. It seems to be a fetching error but Ill try to find the real root cause as soon as possible Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
This commit is contained in:
15
ipk-source/sdxpinn-quecmanager-beta/root/www/cgi-bin/home/memory.sh
Executable file
15
ipk-source/sdxpinn-quecmanager-beta/root/www/cgi-bin/home/memory.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set the content type to JSON
|
||||
echo "Content-Type: application/json"
|
||||
echo ""
|
||||
|
||||
# Run free command and capture the output, using -b for bytes
|
||||
free_output=$(free -b)
|
||||
|
||||
# Extract memory information using awk
|
||||
# Skip the header, take the Mem: line, and extract total, used, and available
|
||||
memory_info=$(echo "$free_output" | awk '/Mem:/ {print "{\"total\": " $2 ", \"used\": " $3 ", \"available\": " $7 "}"}')
|
||||
|
||||
# Output the JSON
|
||||
echo "$memory_info"
|
||||
Reference in New Issue
Block a user