#!/bin/ksh

ID_SERVEUR=`lsattr -El sys0 -a systemid|sed 's/.*IBM\,//'|awk '{ print $1 }'`
MODELNAME=`lsattr -El sys0 -a modelname|sed 's/.*IBM\,//'|awk '{ print $1 }'`

lance ()
{
commande="$*"
echo " ========== $commande ============="
$commande
echo "==================================="
}
export LOG_FILE=/tmp/audits/$MODELNAME.$ID_SERVEUR.txt

if test ! -d /tmp/audits
then
echo "Creation /tmp/audits"
mkdir -p /tmp/audits
fi

(
lance prtconf
lance 'lsdev -Cc disk'
lance 'lsdev -Cc tape'
lance 'lsdev -C'
lance 'errpt |head -20'
) |tee $LOG_FILE 2>&1


echo "Resultat sous $LOG_FILE"

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone