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.
|
|
#!/bin/bash
FQDN=$(hostname --fqdn) IP_ADDRESS=$(hostname -I | cut -d ' ' -f1) DISTRO=$(lsb_release -d | cut -f2) KERNEL=$(uname -srm) 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"}') LOAD=$(cat /proc/loadavg)
echo "FQDN : $FQDN" echo "UPTIME: $UPTIME" echo "IPADDR: $IP_ADDRESS" echo "DISTRO: $DISTRO" echo "KERNEL: $KERNEL" echo "LOAD : $LOAD"
|