Files
conjurer/status_report.sh
gitea f73fd703b7 Tag: 1.24
Intermediate commits (oldest → newest):
- Merge branch 'main' of https://github.com/migatu/conjurer
- Merge branch 'main' of https://github.com/migatu/conjurer
- BGFX
- Function for idv3 and bugfix
- Merge branch 'main' of https://github.com/migatu/conjurer
- Logs additional
- LGFIX
- FIXED!
- Arguments added to the utility.
- Fix old bug
- add exception handling
- Literowka
- Hej hoppsan!
- Add comment
- Fixc Fixc
- Fixit
- Inside joke very boomer much wow
- Fixing logging issues in music_functions.py and other_functions.py
- Maybe this will fix
- test
- test
- another attempt to fix the bug
- Maybe this is the fix ?
- Maybe fix
2025-10-30 16:59:19 +01:00

39 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Script to check and display Raspberry Pi parameters using libgpiod
echo "=== Raspberry Pi System Information ==="
# General system information
echo "Hostname: $(hostname)"
echo "Model: $(cat /proc/device-tree/model | tr -d '\0')"
echo "CPU Temperature: $(vcgencmd measure_temp | cut -d '=' -f2)"
echo "CPU Frequency: $(vcgencmd measure_clock arm | awk -F= '{print $2}') Hz"
echo "GPU Frequency: $(vcgencmd measure_clock core | awk -F= '{print $2}') Hz"
echo "Voltage: $(vcgencmd measure_volts | cut -d '=' -f2)"
# Memory and disk usage
echo "Total Memory: $(free -h | grep Mem | awk '{print $2}')"
echo "Used Memory: $(free -h | grep Mem | awk '{print $3}')"
echo "Free Memory: $(free -h | grep Mem | awk '{print $4}')"
echo "Disk Usage:"
df -h | grep '^/dev/root'
# Network information
echo "IP Address: $(hostname -I | awk '{print $1}')"
echo "MAC Address: $(cat /sys/class/net/eth0/address 2>/dev/null || echo 'No Ethernet')"
# Uptime
echo "Uptime: $(uptime -p)"
echo "Last Boot: $(who -b | awk '{print $3, $4}')"
# GPIO Information using libgpiod
echo "GPIO Chip Info:"
if command -v gpioinfo &>/dev/null; then
gpioinfo
else
echo "gpiod tools not installed. Please install libgpiod using 'sudo apt install gpiod'."
fi
echo "=== End of Raspberry Pi System Information ==="