first commit

This commit is contained in:
2026-03-30 14:53:09 -06:00
commit fbec1a6ade
81 changed files with 4479 additions and 0 deletions

17
get_raspi_info.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
temp_hdd=$(ssh arthur@192.168.1.131 "sudo smartctl -A /dev/sdb | grep -i temperature")
temp_cpu=$(ssh arthur@192.168.1.131 "vcgencmd measure_temp")
used_mem=$(ssh arthur@192.168.1.131 "free -gth| grep Mem")
used_disk=$(ssh arthur@192.168.1.131 "df -h| grep /dev/sdb2")
temp_hdd_f=$(cut -c 85-90 <<< $temp_hdd)
temp_cpu_f=$(cut -c 6-11 <<< $temp_cpu)
total_mem_f=$(cut -c 16-19 <<< $used_mem)
used_mem_f=$(cut -c 28-31 <<< $used_mem)
used_disk_f1=$(cut -c 29-37 <<< $used_disk)
output="HDD:"$temp_hdd_f"'C "$used_disk_f1"\n""CPU: "$temp_cpu_f"\n""MEM: "$used_mem_f/""$total_mem_f"\n"
echo $output
notify-send -t 15000 -i /home/arthur/scripts/pngegg.png "Raspberry pi" "$output"