- #!/bin/ksh
- RAM=$(top -b -n 1 | grep "Memory: " | awk '{print $6}')
- DISK=$(df -h /home | grep '\/home$' 2>/dev/null | awk '{print $4}')
- DATE=$(date '+%Y-%m-%d %H:%M')
- AMIXER=$(doas mixerctl outputs.master)
- NWID=$(ifconfig iwm0 | grep nwid | awk '{print($3)}')
- HOSTNAME_IP=$(ifconfig iwm0 | grep inet | awk '{print($2)}')
- echo -en "net: $NWID $HOSTNAME_IP | disk: $DISK ram: $RAM | vol: $AMIXER | $DATE"
|