loading
FullScreen Fecha y Hora: 28-Apr-2024 18:08 IP Pública: 3.21.231.245 Usuario: Público
31/Aug/2018 uso de smartctl
#Habilta el soporte a smartctl y envía a realizar el test largo

P="$PATH"
PATH=""

for DISCO in $(/sbin/fdisk -l|/bin/grep " /dev"|/bin/awk '{print $2}'|/bin/sed "s/://g")
do
  CNT=$(/usr/sbin/smartctl -i $DISCO|/bin/grep "SMART support is: Available"|/usr/bin/wc -l)
  if [ $CNT -eq 1 ];
  then
    CNT=$(/usr/sbin/smartctl -i $DISCO|/bin/grep "SMART support is: Disabled"|/usr/bin/wc -l)
    if [ $CNT -eq 1 ];
    then
      /usr/sbin/smartctl -s on  $DISCO
    fi
    /usr/sbin/smartctl -t long $DISCO
  fi
done

PATH="$P"
echo "<html><head></head><body style=\"font-family:'Courier New';font-size:10px;\"><pre>" > /tmp/smartd.log 

P="$PATH" 
PATH="/bin" 

for DEV in $(/sbin/fdisk -l|/bin/grep " /dev"|/bin/awk '{print $2}'|/bin/sed "s/://g") 
do
  echo "<br /><hr /><br />" >> /tmp/smartd.log 
  /usr/sbin/smartctl -i -l selftest -HAc $DEV >> /tmp/smartd.log 
  echo "<br /><hr /><br />" >> /tmp/smartd.log 
done

/bin/cat /tmp/smartd.log|/usr/bin/mutt -e "set content_type=text/html" root 

PATH="$P" 
 
 

Ip Pública 3.21.231.245
Navegador Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
País United States
Ciudad Seattle