CsabeeA SuSE/openSuSE fura egy szerzet, de próbáld így:
#!/bin/bash
#
# Server Status Script
# Version 0.1.3 m
# Updated: July 26th 2011 m
CPUTIME=$(ps -eo pcpu | awk 'NR>1' | awk '{tot=tot+$1} END {print tot}')
CPUCORES=$(cat /proc/cpuinfo | grep -c processor)
UP=$(echo `uptime` | awk '{ print $3, $4 }')
echo ”
****************************************************************************
System Status
Updated: `date`
– Server Name = `hostname`
– OS Version = `grep openSUSE /etc/SuSE-release`
– Load Averages = `cat /proc/loadavg | awk '{print $1, $2, $3}'`
– System Uptime = `uptime | awk '{print $3, $4}'`
– Platform Data = `uname -orpi| awk '{print $1, $4}'`
– CPU Usage (average) = `echo $CPUTIME / $CPUCORES | bc`%
– Memory free (real) = `free -m | head -n 2 | tail -n 1 | awk '{print $4}'` Mb
– Memory free (cache) = `free -m | head -n 3 | tail -n 1 | awk '{print $3}'` Mb
– Swap in use = `free -m | tail -n 1 | awk '{print $3}'` Mb
– Disk Space Used = `df -h / | awk '{ a = $4 } END { print a }'`
” > /etc/motd
# End of Script