Commit a7e1ed9d by irul

Update server_info.sh

1 parent 8455bf2d
......@@ -17,15 +17,15 @@ echo -e "Architecture: "`arch`
echo -e "Processor Name: "`awk -F':' '/^model name/ {print $2}' /proc/cpuinfo | uniq | sed -e 's/^[ \t]*//'`
echo ""
echo -e "Hostname: "`hostname`
# echo -e "Operating System: "`hostnamectl | grep "Operating System" | cut -d ' ' -f5-`;
echo -e "Operating System: "`cat /etc/*release | grep PRETTY_NAME | cut -d "=" -f 2 | tr -d '"'`
echo -e "Using Systemd: "`pidof systemd > /dev/null && echo "True" || echo "False"`
echo -e "Hostname: "`hostname`
echo -e "Uptime: "`uptime | awk '{print $3,$4}' | sed 's/,//'`
echo ""
# echo -e "Server IP: "`hostname -I`
echo -e "Default Gateway: "`ip route show | sed 's/\(\S\+\s\+\)\?default via \(\S\+\).*/\2/p; d'`
# echo -e "Server IP: "`hostname -I`
echo -e "Server IP: "`/sbin/ip -4 a | grep "inet " | tail -n +2 | awk '{print "["NR"] "$7 "=" $2}'`
echo ""
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!