Config Server - SH
Config Server - SH
Config Server - SH
echo "uptime"
uptime >> config_`uname -n`_`date "+%m%d%y"`.txt
echo >> config_`uname -n`_`date "+%m%d%y"`.txt
echo "date"
date >> config_`uname -n`_`date "+%m%d%y"`.txt
echo >> config_`uname -n`_`date "+%m%d%y"`.txt
echo "mount"
mount >> config_`uname -n`_`date "+%m%d%y"`.txt
echo >> config_`uname -n`_`date "+%m%d%y"`.txt
echo "/etc/fstab"
more /etc/fstab >> config_`uname -n`_`date "+%m%d%y"`.txt
echo >> config_`uname -n`_`date "+%m%d%y"`.txt
echo "Procesadores"
cat /proc/cpuinfo| egrep -i "processor" >> config_`uname -n`_`date "+%m%d%y"`.txt
echo >> config_`uname -n`_`date "+%m%d%y"`.txt
echo ""
uptime | awk '{print "Dias Arriba:"$3}' >> config_`uname -n`_`date "+%m%d%y"`.txt
echo ""
echo "Memoria usada: $((`free -m | grep '+' | awk '{print $3}'`*100/`free -m | grep
'Mem:' | awk '{print $2}'`))% (`free -m | grep '+' | awk '{print $3}'`MB) de `free
-m | grep 'Mem:' | awk '
{print $2}'`Mb Disponible" >> config_`uname -n`_`date "+%m%d%y"`.txt
echo ""
top -n 1 | grep Cpu| awk '{print "Consumo de CPU="$5" Libre"}' >> config_`uname -
n`_`date "+%m%d%y"`.txt
echo ""
top -n 1 | grep Swap| awk '{print "Consumo de swap="$6" Libre"}' >> config_`uname
-n`_`date "+%m%d%y"`.txt
echo ""
(admunix@ixtlmxbesg5:SKULL)