provisioning tool for building opinionated architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
449 B

8 months ago
  1. #!/bin/bash
  2. FQDN=$(hostname --fqdn)
  3. IP_ADDRESS=$(hostname -I | cut -d ' ' -f1)
  4. DISTRO=$(lsb_release -d | cut -f2)
  5. KERNEL=$(uname -srm)
  6. UPTIME=$(uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/) {d=$6;h=$8;m=$9} else {h=$6;m=$7}}} {print d+0,"days"}')
  7. LOAD=$(cat /proc/loadavg)
  8. echo "FQDN : $FQDN"
  9. echo "UPTIME: $UPTIME"
  10. echo "IPADDR: $IP_ADDRESS"
  11. echo "DISTRO: $DISTRO"
  12. echo "KERNEL: $KERNEL"
  13. echo "LOAD : $LOAD"