#!/bin/bash LANG=es_ES.UTF-8 TERM=xterm export LANG export TERM #VER=`lsb_release -ds` #CAL=`cal` HORA=`date +%r` UPTIME=`uptime` IMG=$(n4d-client -r call LmdImageManager.getImageList 2>/dev/null || true) ORD=$(n4d-client -r call LlxBootManager.getBootOrder 2>/dev/null || true) VER=$(lliurex-version -n) ########################### ##DETECCION DE MEMORIA############# detectmem () { hw_mem=0 free_mem=0 human=1024 mem_info=$( /tmp/test-mod.txt echo $LTSP_FATCLIENT > /tmp/test-mod-fat.txt if [ `grep server /tmp/test-mod.txt -c` != 0 ]; then if [ `echo x$DISPLAY | cut -d : -f 1` = 'x' ]; then SOY=Servidor else SOY=Ligero fi else if [ `grep client /tmp/test-mod.txt -c ` != 0 ]; then #EJECUTA=`echo $LTSP_FATCLIENT | grep true| wc -l` EJECUTA=$(grep "true" /tmp/test-mod-fat.txt -c) if [ "$EJECUTA" != "0" ];then SOY=Semiligero else SOY=Pesado fi else SOY=Desktop fi fi ############################ #####AVERIGUAMOS LA ARQUITECTURA ############################ if [ `uname -m | grep "x86_64" -c` == 0 ]; then ARQ="32 Bits" else ARQ="64 Bits" fi ############################ ###DATOS DE MAQUINA ORIGEN ############################ IMG2=`echo $IMG|sed 's/\[\|\]//g'|sed 's/"//g'|sed 's/,/ /g'|sed 's/.json//g'` ORD2=`echo $ORD|sed 's/\[\|\]//g'|sed 's/"//g'|sed 's/,/ /g'|sed "s/'//g"` #CPU=`cat /proc/cpuinfo | grep 'model name' | cut -c 14-42 | uniq ` #MEM=`grep MemTotal /proc/meminfo | awk '{$1=$2/(1024); print $1,"MB";}'` ####DETECTAMOS LA MEMORIA FISICA Y USADA, ASI COMO LA CPU###### detectmem detectcpu echo echo " -CLIENTE: $SOY" echo " -VERSION: $VER" echo " -ARQUITECTURA: $ARQ" echo " -CPU: $cpu" echo " -RAM: $mem" if [ "$SOY" = "Server" -o "$SOY" = "Servidor" ]; then DF=`df -h /net|tail -1|awk '{print $5}'` echo " -Espacio ocupado en /net: $DF" echo " -Imagenes LTSP disponibles: $IMG2" echo " -Orden de arranque menu pxe: $ORD2" echo fi echo echo Hora actual: $UPTIME