This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cpu_last_sum=0 | |
while :; do | |
# get the first line with aggregate of all CPUs | |
cpu_now=($(head -n1 /proc/stat)) | |
# get all columns but skip the first (which is the "cpu" string) | |
cpu_sum="${cpu_now[@]:1}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/ { | |
#address-cells = <0x02>; | |
memreserve = <0x3f800000 0x800000>; | |
model = "Raspberry Pi 5 Model B Rev 1.0"; | |
serial-number = "6b206ca09127ae99"; | |
#size-cells = <0x01>; | |
interrupt-parent = <0x01>; | |
compatible = "raspberrypi,5-model-b\0brcm,bcm2712"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# partly based on https://stackoverflow.com/a/72548686 | |
[[ $(id -u) -eq 0 ]] || exec sudo /bin/bash -c "$(printf '%q ' "$BASH_SOURCE" "$@")" | |
progname=$(basename $0) | |
quiet=false | |
no_dry_run=false | |
while getopts ":qn" opt; do | |
case "$opt" in | |
q) |