Skip to content

Instantly share code, notes, and snippets.

Last active December 13, 2015 21:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
regnum diag script
echo Juntando información
DATE=$(date --rfc-3339=date)
CPU=$(cat /proc/cpuinfo | grep -i "model name")
MHZ=$(cat /proc/cpuinfo | grep 'cpu MHz')
CACHE=$(cat /proc/cpuinfo | grep 'cache size')
KERNEL=$(uname -a)
ARCH=$(uname -m)
ARCH_VERSION=$(cat /etc/$(ls /etc/ | grep -m1 version) || echo "Sin info")
UPTIME=$(uptime || echo "Sin info")
COMPIZ=$(ps aux | grep -i "compiz" | grep -iv "grep" || echo "No se ejecuta")
VGA=$($(which lspci) | grep VGA || echo "Sin VGA disponible")
ACCEL=$($(which glxinfo) | grep -i "direct rend" || echo "Sin info")
OPENGL=$((glxinfo | grep -i 'opengl') || echo "Sin info")
S3TC=$( (glxinfo | grep -i 's3tc')|| echo "No habilitadas")
LOAD=$(cat /etc/X11/xorg.conf | grep Load| grep -v '#' | cut -d'"' -f2 | cut -d'"' -f1 | grep "" || echo "No se detectan secciones Load")
DRIVERS=$(cat /etc/X11/xorg.conf | grep Driver | grep -v '#'| cut -d'"' -f2 | cut -d'"' -f1 | grep "" || echo "No se detectaron drivers")
MEM=$(cat /proc/meminfo | grep -i "MemTotal" | cut -d: -f2 | grep -m1 "" || echo "Sin info")
FREEMEM=$(cat /proc/meminfo | grep -i "MemFree" | cut -d: -f2 | grep -m1 "" || echo "Sin info")
SENSORS=$(sensors || echo "No hay sensores")
HDD=$(df -hP || echo "No hay info")
XORGLOG=$(cat /var/log/Xorg.0.log | grep -i "(EE)\|(WW)")
touch $LOGFILE
cat << _EOF > $LOGFILE
Informe generado el día $DATE
Kernel: $KERNEL
Arquitectura: $ARCH
Carga y uptime: $UPTIME
Beryl: $COMPIZ
++++++Placa de video+++++
Hardware: $VGA
Aceleración (Direct Rendering): $ACCEL
Extensiones S3TC: $S3TC
Load: $LOAD
Drivers: $DRIVERS
Memoria total: $MEM
Memoria libre: $FREEMEM
++++++Log de Xorg+++++

echo "Información disponible en $LOGFILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment