Vous êtes sur la page 1sur 366

#!

/bin/ksh
#set -x
export LANG=C
#-----------------------------------------------------------------
#------ Script d Audit -----------------------------------------
#------ par Jean Fran�ois Pinguet --------------------------
#--------- fichier : aixview.sh --------------------------------
VersionE=" version 2013-1.5.1 date: 03/06/2014"
#-----------------------------------------------------------------
# Utilisation :
# -------------
# ./aixviewxxx.sh
#
# debug="set -x"
# >module010.log
# exec 2>>module010.log ; set -x
# ----------------------------------------------------------------
#
# module d analyse
# type HHH : hard
# SSS : soft
# EEE : Environnement
#-----------------------------------------------------------------
$debug
echo "please wait........"
export LANG=C
# ---- init des variables ---------------------
file=$(date +%Od%OH%OM)
typeset NbModule
typeset -i NumSign=0
typeset -i NumNum=0
typeset -i NbLigneSomm=0
typeset -i NbLigneSommH=0
typeset -i NbLigneSommS=0
typeset -i NbLigneSommA=0
typeset -i NbLigneSommF=0
NomScript=$0
CmdLancer=$0' '$*
Rept=$(pwd)
tpvar=$Rept"/AIXJFPAUD"$file"0101"
tpsort=$Rept"/AIXJFPVIEW"
> $tpsort"HARDLoc"
prtconf > $tpvar"jfp_prtconf" &
pid=$!
sleep 2
kill -0 $pid 1>$tpvar"0" 2>$tpvar"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$tpvar"0" 2>$tpvar"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill prtconf after time out of
command ---" >> $Modu ; echo ' kill after time out command: prtconf' >>
$tpsort"KILL9" )
fi

information()
{
$debug
cat << top
Utilisation du script d audit :
Un fichier audit_NomMachine_Mod�le_S.N_.html sera g�n�r� dans le r�pertoire
de lancement du script aixaudit

-c : fichier compress�.
-s : valide l execution du snap -gc
-S : Specific Stephen Corporation !
-d : date dans le nom du fichier
-n : l argument suivant devra contenir le nom du client
entre double quote.
-m : l argument suivant devra contenir le nom du module a executer
-L : permet de choisir le level d execution du script. Les differents
levels sont :
0 : execution standard du script
1 : execution de tous les modules sauf les modules reper�
de level 1
2 : execution de tous les modules sauf les modules reper�
de level 2
12 :execution de tous les modules sauf les modules rep�r�
de level 1 et level 2
etc... maximum de 9 levels.
-x <nomFichier> : le fichier indique contient une liste de modules a
executer.

s il n y a pas d argument, le script sera execut�


sans le nom du client, et le fichier de sortie ne sera pas compress�.

EXEMPLE :
exemple uniquement avec le nom du client :
$NomScript -n "ClientTon et fils"

exemple avec le nom du client et avec en resultat un fichier compress� :


aixaudit.sh -n "ClientTon et fils" -c

exemple d entr�e dans les menus de configuration :


aixaudit.sh conf
top
}
CorpsScript()
{
$debug
if (( $Stphn == 0 ))
then
Presentation "$NomClient"
fi
cat $NomScript | grep "#wwww" > $tpsort"listedelien"
if [[ $Nmodule = "" ]]
then
NumSign=0
NumNum=0
Module "HHH"
NbLigneSommH=$NbLigneSomm
NumNum=0
NbLigneSomm=0
Module "SSS"
NbLigneSommS=$NbLigneSomm
NumNum=0
NbLigneSomm=0
Module "AAA"
NbLigneSommA=$NbLigneSomm
NumNum=0
NbLigneSomm=0
Module "FFF"
NbLigneSommF=$NbLigneSomm
else
NumSign=0
NumNum=0
cat $tpvar"listeOp_m" | while read Nmodule0 ; do
case $Nmodule0 in
*HHH*) Module $Nmodule0
NbLigneSommH=$NbLigneSomm ;;
*SSS*) Module $Nmodule0
NbLigneSommS=$NbLigneSomm ;;
*AAA*) Module $Nmodule0
NbLigneSommA=$NbLigneSomm ;;
*FFF*) Module $Nmodule0
NbLigneSommF=$NbLigneSomm ;;
esac
done
fi
if (( $Stphn == 0 ))
then
Resume
sommaire
CorpAudit
FinAudithtml
uname -L | read NumPart NomPart
if [ $NomPart = 'NULL' ]
then
audit="aixview"$NomLabel"_"$(hostname)"_"$NomAudit$DateAudit$Extension
else

audit="aixview"$NomLabel"_"$NomPart"_nbID-"$NumPart"_"$NomAudit$DateAudit$Extension
fi
cat $tpvar"presentation" > $audit
cat $tpvar"Resume" >> $audit
cat $tpvar"corpaudit" >> $audit
cat $tpvar"finaudit" >> $audit
cat $tpvar"sommaire" >> $audit
fi
return 0
}
ExecutionMod()
{
$debug
typeset -i a=0
typeset -i j=0
typeset temp
typeset TypeModule
temp=$tpvar"ExM"
TypeModule=$1
>$temp"jfp"
grep xxxx $NomScript > $tpvar"listemodule"
mv $tpvar"listemodule" $temp"jfp"
grep $TypeModule $temp"jfp" > $tpvar"listemodule"
for i in $(grep Mod $tpvar"listemodule" | awk '{print $2}')
do
((j+=1))
k="xxxx $i"
ListeModule[$j]=$i # nom du module
ListeModule[$j+3000]=$(grep "$k" $tpvar"listemodule" | awk '{print $3}') #
validation du module
if [ $(grep "$k" $tpvar"listemodule" | awk '{print $4}' | sed
's/['$LevelExec']/n/g' | grep n) ]
then
ListeModule[$j+3000]=non
fi
done
NbModule=$j

let j=0
while (( $j < $NbModule ))
do
((j+=1))
if [[ "${ListeModule[$j+3000]}" = "oui" ]]
then
${ListeModule[$j]} conf
echo "Executing : ${ListeModule[$j]} $j $NbModule --> $TitreMod"
echo "Executing : ${ListeModule[$j]} $j $NbModule --> $TitreMod" >>
$tpsort"ModExecAudit"
((NumSign+=1))
((NumNum+=1))
((NbLigneSomm+=1))
# ${ListeModule[$j]} $j $NbModule
${ListeModule[$j]} $j $NbModule 2>$temp"jfp"
fi
done
rm -f $tpvar$j$NomMod"jfp"*
return $a
}
SuppModulVide() # $TypeModule
{
$debug
typeset -i a=0
typeset TypeModule aa bb temp long position
TypeModule=$1
temp=$tpvar"SuppModulVide"
>$temp"jfp1"
# Somm=$tpsort"Som"$NomMod
# Modu=$tpsort"Mod"$NomMod
ls $tpsort"Mod"$TypeModule* | while read aa bb ; do
if [[ ! -s $aa ]]
then
long=$(ls $aa | wc -m)
let position=long-6
bb=$(echo $aa | cut -c $position- )
rm -f $aa 2>$temp"jfp1"
rm -f $tpsort"Som"$bb 2>$temp"jfp1"
rm -f $tpsort"Res"$bb 2>$temp"jfp1"
fi
done
return $a
}
Module() # type module HHH ou SSS ou EEE ou AAA
{
$debug
typeset -i a=0
typeset TypeModule
TypeModule=$1
ExecutionMod "$TypeModule"
SuppModulVide "$TypeModule"
return $a
}
# --- Presentation HTML audit
Presentation() # NomClient
{
$debug
typeset -i a=0
typeset NomClient
NomClient=$1
typeset UtilModule temp NomMod NumPart NomPart sn
presentation=$tpvar"presentation"
echo "presentation"
/usr/ios/cli/ioscli lsmap 2>$tpvar"jfp3"
if [ $? = 127 ]
then
partitype=" AIX system"
backcolor="f2f2f2"
else
partitype=" VIOS partition"
backcolor="e5e8a8"
fi
# --- debut de l affichage HTML
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' > $presentation
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >' >> $presentation
echo '<head>' >> $presentation
echo '<meta name="Lyon" content="RS6000"/>' >> $presentation
echo '<title>Audit :'$(hostname)' --- Welcome to JF Pinguet s audit --- Version :
'$VersionE' --</title>' >> $presentation
echo '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'
>> $presentation
echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />' >>
$presentation
echo '<style type="text/css">' >> $presentation
echo 'html, body {overflow:hidden;margin:0px;padding:0px;font-
family:Arial,Verdana,Helvetica;width:800px;margin:auto;margin-
bottom:20px;color:black;}' >> $presentation
echo '#bloc-fixe
{position:fixed;overflow:auto;right:0px;left:0px;top:0px;height:69px;border:solid
2px;border-color:#c7d6e2;background-repeat: no-repeat;background: -moz-linear-
gradient(top, #303031, #274059);background: -webkit-gradient(linear, left top, left
bottom, from(#303031), to(#274059));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#303031',
endColorstr='#274059');font-family:Arial,Verdana,Helvetica;font-
size:240%;color:#a0a8ad;} ' >> $presentation
echo '#bloc-fixe-ver
{position:fixed;overflow:auto;right:0px;left:8px;top:37px;height:69px;font-
family:Arial,Verdana,Helvetica;font-size:60%;color:#a0a8ad;}' >> $presentation
echo '#bloc-fixe-infoversion
{position:fixed;left:200px;right:0px;top:14px;height:35px;}' >> $presentation
echo '#bloc-fixe-pub {position:fixed;left:3px;right:4px;top:102px;height:17px;font-
family:Arial,Verdana,Helvetica;font-size:60%;color:#000000;} ' >> $presentation
echo '#bloc-fixe-serveur
{position:fixed;left:250px;right:0px;top:21px;height:20px;font-
family:Arial,Verdana,Helvetica;font-size:80%;color:#87cefa;} ' >>
$presentation
echo '#bloc-fixe-partition
{position:fixed;left:10px;right:0px;top:49px;height:20px;font-
family:Arial,Verdana,Helvetica;font-size:80%;color:#87cefa;}' >> $presentation
echo '#bloc-fixe-date
{position:fixed;left:800px;right:0px;top:49px;height:20px;font-
family:Arial,Verdana,Helvetica;font-size:80%;color:#87cefa;} ' >> $presentation
echo '#bloc-fixe-customer
{position:fixed;left:250px;right:0px;top:4px;height:20px;font-
family:Arial,Verdana,Helvetica;font-size:80%;color:#87cefa;}' >> $presentation
echo '#bloc-fixe-user
{position:fixed;left:750px;right:0px;top:4px;height:20px;font-
family:Arial,Verdana,Helvetica;font-size:80%;color:#87cefa;} ' >> $presentation
echo '.model {font-family:Arial,Verdana,Helvetica;font-size:90%;color:#ffffff;} '
>> $presentation
echo '#bloc-fixe3trait
{position:fixed;right:0px;left:0px;top:72px;height:4px;background-repeat: no-
repeat;background: -moz-linear-gradient(top, #91a3b8, #c4d3e0);background: -webkit-
gradient(linear, left top, left bottom, from(#91a3b8), to(#c4d3e0));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#91a3b8',
endColorstr='#c4d3e0');} ' >> $presentation
echo '#bloc-fixe4trait
{position:fixed;right:0px;left:0px;top:96px;height:4px;background-repeat: no-
repeat;background: -moz-linear-gradient(top, #7b858d, #ffffff);background: -webkit-
gradient(linear, left top, left bottom, from(#7b858d), to(#ffffff));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#7b858d',
endColorstr='#ffffff');}' >> $presentation
echo '#bloc-fixe-menu {position:fixed;right:0px;left:0px;top:76px;height:20px; /*
valeur normal 20 */background-repeat: no-repeat;background: -moz-linear-
gradient(top, #c7d6e2, #98a0a7); /* pour Firefox 3.6+ */ background: -webkit-
gradient(linear, left top, left bottom, from(#c7d6e2), to(#98a0a7)); /* pour webkit
*/filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#c7d6e2',
endColorstr='#98a0a7'); /* pour IE */font-size:90%;} ' >> $presentation
echo '#position-menu {width:900px;height: 0px;margin-bottom: 0px;position: fixed;}
' >> $presentation
echo '#bloc-menu {height:20px; /* valeur normal 20 */background-repeat: no-
repeat;background: -moz-linear-gradient(top, #e1e9ef, #b1b8bc); /* pour Firefox
3.6+ */ background: -webkit-gradient(linear, left top, left bottom, from(#e1e9ef),
to(#b1b8bc)); /* pour webkit */filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#e1e9ef,
endColorstr=#b1b8bc); /* pour IE */font-size:90%;} ' >> $presentation
echo '#position-menuf {margin-bottom: 0px;} ' >> $presentation
echo '#menuf {padding : 0;margin : 0;list-style : none;line-height : 18px;}' >>
$presentation
echo '#menuf li a {font-weight : bold;font-family : Arial,Verdana,Helvetica;font-
size : 80%;text-align : center;display : block;color : #2f4576;text-decoration :
none;width : 300px;}' >> $presentation
echo '#menuf ul li {list-style:none;}' >> $presentation
echo '#menuf ul li a {line-height:15px;text-align:left;width:235px;padding:0;text-
decoration:none;display:block;color:#2f4576;}' >> $presentation
echo '#menuf li {float:left;}' >> $presentation
echo '#menuf li ul li {border-top:1px solid #91a3b8;}' >> $presentation
echo '#menuf li ul {position:absolute;width:253px;left:-999em;max-
height:400px;background:#bdcedc;padding-left:10px;overflow:auto;}' >> $presentation
echo '#menuf a:hover {color:#000;background:#a5bbcd;}' >> $presentation
echo '#menuf li:hover ul, #menu li li:hover ul, #menu li.sfhover ul, #menu li
li.sfhover ul {left:auto;min-height:0;}' >> $presentation
echo '#menu {padding : 0;margin : 0;list-style : none;line-height : 18px;} ' >>
$presentation
echo '#menu li a {font-weight : bold;font-family : Arial,Verdana,Helvetica;font-
size : 80%;text-align : center;display : block;color : #2f4576;text-decoration :
none;width : 150px;} ' >> $presentation
echo '#menu ul li {list-style:none;} ' >> $presentation
echo '#menu ul li a {line-height:15px;text-align:left;width:235px;padding:0;text-
decoration:none;display:block;color:#2f4576;} ' >> $presentation
echo '#menu li {float:left;} ' >> $presentation
echo '#menu li ul li {border-top:1px solid #91a3b8;} ' >> $presentation
echo '#menu li ul {position:absolute;width:253px;left:-999em;max-
height:400px;background:#bdcedc;padding-left:10px;overflow:auto;} ' >>
$presentation
echo '#menu a:hover {color:#000;background:#a5bbcd;} ' >> $presentation
echo '#menu li:hover ul, #menu li li:hover ul, #menu li.sfhover ul, #menu li
li.sfhover ul {left:auto;min-height:0;} ' >> $presentation
echo '.menumod {font-weight : bold;font-family : Arial,Verdana,Helvetica;font-
size : 75%;color : #2f4576; background-color: #c7d6e2;text-decoration :
none;width : 150px;border-width : 1px;border-style : solid;}' >> $presentation
echo '.menumod:hover {font-weight : bold;font-family :
Arial,Verdana,Helvetica;font-size : 75%;color : #2f4576; background-color:
#98a0a7;text-decoration : none;width : 150px;border-width : 1px;border-style :
solid;}' >> $presentation
echo '.menumod1 {font-weight : bold;font-family : Arial,Verdana,Helvetica;font-size
: 75%;color : #2f4576; text-decoration : none;width : 150px;}' >> $presentation
echo '#contenu
{position:fixed;overflow:auto;right:0px;left:0px;bottom:0px;top:101px;background-
color:#ffffff;margin-left: 10px;font-size:90%;} ' >> $presentation
echo 'h1 {font-size:140%;text-align:center;background-repeat: no-repeat;background:
-moz-linear-gradient(top, #afb1b2, #dce9ee);background: -webkit-gradient(linear,
left top, left bottom, from(#afb1b2), to(#dce9ee));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#afb1b2,
endColorstr=#dce9ee);font-family:Arial,Verdana,Helvetica;font-
size:200%;color:#4d3e7f;}' >> $presentation
echo 'h2 {background-color:#'$backcolor';color:#333333;font-size:100%;} ' >>
$presentation
echo 'h2 strong {background-color:#ffffff;color:#2825b0;border:solid 1px;border-
color:#c7d6e2;font-family:courier new,monospaced,courier;font-size:100%;}' >>
$presentation
echo 'h2 pre {margin-left:70px;} ' >> $presentation
echo '.alert {background-color:#ff0000;color:#ffffff;} ' >> $presentation
echo '.alert0 {background-color:#283f56;color:#ffffff;} ' >> $presentation
echo '.alert1 {background-color:#f1eded;color:#000000;} ' >> $presentation
echo '.alert2 {background-color:#cacf8d;color:#000000;} ' >> $presentation
echo '.alert3 {background-color:#fd9503;color:#000000;} ' >> $presentation
echo '.alert4 {background-color:#cecfd0;color:#000000;} ' >> $presentation
echo '.alert5 {background-color:#ffff00;color:#000000;} ' >> $presentation
echo '.alert6 {background-color:#00ff00;color:#000000;} ' >> $presentation
echo 'h3 {font-family : Arial,Verdana,Helvetica;background-repeat: no-
repeat;background: -moz-linear-gradient(top, #ffffff, #c3d2df);background: -webkit-
gradient(linear, left top, left bottom, from(#ffffff), to(#c3d2df));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',
endColorstr='#c3d2df');font-size:110%;color : #2f4576;} ' >> $presentation
echo 'h3 strong {margin-left:250px;} ' >> $presentation
echo 'p {width: 850px;margin: auto;white-space:pre-wrap;word-wrap: break-word;} '
>> $presentation
echo 'table {background:#FFFFFF} ' >> $presentation
echo 'table th {font-size: 100%;font-
family:Arial,Verdana,Helvetica;background:#dbd8d1;} ' >> $presentation
echo 'table td {font-size: 100%;padding-left:10px;} ' >> $presentation
echo 'PRE TABLE b {font-size: 100%;font-
family:Arial,Verdana,Helvetica;background:#FFFFBB;}' >> $presentation
echo 'PRE {font-size: 100%;font-family:courier new,monospaced,courier;} ' >>
$presentation
echo 'PRE b {font-size: 100%;font-
family:Arial,Verdana,Helvetica;background:#dbd8d1;} ' >> $presentation
echo 'PRE em {font-size: 100%;font-
family:Arial,Verdana,Helvetica;background:#f7ff41;font-style: normal;}' >>
$presentation
echo '#back a {font-family:Arial,Verdana,Helvetica;text-decoration:none;color:
#1e4191;border:solid 1px;border-color:#c7d6e2;font-weight:bold;} ' >> $presentation
echo '#back:hover a {color: #d6843e;background: #f2f2f2;} </STYLE> ' >>
$presentation
echo '<!--[if lt IE 7]> ' >> $presentation
echo ' <STYLE type=text/css> ' >> $presentation
echo ' html, body {height:100%;} ' >> $presentation
echo ' html {padding-top:85px} ' >> $presentation
echo ' #bloc-fixe, #contenu { ' >> $presentation
echo ' position:absolute; ' >> $presentation
echo ' width:100%; ' >> $presentation
echo ' }' >> $presentation
echo ' #contenu {' >> $presentation
echo ' position:absolute; ' >> $presentation
echo ' height:100%; ' >> $presentation
echo ' } ' >> $presentation
echo ' </STYLE>' >> $presentation
echo '<![endif]-->' >> $presentation
echo '</head>' >> $presentation
# --- debut du corp HTML
echo '<body>' >> $presentation
echo '<div id="bloc-fixe"><b>AIX VIEW</b></div>' >> $presentation
echo '<div id="bloc-fixe-ver"><b> '$VersionE' </b></div>' >> $presentation
NmSript=$(echo $0 | tr '/' '
' | grep aixview)
echo '<script type="text/javascript"
src="http://galetiere.fr/aufildeaix/telechargement/version.txt"></script>' >>
$presentation
echo '<SCRIPT language=javascript>if (version == "'$NmSript'")
{document.write("vous avez la bonne version");} ' >> $presentation
echo 'else {document.write('\''<div id="bloc-fixe-infoversion"><a
href="http://galetiere.fr/aufildeaix/telechargement/'\''+version+'\''"
title="download : '\''+version+'\''"><img
src="http://galetiere.fr/aufildeaix/Info/alerteversion.gif"
border="0"></a></div>'\'');}</SCRIPT>' >> $presentation
ModelMachine
a=$?
FormTypeSerie $a
echo '<div id="bloc-fixe-serveur"><b>Serveur name : </b><span class="model"><span
id="db-srvname">'$(hostname)'</span> ;</span><b>Type et S/N : </b><span
class="model" id="db-srvmodel">'$(cat $tpvar"ModelMachine")'</span>' >>
$presentation
#cat $tpvar"FormTypeSerie" | read sn
#cat $tpvar"FormTypeSerie" >> $presentation
echo '<span class="model" id="db-srvserial">'$(cat $tpvar"NumSerie")'</span></div>'
>> $presentation
uname -L | read NumPart NomPart
[ $NomPart != "NULL" ] && echo '<div id="bloc-fixe-partition"><b>Partition n�:
</b><span class="model" id="db-srvpartnum">'$NumPart';</span><b> Partition name :
</b><span class="model" id="db-srvpartname">'$NomPart';</span><b> Domaine name :
</b><span class="model">'$(domainname 2> /dev/null)';</span></div>' >>
$presentation
echo '<div id="bloc-fixe-date"><b>DATE: </b><span class="model" id="db-srvdate">'$
(date +%Od/%Om/%Oy,%OH:%OM)'</span></div>' >> $presentation
Loguser=$(who am i | awk '{print $1}')
echo '<div id="bloc-fixe-customer"><b>Customer : </b><span
class="model">'$NomClient' </span></div>' >> $presentation
echo '<div id="bloc-fixe-user"><b>User for executing audit : </b><span
class="model">'$Loguser' </span></div>' >> $presentation
echo '<div id="bloc-fixe3trait"></div>' >> $presentation
echo '<div id="bloc-fixe4trait"></div>' >> $presentation
echo '<script>function attente(){valpage='\''<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" ><head><meta name="Lyon"
content="RS6000">'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<title>Info AIXVIEW : viosp66_1 ---
Welcome to JF Pinguet s audit ---- version 11-H.2.27 --</title>'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" /><style type="text/css">'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''html, body {font-
family:Arial,Verdana,Helvetica;color:black;background:#c7d6e2;font-size:90%;}'\'''
>> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''#bloc-fixe
{position:fixed;right:0px;left:0px;top:0px;height:44px;border:solid 2px;border-
color:#c7d6e2;background-repeat: no-repeat;background: -moz-linear-gradient(top,
#303031, #274059);background: -webkit-gradient(linear, left top, left bottom,
from(#303031), to(#274059));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#303031,
endColorstr=#274059);font-family:Verdana,Arial,Helvetica;font-
size:240%;color:#a0a8ad;} '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''#bloc-fixe-nom
{position:fixed;right:0px;left:500px;top:30px;height:16px;width:250px;color:white;
font-size:90%;}'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''#bloc-chapitre
{position:fixed;overflow:auto;right:5px;left:5px;bottom:5px;top:47px;background-
repeat: no-repeat;background: -moz-linear-gradient(top, #c7d6e2,
#98a0a7);background: -webkit-gradient(linear, left top, left bottom, from(#c7d6e2),
to(#98a0a7));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#c7d6e2,
endColorstr=#98a0a7);font-size:110%;}'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''h3 {font-family :
Arial,Verdana,Helvetica;background-repeat: no-repeat;background: -moz-linear-
gradient(top, #ffffff, #c3d2df);background: -webkit-gradient(linear, left top, left
bottom, from(#ffffff), to(#c3d2df));filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,
endColorstr=#c3d2df);font-size:110%;color : #2f4576;}'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" /><style type="text/css">'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''</STYLE><!--[if lt IE 7]><STYLE
type=text/css> html, body {height:100%;} html {padding-top:85px} #bloc-fixe, #bloc-
chapitre { position:absolute;width:100%;} #bloc-chapitre
{position:absolute;height:100%;} </STYLE><![endif]--></head><body>'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<div id="bloc-fixe"><b>AIX
VIEW ....and also !! </b></div>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<div id="bloc-fixe-nom"><b>par Jean
fran\347ois Pinguet</b></div>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<div id="bloc-chapitre">'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>Si vous voulez en savoir
plus . . .</strong></h3><PRE><a
href="http://galetiere.fr/aufildeaix/aixview.htm">http://galetiere.fr/aufildeaix/ai
xview.htm</a></pre>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>L audit \253 aixview \273
pour quoi faire . . .</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Le script d audit a pour int\351r\352t
de faciliter l analyse des machines. Il est important pour les services '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''techniques d avoir une image de l \
351tat de la machine au moment de la prise en main. Le script
<strong>"aixview.sh"</strong>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''analyse les machines et/ou partitions et
permet de voir le fonctionnement des diff\351rents adapters, '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''configuration des raids disques,
configurations des fibres, des miroirs disques . etc...'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Lors d un incident, les techniciens
demandent d ex\351cuter le script. La comparaison avec les anciens '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''r\351sultats permettent d optimiser les
diagnostiques.</pre>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>Ou trouver l audit \253
aixview \273 ??</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Je fournis r\351guli\350rement des
versions, sinon vous pouvez le t\351l\351charger sur mon site.'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<a
href="http://galetiere.fr/aufildeaix/telechargement.htm">http://galetiere.fr/aufild
eaix/telechargement.htm</a></pre>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>Il faut savoir quil existe
aussi . . .</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Le script "audithmc.sh" permet de voir
le cot\351 configuration des HMC, la r\351partition des processeurs, m\351moires,
'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''configuration des partitions.... il nous
permet aussi de voir les d\351fauts de configuration avec les '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''d\351validations de certain \
351l\351ments. Il n est pas utilisable pour les HMCs des Regattas.'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Une liaison ssh est utilis\351e lors de
l ex\351cution du script sur la partition utilis\351e vers l HMC</pre>'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>L audit \253 aixview \273
pour quelle machine . . .</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Toutes versions AIX. Cependant
l�ex\351cution sur des machines anciennes peut prendre beaucoup de
temps.</pre>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>Une nouvelle version \253
aixview \273 ??...</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''La derni\350re version est
r\351actualis\351e en fonction des nouveaut\351s, et s enrichit aussi de nouvelle
analyses suite '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''aux nouveaux probl\350mes
rencontr\351s.</pre>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>Comment utiliser le script d
audit \253 aixview.sh \273 . . .</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Le script d audit
<strong>"aixwiew.sh"</strong> doit \352tre ex\351cut\351 sur toutes les partitions
sous "root". '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Dans le cas d un VIOS, entrez en \253
padmin \273 dans le VIOS, puis entrez en \253 oem_setup_env \273. L utilisation du
'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''script est la m\352me qu avec une
partition standard.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<strong>Installer le \253 aixview.sh \
273 sur les partitions AIX </strong>(Attention, en ftp choisir un transfert en
BINARY) :'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''sur toutes les partitions en root'\'';
'valpage=valpage+\'''\\'\'n''\''+'\'' '\'' ;
'valpage=valpage+\'''\\'\'n''\''+'\''<strong>chmod +x aixview.sh</strong>'\'' ;' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\'' '\'';'
valpage=valpage+\'''\\'\'n''\''+'\''<strong>./aixview.sh -dn
"NomClient"</strong>'\'' ; valpage=valpage+'\'''\\'\'n''\''+'\'' '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''R\351cup\351rer le fichier
<strong>HTML</strong> g\351r\351, pour l afficher avec un browser.</pre>'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<h3><strong>La toute petite histoire du
script d audit . . .</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Le premier script d audit est n\351
suite \340 un grand coup blues <strong>dans les ann\351es 2001</strong>. Le snap \
351tant trop gros, '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''\340 l \351poque, la prise en charge d
un nouveau serveur se faisait par la saisie d une liste de commande que l on '\'''
>> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''transf\351rait ensuite sur une disquette
3"1/2. On r\351coltait tous les petits fichiers que l on mettait en forme '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''dans un document Word (\347a fait un peu
vieux con !!). Pour un serveur c \351tait facile, mais un jour, quelqu un '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''que je ne d\351noncerai pas parce que c
est un ami <em>(Christian Gigante)</em>, m a envoy\351 auditer des serveurs sur
'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''St Etienne. Au bout de quasi une
journ\351e \340 saisir des commandes, je me suis promis de ne pas recommencer. Le
'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''lendemain, les premi\350res lignes du
script d audit naissaient. Le fichier de r\351sultat \351tait sous un format
<strong>".txt"</strong>, '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''et \351tait facilement int\351grable
sous Word.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''La facilit\351 d ex\351cution \340
permis de r\351cup\351rer plus d informations, avec plus de complications '\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''pour toujours affin\351 le r\351sultat.
Avec le format <strong>".txt"</strong> il est devenu difficile de lire le
r\351sultat si l on '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''n avait pas un \351diteur performant.
Onze versions ont \351t\351 cr\351es, il s appelait <strong>\253 ecsaudit.sh \
273</strong>.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<strong>En 2005</strong>, j ai cr\351e
une version HTML que je n ai <strong>diffus\351 qu en 2006</strong>, version 11-
H.1.0. Il avait le m\352me nom '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<strong>\253 ecsaudit.sh \273</strong>,
mais fonctionnait \340 l aide de modules et d un moteur d ex\351cution. Il
suffisait ensuite de cr\351er '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''des modules suppl\351mentaires avec de
nouvelles commandes pour faire \351voluer les versions. '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<strong>En 2010</strong> apr\350s la
version 11-H.2.16, et quelques modifications, le script \340 \351t\351 renomm\351
en <strong>\253 aixaudit.sh \273</strong>, et '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''a \351volu\351 jusqu \340 la version 11-
H.2.28. '\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''<strong>Fin 2011</strong>, donc 10 ans
apr\350s sa naissance, refonte de tout le graphisme, am\351lioration de la
compatibilit\351 vers les'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''browsers. Apparition de la
<strong>version 2012-1.0.0</strong> nomm\351 pour l occasion <strong>\253 AIXVIEW \
273</strong> avec le fichier <strong>\253 aixview.sh \273</strong>'\''' >>
$presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''</pre><h3><strong>Merci
qui ??...</strong></h3><PRE>'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Christian Gigante pour accepter de subir
les premiers tests.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Jean-Fran\347ois Faivre et Franck Delmas
pour leurs suggestions de rajout de commandes, et leurs mise \340 disposition de
machines.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Stephen Etile pour les mises \340
dispositions de machines, d ex\351cutions des tests et de critique de la
forme.'\''' >> $presentation
echo 'valpage=valpage+'\'''\\'\'n''\''+'\''Samir Ouedda pour ses retours d
informations constructifs.'\''' >> $presentation

echo 'valpage=valpage+'\'''\\'\'n''\''+'\'' '\'';'


valpage=valpage+\'''\\'\'n''\''+'\'' '\''
;valpage=valpage+'\'''\\'\'n''\''+'\''</pre></div></body></html>'\'' ; return
valpage} var att="" ;' >> $presentation

echo 'function andalso(){ valpage=attente();


att=window.open('\'''\'','\'''la_blank\'','\'''width=980px,height=600px,left=400,to
p=60,toolbar=yes,location=yes,menubar=yes,directories=yes,status=no,scrollbars=no,r
esizable=yes,copyhistory=no,menuBar=no\''); ' >> $presentation
echo 'att.document.open(); att.document.write(valpage); att.document.close() }
</script>' >> $presentation
echo '<script>function showinf(infoplus) {if (infoplus.style.display ==
'\'''none''''\'') infoplus.style.display = '\'''table''''\'';else
infoplus.style.display = '\'''none''''\'';}</script>' >> $presentation

return $a
}
# --- Fin d audit html
FinAudithtml()
{
$debug
typeset -i a=0
typeset UtilModule temp NomMod
finAudit=$tpvar"finaudit"
echo '<a name="bottom"></a><h3><strong>End of the audit</strong></h3><PRE> the
document was created by a script AIX created by Jean Fran�ois Pinguet ' >>
$finAudit
echo '<iframe align="left" width="2" height="2" frameborder="0" scrolling="auto"
src="http://galetiere.fr/compteuraix.php" name="compteurVue"></iframe></PRE>' >>
$finAudit
echo '<div id="back"><a href="#sommaire">Back to top</a></div></div>' >> $finAudit
return $a
}
# --- Information de Resume de l audit
Resume()
{
$debug
typeset aa bx cx
typeset -i j=$1
typeset -i a=0
typeset UtilModule temp NomMod memoire memoire1 conf
NomMod=$tpvar"Resume"
UtilModule="Resume"
temp=$tpvar$j"Resume"
>$temp"jfp1"
echo "resume . . . ."
echo '<div id="contenu"><a name="sommaire">' > $NomMod
echo '<div id="bloc-fixe-pub"><marquee width="800" direction="left" loop="infinite"
scrollamount="2" align="bottom" height="20">this audit was created and offered by
JFP technical support </marquee></div>' >> $NomMod
echo '<a href="http://galetiere.fr/aufildeaix/aixview.htm"><img
src="http://galetiere.fr/aufildeaix/Info/InfoMiseAJour151.gif" border="0"></a>' >>
$NomMod
echo '</a><h1>Resuming '$partitype'</h1>' >> $NomMod
echo '<h2><pre>' >> $NomMod
Uptime=$(uptime)
echo 'You are connected with ID : <strong> '$(id)' </strong>' >> $NomMod
echo 'Uptime : <strong> '$Uptime' </strong> ' >> $NomMod
if [ $(echo 2 | sed 's/['$LevelExec']/n/g' | grep n) ]
then
echo ' Adresse IP : <strong> none </strong> (aixview run in level 2) \c' >>
$NomMod
else
echo ' Adresse IP : \c' >> $NomMod
ifconfig -a |grep netmask | grep -v "127.0.0.1" | awk '{print$2}' | while
read ligne ; do
echo ' <strong> '$ligne' </strong>\c' >> $NomMod
done
fi
echo '' >> $NomMod
lslpp -L | grep cluster.es.server.rte > $temp"jfp0"
if [[ -s $temp"jfp0" ]]
then
echo '<strong class="alert0"> ATTENTION --> </strong> HACMP, Version :
<strong> '$(lslpp -L | grep cluster.es.server.rte | awk '{print$2}')' </strong>'
>> $NomMod
fi
echo ' ' >> $NomMod
chedition -l 2>$temp"jfp100" 1>$temp"jfp100"
if [ $? = 0 ]
then
echo ' AIX level : <strong> '$(oslevel)' </strong> , Edition :
<strong> '$(chedition -l)' </strong>' >> $NomMod
else
echo ' AIX level : <strong> '$(oslevel)' </strong>' >> $NomMod
fi
oslevel -s >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
VerFileOS=$(lslpp -L "bos.rte.install" | grep "bos.rte.install" |awk
'{print$2}')
echo ' AIX level -s : <strong id="db-oslevel">'$(oslevel -s)' </strong> ,
bos.rte.install : <strong> '$VerFileOS' </strong>' >> $NomMod
fi
/usr/ios/cli/ioscli ioslevel >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
chedition 2>$temp"jfp100" 1>$temp"jfp100"
if [ $? != 127 ]
then
chedition -l 2>$temp"jfp100" 1>$temp"jfp100"
if [ $? = 0 ]
then
EDition=$(chedition -l)
else
EDition=$(/usr/ios/cli/ioscli chedition -list 2>$temp"jfp100")
if [[ $EDition = "" ]] ; then EDition="not determined" ; fi
fi
fi
VerFileIOS=$(lslpp -L "ios.cli.rte" | grep "ios.cli.rte" |awk '{print$2}')
echo ' VIOS IOSlevel : <strong id="db-vioslevel"> '$(/usr/ios/cli/ioscli
ioslevel)' </strong> , Edition : <strong> '$EDition' </strong> ,
ios.cli.rte : <strong> '$VerFileIOS' </strong>' >> $NomMod
fi
echo ' ' >> $NomMod
for i in $(lsdev -C -F name | grep proc)
do
processeur=$i
done

echo 'Quantity of processor : <strong> '$(lsdev -Cc processor|wc -l)'</strong> ,


Model : <strong>' $(lsattr -El $processeur | tail +2 | awk ' { print $1,$2 }
')'</strong> <strong> '$(cat $tpvar"jfp_prtconf" | grep -i "clock speed" | tr " "
"%" |tr ":" " " | awk '{print$2}' | tr "%" " ")' </strong>' >> $NomMod

echo $(bindprocessor -q | cut -c -30)'<strong> '$(bindprocessor -q | cut -c


30-)'</strong> ; Kernel Type :<strong> '$(bootinfo -K)' bits </strong> ;
Architecture :<strong> '$(bootinfo -y)' bits </strong>' >> $NomMod

memoire=$(bootinfo -r)
[ $? = 0 ] && let memoire1=$memoire/1024
echo 'Really memory size : <strong> '$memoire1' Mbytes </strong>' >> $NomMod
for i in $(lsdev -C -F name | grep L2cache)
do
echo 'Cache : '$i' --> <strong> '$(lsattr -El $i)' </strong>' >> $NomMod
done
smtctl 1>$temp"jfp1" 2>$temp"jfp1"
if [ $? != 127 ]
then
smtctl |grep SMT | grep proc | grep -v bound > $temp"jfp1"
if [ -s $temp"jfp1" ]
then
echo $(smtctl |grep SMT | grep proc | grep -v bound | cut -c
-10)'<strong> '$(smtctl |grep SMT | grep proc | grep -v bound | cut -c 10-)'
</strong>' >> $NomMod
fi
fi
echo ' ' >> $NomMod
cat $tpvar"jfp_prtconf" |grep -i firmware |grep -iv "not available" | while read
conf ; do
echo $(echo $conf | tr " " "%" | tr ":" " "| awk '{print$1}'| tr "%" " ")'
<strong> '$(echo $conf | tr " " "%" | tr ":" " "| awk '{print$2}'| tr "%" " ")'
</strong>' > $temp"jfp1"
cat $temp"jfp1" | grep -i Version > $temp"jfp2"
if [ -s $temp"jfp2" ]
then
echo $(echo $conf | tr " " "%" | tr ":" " "| awk '{print$1}'| tr "%" "
")' <strong id="db-srvfirmware"> '$(echo $conf | tr " " "%" | tr ":" " "| awk
'{print$2}'| tr "%" " ")' </strong>' >> $NomMod
else
echo $(echo $conf | tr " " "%" | tr ":" " "| awk '{print$1}'| tr "%" "
")' <strong> '$(echo $conf | tr " " "%" | tr ":" " "| awk '{print$2}'| tr "%" " ")'
</strong>' >> $NomMod
fi
done

>$temp"jfp111"
>$temp"jfp112"
>$temp"jfp113"
ls $tpsort"Res"* | while read aa ; do
cat $aa | grep -i 'class="alert"' >> $temp"jfp111"
cat $aa | grep -i 'class="alert0"' >> $temp"jfp112"
cat $aa | grep -ivE 'class="alert0"|class="alert"' >> $temp"jfp113"
done
cat $temp"jfp113" >> $NomMod
echo '' >> $NomMod
cat $temp"jfp112" >> $NomMod
echo '' >> $NomMod
cat $temp"jfp111" >> $NomMod

echo '</pre></h2>' >> $NomMod


rm -f $tpvar$j$NomMod"jfp"*
return $a
}

# --- Calcul du sommaire de l audit


sommaire()
{
$debug
typeset aa bb num titre
typeset -i j=$1
typeset -i a=0
typeset -i i=0
typeset UtilModule temp NomMod bb
NomMod=$tpvar"sommaire"
UtilModule="Sommaire"
temp=$tpvar$j"sommaire"
>$temp"jfp1"
echo "sommaire . . . ."
echo '<div id="bloc-fixe-menu"><div id="position-menu"><ul id="menu"><li><a
href="#sommaire">Home</a><ul></ul></li>' >> $NomMod
#TableTitre
echo '<li><a href="#">Hard Audit</a><ul>' >> $NomMod
let i=0
while (( $i < $NbLigneSommH ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+1000]} ]]
then
bb="" ; [ ${SignetS[$i+1000]} != "" ] 2>$temp"jfp3" && ( bb="1." ; echo
'<li><a href=#'${SignetS[$i+1000]}'>'$bb ${NumS[$i+1000]}' '$
{TitreS[$i+1000]}'</a></li>' >> $NomMod )
fi
done
echo '</ul></li>' >> $NomMod
echo '<li><a href="#">System Audit</a><ul>' >> $NomMod
let i=0
while (( $i < $NbLigneSommS ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+2000]} ]]
then
bb="" ; [ ${SignetS[$i+2000]} != "" ] 2>$temp"jfp3" && ( bb="2." ; echo
'<li><a href=#'${SignetS[$i+2000]}'>'$bb ${NumS[$i+2000]}' '$
{TitreS[$i+2000]}'</a></li>' >> $NomMod )
fi
done
echo '</ul></li>' >> $NomMod
echo '<li><a href="#">Aix Command Audit</a><ul>' >> $NomMod
let i=0
while (( $i < $NbLigneSommA ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+3000]} ]]
then
bb="" ; [ ${SignetS[$i+3000]} != "" ] 2>$temp"jfp3" && ( bb="3." ; echo
'<li><a href=#'${SignetS[$i+3000]}'>'$bb ${NumS[$i+3000]}' '$
{TitreS[$i+3000]}'</a></li>' >> $NomMod )
fi
done
echo '</ul></li>' >> $NomMod
echo '<li><a href="#">Aix file Audit</a><ul>' >> $NomMod
let i=0
while (( $i < $NbLigneSommF ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+4000]} ]]
then
bb="" ; [ ${SignetS[$i+4000]} != "" ] 2>$temp"jfp3" && ( bb="4." ; echo
'<li><a href=#'${SignetS[$i+4000]}'>'$bb ${NumS[$i+4000]}' '$
{TitreS[$i+4000]}'</a></li>' >> $NomMod )
fi
done

echo '</ul></li>' >> $NomMod


echo '<li><a>About</a><ul><li><a href=#bottom>Go to bottom</a></li><li><a
onclick="alert('\''Script de Jean Fran�ois Pinguet,
'$VersionE''''\'');">Version</a></li><li><a
href="http://galetiere.fr/aufildeaix/telechargement.htm">Download new
version</a></li><li><a href=javascript:andalso()>and
also</a></li></ul></li></ul></div></div>' >> $NomMod
#echo '<li><a>About</a><ul><li><a href=#bottom>Go to bottom</a></li><li><a
onclick="alert('\''Script de Jean Fran�ois Pinguet,
'$VersionE''''\'');">Version</a></li><li><a onclick="alert('\''Version d AIXVIEW
adapt�e pour ECS groupe ECONOCOM'''\'');">and
also</a></li></ul></li></ul></div></div>' >> $NomMod

#cho '<div id="bloc-fixe-pub"><marquee width="800" direction="left" loop="infinite"


scrollamount="2" align="bottom" height="20">this audit was created and offered by
JFP technical support </marquee></div>' >> $presentation
# --- fermeture du corp HTML
echo '</body>' >> $NomMod
echo '</html>' >> $NomMod
rm -f $tpvar$j$NomMod"jfp"*
return $a
}
# --- Corps d audit
CorpAudit()
{
$debug
typeset aa bb ee Num long position
typeset -i j=$1
typeset -i a=0
typeset -i i=0
typeset -i larg largmax
typeset UtilModule temp NomMod TypeModule titre Nom aa bb ee lien
NomMod=$tpvar"corpaudit"
UtilModule="corpaudit"
temp=$tpvar$j"corpaudit"
>$temp"jfp1"
>$NomMod
echo '<h1> 1 Hard Audit : </h1>' >> $NomMod
let i=0
ls $tpsort"Mod"* > $temp'listmoduok'
while (( $i < $NbLigneSommH ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+1000]} ]]
then
echo '<a name="'${SignetS[$i+1000]}'"></a>' >> $NomMod
echo '<h3><strong> 1.'${NumS[$i+1000]}'. '$
{TitreS[$i+1000]}'</strong>' >> $NomMod

let larg=0; let largmax=7


>$temp"menupres"
for lien in ${listlien[$i+1000]}
do
lienok=$(cat $temp'listmoduok' | grep $lien)
if [[ $lienok != '' ]]
then
((larg+=1))
if (( $larg >= largmax )) ; then echo
'<pre></pre>' >> $temp"menupres"; let larg=0; fi
echo '<li><a href=#titre'$lien'>'$(cat
$tpsort"ListeTitreMS"| grep $lien | read inf descrip ; echo $descrip)'</a></li>' >>
$temp"menupres"
fi
done
if [ -s $temp"menupres" ]
then
echo '<div id="bloc-menu"><div id="position-
menuf"><ul id="menuf"><li><a href="#"> you can see also in the same theme :
</a><ul>' >> $NomMod
cat $temp"menupres" >> $NomMod
echo '</ul></li></ul></div></div></h3>' >> $NomMod
else
echo '</h3>' >> $NomMod
fi

echo '<PRE>' >> $NomMod


cat $tpsort${NomMd[$i+1000]} >> $NomMod
echo '</PRE>' >> $NomMod
echo '<div id="back"><a href="#sommaire">Back to top</a> -
- - - - - - <a href="#'${SignetS[$i+1000]}'">Back to '$
{TitreS[$i+1000]}'</a></div>' >> $NomMod
fi
done
echo '<h1> 2 Soft Audit : </h1>' >> $NomMod
let i=0

while (( $i < $NbLigneSommS ))


do
((i+=1))
if [[ -s $tpsort${NomMd[$i+2000]} ]]
then
echo '<a name="'${SignetS[$i+2000]}'"></a>' >> $NomMod
echo '<h3><strong> 2.'${NumS[$i+2000]}'. '$
{TitreS[$i+2000]}'</strong>' >> $NomMod
let larg=0; let largmax=7
>$temp"menupres"
for lien in ${listlien[$i+2000]}
do
lienok=$(cat $temp'listmoduok' | grep $lien)
if [[ $lienok != '' ]]
then
((larg+=1))
if (( $larg >= largmax )) ; then echo
'<pre></pre>' >> $temp"menupres"; let larg=0; fi
echo '<li><a href=#titre'$lien'>'$(cat
$tpsort"ListeTitreMS"| grep $lien | read inf descrip ; echo $descrip)'</a></li>' >>
$temp"menupres"
fi
done
if [ -s $temp"menupres" ]
then
echo '<div id="bloc-menu"><div id="position-
menuf"><ul id="menuf"><li><a href="#"> you can see also in the same theme :
</a><ul>' >> $NomMod
cat $temp"menupres" >> $NomMod
echo '</ul></li></ul></div></div></h3>' >> $NomMod
else
echo '</h3>' >> $NomMod
fi
echo '<PRE>' >> $NomMod

cat $tpsort${NomMd[$i+2000]} >> $NomMod


echo '</PRE>' >> $NomMod
echo '<div id="back"><a href="#sommaire">Back to top</a> -
- - - - - - <a href="#'${SignetS[$i+2000]}'">Back to '$
{TitreS[$i+2000]}'</a></div>' >> $NomMod
fi
done
echo '<h1> 3 Aix command Audit : </h1>' >> $NomMod
let i=0
while (( $i < $NbLigneSommA ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+3000]} ]]
then
echo '<a name="'${SignetS[$i+3000]}'"></a>' >> $NomMod
echo '<h3><strong> 3.'${NumS[$i+3000]}'. '$
{TitreS[$i+3000]}'</strong>' >> $NomMod
let larg=0; let largmax=7
>$temp"menupres"
for lien in ${listlien[$i+3000]}
do
lienok=$(cat $temp'listmoduok' | grep $lien)
if [[ $lienok != '' ]]
then
((larg+=1))
if (( $larg >= largmax )) ; then echo
'<pre></pre>' >> $temp"menupres"; let larg=0; fi
echo '<li><a href=#titre'$lien'>'$(cat
$tpsort"ListeTitreMS"| grep $lien | read inf descrip ; echo $descrip)'</a></li>' >>
$temp"menupres"
fi
done
if [ -s $temp"menupres" ]
then
echo '<div id="bloc-menu"><div id="position-
menuf"><ul id="menuf"><li><a href="#"> you can see also in the same theme :
</a><ul>' >> $NomMod
cat $temp"menupres" >> $NomMod
echo '</ul></li></ul></div></div></h3>' >> $NomMod
else
echo '</h3>' >> $NomMod
fi
echo '<PRE>' >> $NomMod
cat $tpsort${NomMd[$i+3000]} >> $NomMod
echo '</PRE>' >> $NomMod
echo '<div id="back"><a href="#sommaire">Back to top</a> -
- - - - - - <a href="#'${SignetS[$i+3000]}'">Back to '$
{TitreS[$i+3000]}'</a></div>' >> $NomMod
fi
done
echo '<h1> 4 Aix file Audit : </h1>' >> $NomMod
let i=0
while (( $i < $NbLigneSommF ))
do
((i+=1))
if [[ -s $tpsort${NomMd[$i+4000]} ]]
then
echo '<a name="'${SignetS[$i+4000]}'"></a>' >> $NomMod
echo '<h3><strong> 4.'${NumS[$i+4000]}'. '$
{TitreS[$i+4000]}'</strong>' >> $NomMod
let larg=0; let largmax=7
>$temp"menupres"
for lien in ${listlien[$i+4000]}
do
lienok=$(cat $temp'listmoduok' | grep $lien)
if [[ $lienok != '' ]]
then
((larg+=1))
if (( $larg >= largmax )) ; then echo
'<pre></pre>' >> $temp"menupres"; let larg=0; fi
echo '<li><a href=#titre'$lien'>'$(cat
$tpsort"ListeTitreMS"| grep $lien | read inf descrip ; echo $descrip)'</a></li>' >>
$temp"menupres"
fi
done
if [ -s $temp"menupres" ]
then
echo '<div id="bloc-menu"><div id="position-
menuf"><ul id="menuf"><li><a href="#"> you can see also in the same theme :
</a><ul>' >> $NomMod
cat $temp"menupres" >> $NomMod
echo '</ul></li></ul></div></div></h3>' >> $NomMod
else
echo '</h3>' >> $NomMod
fi
echo '<PRE>' >> $NomMod
cat $tpsort${NomMd[$i+4000]} >> $NomMod
echo '</PRE>' >> $NomMod
echo '<div id="back"><a href="#sommaire">Back to top</a> -
- - - - - - <a href="#'${SignetS[$i+4000]}'">Back to '$
{TitreS[$i+4000]}'</a></div>' >> $NomMod
fi
done
rm -f $tpvar$j$NomMod"jfp"*
rm -f $temp"menupres"
return $a
}
# --- Module de mod�le et num de s�rie
ModelMachine()
{
$debug
typeset -i j=$1
typeset -i a=0
typeset UtilModule temp NomMod hrd
NomMod=$tpvar"ModelMachine"
UtilModule="Model Type and Serial number"
temp=$tpvar$j"ModMach"
>$temp"jfp1"
uname -M | tr ',' ' ' | awk '{print$2}' > $temp"jfp1"
if [[ ! -s $temp"jfp1" ]]
then
lscfg -vp > $temp"jfp"
if [ $? = 0 ]
then
# --- machine MCA ---
cat $temp"jfp" | grep 'MCA bus' > $temp"jfp1"
if [ $? != 0 ]
then
# --- machine repondant � Type/Mod�le
cat $temp"jfp" | grep 'PCI bus' > $temp"jfp1"
if [ $? = 0 ]
then
cat $temp"jfp" | grep 'Type/Model' > $temp"jfp1"
if [ $? = 0 ]
then
cat $temp"jfp" | grep 'Type/Model' >> $NomMod
cat $temp"jfp" | grep 'Machine/Cabinet' >> $NomMod
else
cat $temp"jfp" | grep 'Type and Model' > $temp"jfp1"
if [ $? = 0 ]
then
#cat $temp"jfp" | grep "PCI bus" >> $NomMod
cp $temp"jfp" $tpvar"FichHard"
NumSerie $j
else
# --- pas de num de serie en PCI
cat $temp"jfp" | grep "PCI bus" >> $NomMod
fi
fi
fi
else
# --- pas de num de serie en MCA
cat $temp"jfp" | grep "MCA bus" >> $NomMod
fi
fi
else
NumSerie $j
let a=$?+11
cat $temp"jfp1" > $NomMod
fi
rm -f $tpvar$j$NomMod"jfp"*
return $a
}
# --- Module de num de s�rie
NumSerie()
{
$debug
typeset -i j=$1
typeset -i a=0
typeset UtilModule temp NomMod hrd longhard h tabu i k l
typeset -i i k l h
NomMod=$tpvar"NumSerie"
UtilModule="S�rial number"
temp=$tpvar$j"NumSerie"
>$temp"jfp1"

cat $tpvar"jfp_prtconf" |grep -i "machine serial number" |grep -iv "not available"
| tr " " "%" | tr ":" " " | awk '{print$2}' | tr '%' ' ' | awk '{print$1}' >
$temp"jfp1"
if [[ ! -s $temp"jfp1" ]]
then

longhard=$(cat $tpvar"FichHard" | wc -l)


let h=1
until (( $h > $longhard ))
do
head -n $h $tpvar"FichHard" | tail -n 1 > $temp"jfp"
cat $temp"jfp" | grep 'Type and Model' > $temp"jfp1"
cat $temp"jfp1" > $temp"jfp"
if [[ $(cat $temp"jfp") != "" ]]
then
# ---- recherche du debut des caract�res dans la ligne ----
longtemp=$(cat $temp"jfp" | wc -m)
i=0
tabu=""
until [[ $i -eq $longtemp ]] || [[ $(echo $tabu) != "" ]]
do
let i=$i+1
tabu=$(head -c $i $temp"jfp")
done
# ---- fin de recherche debut des caract�res dans la ligne ----
# ---- recherche debut de paragraphe en controlant le debut de
ligne-
let l=$h
tabu=""
let i=$i-1
until [[ $l -eq 1 ]] || [[ $(echo $tabu) != "" ]]
do
# --- lecture de la ligne precedante ---
let l=$l-1
head -n $l $tpvar"FichHard" | tail -n 1 > $temp"jfp"
tabu=$(head -c $i $temp"jfp")
done
# ---- control si l on ce trouve au bon endroit dans le fichier ---
if [[ $(cat $temp"jfp" | grep -i system) != "" ]]
then
# --- recherche de la fin du paragraphe ---
let k=$l
tabu=""
until [[ $k -eq $longhard ]] || [[ $(echo $tabu) != "" ]]
do
# --- lecture de la ligne suivant ---
let k=$k+1
head -n $k $tpvar"FichHard" | tail -n 1 > $temp"jfp"
tabu=$(head -c $i $temp"jfp")
done
let l=$k-$l
head -n $k $tpvar"FichHard" | tail -n $l > $temp"jfp"
grep -E "Serial|Model" $temp"jfp" >> $NomMod
fi
fi
let h=$h+1
done
else
a=10
cat $temp"jfp1" > $NomMod
fi
rm -f $tpvar$j$NomMod"jfp"*
return $a
}
# --- Mise en forme du num de type,s�rie
FormTypeSerie()
{
$debug
typeset -i a=0
typeset -i i=0
typeset -i j=0
typeset Nblignes long fichier temp long
typeset NomMod UtilModule LignePair NbModuleMachine position
NomMod=$tpvar"FormTypeSerie"
UtilModule="MiseEnFormeTypeSerie"
temp=$tpvar"FormTypSer"
>$temp"jfp1"
>$NomMod
if [ $1 = 0 ] || [ $1 = 11 ]
then
[[ -s $tpvar"ModelMachine" ]] && cat $tpvar"ModelMachine" > $temp"jfp"
cat $tpvar"NumSerie" >> $temp"jfp" 2>$temp"jfp1"
cat $temp"jfp" | grep ".." > $temp"jfp1"
Nblignes=$(cat $temp"jfp1" | wc -l)
let LignePair=Nblignes-Nblignes/2*2
if [[ $LignePair = 0 ]] || [[ $Nblignes = 0 ]]
then
>$NomMod
let NbModuleMachine=Nblignes/2
let i=0
until (( $i >= $NbModuleMachine ))
do
((i+=1))
head -n $i $temp"jfp1" | tail -n 1 > $temp"jfp2"
long=$(cat $temp"jfp2" | wc -m)
let position=long-8
let j=$i+$NbModuleMachine
head -n $j $temp"jfp1" | tail -n 1 >> $temp"jfp""2"
# extraction du Type,serie
NomAudi[$i]=$(cat $temp"jfp""2" | cut -c $position- | awk '{printf
$0"_"}')
cat $temp"jfp2" | cut -c $position- | tr "
" " " >> $NomMod
echo ";" >> $NomMod
done
NomAudit=${NomAudi[1]}
fi
elif [ $1 = 21 ] || [ $1 = 10 ]
then
NomAudit=$(cat $tpvar"ModelMachine")'_'$(cat $tpvar"NumSerie")
echo $(cat $tpvar"ModelMachine")'.'$(cat $tpvar"NumSerie") >> $NomMod
fi
rm -f $tpvar$j$NomMod"jfp"*
return $a
}
# --- DEBUT DES MODULES

ModFFF001() # Num�ro d execution


{
$debug
#yyyy ModFFF001 oui 6 "ls -ltr /var | tail"
typeset j=$1
typeset TitreModule version
TitreModule="ls -ltr /var | tail"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF001"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
ls -ltr /var | tail > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_tail''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'ls -ltr /var | tail \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_ls_ltr_var_tail" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_tail''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF002() # Num�ro d execution
{
$debug
#yyyy ModFFF002 oui
typeset j=$1
typeset TitreModule version
TitreModule="inittab file"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF002"
filtre='infosys'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/inittab > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcinittab''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'cat /etc/inittab \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcinittab" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcinittab''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModFFF003() # Num�ro d execution


{
$debug
#yyyy ModFFF003 oui
typeset j=$1
typeset TitreModule version
TitreModule="hosts file (/etc/hosts)"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF003"
filtre='infosys'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/hosts > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etchosts''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/hosts \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etchosts" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etchosts''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModFFF004() # Num�ro d execution


{
$debug
#yyyy ModFFF004 oui
typeset j=$1
typeset TitreModule version
TitreModule="/etc/inetd.conf"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF004"
filtre='network'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/inetd.conf > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcinetdconf''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/inetd.conf \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcinetdconf" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcinetdconf''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModFFF005() # Num�ro d execution


{
$debug
#yyyy ModFFF005 oui
typeset j=$1
typeset TitreModule version
TitreModule="/etc/rc.tcpip file"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF005"
filtre='network'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/rc.tcpip > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcrctcpip''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/rc.tcpip \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcrctcpip" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcrctcpip''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF006() # Num�ro d execution
{
$debug
#yyyy ModFFF006 oui 6 "ls -ltr /var/tmp | tail"

typeset j=$1
typeset TitreModule version
TitreModule="ls -ltr /var/tmp | tail"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF006"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
ls -ltr /var/tmp | tail > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_tmp_tail''\''));"
style="cursor: pointer;"><strong class="alert1"> \c' >> $Modu
echo 'ls -ltr /var/tmp | tail' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_ls_ltr_var_tmp_tail" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_tmp_tail''\''));"
style="cursor: pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModFFF007() # Num�ro d execution


{
$debug
#yyyy ModFFF007 oui

typeset j=$1
typeset TitreModule version
TitreModule="ulimit -a"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF007"
filtre='infoperf'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
ulimit -a > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''ulimita''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'ulimit -a \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="ulimita" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''ulimita''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi

echo $j > $Somm


echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF008() # Num�ro d execution
{
$debug
#yyyy ModFFF008 oui

typeset j=$1
typeset TitreModule version
typeset -i a=0
TitreModule="/etc/qconfig (printer)"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF008"
filtre='infoinst'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/qconfig > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcqconfig''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/qconfig \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcqconfig" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcqconfig''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF009() # Num�ro d execution
{
$debug
#yyyy ModFFF009 oui

typeset j=$1
typeset TitreModule version
TitreModule="edit crontab"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF009"
filtre='infosys'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
crontab -l > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''crontabl''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'crontab -l \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="crontabl" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''crontabl''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF010() # Num�ro d execution
{
$debug
#yyyy ModFFF010 oui
typeset -i i
typeset j=$1
typeset TitreModule version
TitreModule="Information audit executing"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF010"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
echo $CmdLancer >> $Modu
echo '' >> $Modu
if [ -s $tpsort"KILL9" ]
then
echo '<a href="#'${SignetS[$NumNum+4000]}'" class="alert" title="Go to 4.'$j'
'$TitreModule'">Some command with time out are Killed</a>' >> $Resu
echo 'Some command with time out are Killed' >> $Modu
cat $tpsort"KILL9" >> $Modu
else
echo 'no command KILL' >> $Modu
fi
if [ -s $tpsort"MVide" ]
then
echo 'Command with no result :' >> $Modu
cat $tpsort"MVide" >> $Modu
fi
echo '' >> $Modu
cat $tpsort"ModExecAudit" >> $Modu
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF011() # Num�ro d execution
{
$debug
#yyyy ModFFF011 oui

typeset j=$1
typeset TitreModule version
TitreModule="Tuning Info : /etc/tunables/nextboot"
version=" version 11-H.2.15"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF011"
filtre='infoperf'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/tunables/nextboot > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etctunablesnextboot''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/tunables/nextboot \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etctunablesnextboot" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etctunablesnextboot''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF012() # Num�ro d execution
{
$debug
#yyyy ModFFF012 oui
typeset j=$1
typeset TitreModule version
TitreModule="environment variables : env"
version=" version 11-H.2.16"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF012"
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
env > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''envjfpenviron''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'env \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="envjfpenviron" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''envjfpenviron''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF013() # Num�ro d execution
{
$debug
#yyyy ModFFF013 oui
typeset j=$1
typeset TitreModule version
TitreModule="INFO DUMP : sysdumpdev"
version=" version 11-H.2.16, modif le 29/05/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF013"
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
sysdumpdev -l > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''sysdumpdevl''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'sysdumpdev -l \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="sysdumpdevl" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''sysdumpdevl''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
sysdumpdev -L > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''sysdumpdevL2''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'sysdumpdev -L \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="sysdumpdevL2" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''sysdumpdevL2''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF014() # Num�ro d execution
{
$debug
#yyyy ModFFF014 oui

typeset j=$1
typeset TitreModule version
TitreModule="/etc/profile"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF014"
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/profile > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcprofile''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/profile \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcprofile" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcprofile''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF015() # Num�ro d execution
{
$debug
#yyyy ModFFF015 oui

typeset j=$1
typeset TitreModule version
TitreModule="/etc/passwd"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF015"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/passwd > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcpasswd''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/passwd \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcpasswd" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcpasswd''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF016() # Num�ro d execution
{
$debug
#yyyy ModFFF016 oui

typeset j=$1
typeset TitreModule version
TitreModule="/etc/group"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF016"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/group > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcgroup''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/group \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcgroup" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcgroup''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF017() # Num�ro d execution
{
$debug
#yyyy ModFFF017 oui

typeset j=$1
typeset TitreModule version
TitreModule="/etc/filesystems"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF017"
filtre='infosys'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/filesystems > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcfilesystems''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/filesystems \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcfilesystems" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcfilesystems''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF018() # Num�ro d execution
{
$debug
#yyyy ModFFF018 oui

typeset j=$1
typeset TitreModule version
TitreModule="/etc/security/limits"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF018"
filtre='infoperf'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/security/limits > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcsecuritylimits''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/security/limits \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcsecuritylimits" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcsecuritylimits''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF019() # Num�ro d execution
{
$debug
#yyyy ModFFF019 oui

typeset j=$1
typeset TitreModule version
TitreModule="locale"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF019"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
locale > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''localejfp2''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'locale \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="localejfp2" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''localejfp2''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF020() # Num�ro d execution
{
$debug
#yyyy ModFFF020 oui 6 "ls -ltr /var/adm | tail"
typeset j=$1
typeset TitreModule version
TitreModule="ls -ltr /var/adm | tail"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF020"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
ls -ltr /var/adm | tail > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_adm_tail''\''));"
style="cursor: pointer;"><strong class="alert1"> \c' >> $Modu
echo 'ls -ltr /var/adm | tail \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_ls_ltr_var_adm_tail" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_adm_tail''\''));"
style="cursor: pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModFFF021() # Num�ro d execution


{
$debug
#yyyy ModFFF021 oui
typeset j=$1
typeset TitreModule version
TitreModule="/etc/environment"
version=" version 2012-1.0.0 date : 27/10/11"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF021"
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
cat /etc/environment > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''etcenvironment''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo '/etc/environment \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="etcenvironment" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''etcenvironment''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF022() # Num�ro d execution
{
$debug
#yyyy ModFFF022 oui "Demon inetd (lssrc -ls inetd)"
typeset j=$1
typeset TitreModule version
TitreModule="Demon inetd (lssrc -ls inetd)"
version=" version 2012-1.2.6 date: 13/12/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF022"
filtre='network'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lssrc -ls inetd > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''lssrclsinetd''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'lssrc -ls inetd \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="lssrclsinetd" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''lssrclsinetd''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF023() # Num�ro d execution
{
$debug
#yyyy ModFFF023 oui 6 "ls -ltr /var/adm | tail"
typeset j=$1
typeset TitreModule version
TitreModule="tail /var/adm/sulog"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF023"
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
tail /var/adm/sulog > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_tail_var_adm_sulog''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'tail /var/adm/sulog \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_tail_var_adm_sulog" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_tail_var_adm_sulog''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF024() # Num�ro d execution
{
$debug
#yyyy ModFFF024 oui 6 "ls -ltr /var/adm/ras"
typeset j=$1
typeset TitreModule version
TitreModule="ls -ltr /var/adm/ras"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF024"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
ls -ltr /var/adm/ras > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_adm_ras''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'ls -ltr /var/adm/ras \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_ls_ltr_var_adm_ras" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_ls_ltr_var_adm_ras''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModFFF025() # Num�ro d execution
{
$debug
#yyyy ModFFF025 oui 6 "last | head"
typeset j=$1
typeset TitreModule version
TitreModule="last | head"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="FFF025"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+4000]="Mod"$NomMod
TitreS[$NumNum+4000]=$TitreModule
NumS[$NumNum+4000]=$j
SignetS[$NumNum+4000]="titre"$NomMod
listlien[$NumNum+4000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
last | head > $temp"result"
if [ -s $temp"result" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_last_head''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'last | head \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_last_head" style="display: none;">' >> $Modu
cat $temp"result" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_last_head''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
#FinModFFF

ModHHH001() # Num�ro d execution


{
$debug
#yyyy ModHHH001 oui "HARD Available SCSI Adapter"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SCSI Adapter"
version=" version 2013-1.4.2 date: 19/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH001"
typeset -i num=1
typeset ligne typeinfo
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[]
SerialNumber[] ccin[] sizem[] location1[] location2[] location3[] location4[]
location5[] location6[] Manufacturer[] Firm[] NetAddr[]
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -S A -Cc adapter -F name,description | grep -i scsi| tr ' ' '%' | tr ',' ' '
| awk '{print$1}' > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc adapter -F name,description | grep -i scsi | tr ' ' '%' | tr ',' ' '
> $temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
VgAssos[$numligne]=$(lspv | grep -w ${NomAdapter[$numligne]} | awk
'{print$3}') ; echo ${VgAssos[$numligne]} > $temp"jfp0" ; VgAssos[$numligne]=$(cat
$temp"jfp0") ; if [ "${VgAssos[$numligne]}" = '' ] ; then VgAssos[$numligne]='none'
; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then

SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial


%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber[$numligne]} > $temp"jfp0" ; SerialNumber[$numligne]=$(cat
$temp"jfp0") ; if [ "${SerialNumber[$numligne]}" = '' ] ; then
SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%' '
') ; echo ${ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ;
if [ "${ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and
%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer[$numligne]} > $temp"jfp0" ; Manufacturer[$numligne]=$(cat
$temp"jfp0") ; if [ "${Manufacturer[$numligne]}" = '' ] ; then
Manufacturer[$numligne]='none' ; fi
NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} >
$temp"jfp0" ; NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}"
= '' ] ; then NetAddr[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
if [ "${Firm[$numligne]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%' ' '
| sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$
(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; echo $
{location1[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location1[$numligne]=$
(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; echo $
{location2[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; echo $
{location3[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; echo $
{location4[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; echo $
{location5[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; echo $
{location6[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = 'none' ]
then
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
fi
echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"
echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${VgAssos[$numligne]} >> $temp"VgAssos""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${ccin[$numligne]} >> $temp"ccin""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${NetAddr[$numligne]} >> $temp"NetAddr""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
VgAssos2[$numligne2]="${VgAssos[$numligne]}"
FRU2[$numligne2]="none"

SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial


%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin2[$numligne2]} >
$temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin2[$numligne2]}" =
'' ] ; then ccin2[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%'
' ') ; echo ${ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ;
fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
NetAddr2[$numligne2]=$(cat $temp"adapter" | grep -i Network
%Address | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{NetAddr2[$numligne2]} > $temp"jfp0" ; NetAddr2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${NetAddr2[$numligne2]}" = '' ] ; then NetAddr2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm2[$numligne2]=$
(cat $temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%'
' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} > $temp"jfp0" ;
Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" = '' ] ; then
Firm2[$numligne2]='none' ; fi ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; if [ "$
{location12[$numligne2]}" = '' ] ; then location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; if [ "$
{location22[$numligne2]}" = '' ] ; then location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; if [ "$
{location32[$numligne2]}" = '' ] ; then location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; if [ "$
{location42[$numligne2]}" = '' ] ; then location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; if [ "$
{location52[$numligne2]}" = '' ] ; then location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; if [ "$
{location62[$numligne2]}" = '' ] ; then location62[$numligne2]='none' ; fi
if [ "${location12[$numligne2]}" = 'none' ]
then
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi
fi
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${VgAssos2[$numligne2]} >> $temp"VgAssos2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${ccin2[$numligne2]} >> $temp"ccin2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${NetAddr2[$numligne2]} >> $temp"NetAddr2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done
let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"Adapterdesc""11" | sort -u > $temp"Adapterdesc""1"
cat $temp"VgAssos""11" | sort -u > $temp"VgAssos""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"SerialNumber""11" | sort -u > $temp"SerialNumber""1"
cat $temp"ccin""11" | sort -u > $temp"ccin""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"Adapterdesc2""11" | sort -u > $temp"Adapterdesc2""1"
cat $temp"VgAssos2""11" | sort -u > $temp"VgAssos2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"SerialNumber2""11" | sort -u > $temp"SerialNumber2""1"
cat $temp"ccin2""11" | sort -u > $temp"ccin2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr VgAssos ccin typeM Manufacturer Firm
location1 location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 NomAdapter2 locaddr2 VgAssos2 ccin2 typeM2 Manufacturer2 Firm2
location12 location22 location32
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-scsicard"><tr><td>SCSI card :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{ccin[$numligne]}'</td><td>'${SerialNumber[$numligne]}'</td><td>'$
{Manufacturer[$numligne]}'</td><td><span class="db-location">'$
{location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo '-'$
{location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo '-'$
{location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td><td>'$
{Adapterdesc[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SCSI card with FRU </th>' >>
$Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>SCSI card :</td><td>'${NomAdapter2[$numligne]}'</td><td>'$
{locaddr2[$numligne]}'</td><td>'${FRU2[$numligne]}'</td><td>'$
{Firm2[$numligne]}'</td><td>'${ccin2[$numligne]}'</td><td>'$
{SerialNumber2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})$([[ ${location52[$numligne]} != 'none' ]] && echo '-'$
{location52[$numligne]})$([[ ${location62[$numligne]} != 'none' ]] && echo '-'$
{location62[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td></tr>' >>
$temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SCSI card without FRU </th>'
>> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH002() # Num�ro d execution
{
$debug
#yyyy ModHHH002 oui

typeset j=$1
typeset TitreModule version
TitreModule="SAS Raid Card"
version="modif with version 2013-1.4.2 date: 29/08/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH002"
typeset -i miss=0
typeset sas xx info status addr
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter -F name | grep sas >$temp"jfp1"
if [ $? = 0 ]
then
let nbfib=0
for sas in $(lsdev -l sissas* -F name)
do
((nbfib+=1))
lscfg -vl $sas | grep -iE "(alterable)|FRU|Part Number|Customer
Card ID Number|Network Address" | tr " " "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk '{print$2}'|tr
"#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" " ")
cat $temp"jfp6" | grep '(alterable)' |read xx xxx Z99
Z9=$(echo $Z99|tr " " "." | tr "#" " ")
CCIN=$(cat $temp"jfp6" | grep Customer#Card#ID#Number | awk
'{print$2}'|tr "#" " ")
lsdev -l $sas | read xx status addr info
echo '<TABLE cellpadding=1 cellspacing=1 border=1
bgcolor=#becddb><tr><td><b> Adapter : </b><em> '$sas' </em> <em> '$status'
</em> <em> '$addr' </em><b> '$info' </b>' >> $Modu
echo '<b> Parts : </b> '$part' , <b> FRU : </b> '$FRU' , <b>
Firmware : </b> '$Z9' , <b> CCIN : </b> '$CCIN >> $Modu
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><b> Diplaying Rechargeable Battery Information :
</b><em> '$sas' </em>' >> $Modu
sissasraidmgr -M -o0 -l $sas >> $Modu
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><b> Viewing the SAS device resource
information : </b><em> '$sas' </em>' >> $Modu
sissasraidmgr -Z -o1 -j3 -l $sas >> $Modu
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><b> Viewing the SAS device resource locations :
</b><em> '$sas' </em>' >> $Modu
sissasraidmgr -Z -o0 -j3 -l $sas >> $Modu
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><b> Viewing the Disk Array Configuration :
</b><em> '$sas' </em>' >> $Modu
sissasraidmgr -Ll $sas -j1 >> $Modu
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><b> Viewing the Disk SAS Configuration path on
split backplane : </b><em> '$sas' </em>' >> $Modu
sissasraidmgr -Tl $sas >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warniing" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
let miss=1
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warniing/<strong class=\"alert\">warniing<\/strong>/g;
s/Warniing/<strong class=\"alert\">Warniing<\/strong>/g; s/WARNIiNG/<strong
class=\"alert\">WARNIiNG<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
fi
>$temp"jfp999"
>$temp"jfp888"
>$temp"jfp9"
echo '</TABLE><TABLE border=1 bgcolor=#becddb id="tab'$sas'"
style="display: none;">' >> $temp"jfp9"
for devsissas in $(lsdev -p $sas -F name)
do
echo '<tr><td>In the <b> '$(lsdev -Cl $devsissas -F
description)' : </b><em> '$devsissas' </em>' >> $temp"jfp9"
for devsas in $(lsdev -p $devsissas -F name)
do
sissasraidmgr -T -o0 -l $devsas > $temp"jfp111"
if [ -s $temp"jfp111" ]
then
cat $temp"jfp111" | grep -iE "Failed|missing|
suspect" > $temp"jfp1"
if [ -s $temp"jfp1" ]
then
let miss=1
echo '<a onclick="javascript:
showinf(document.getElementById('\'''tab''$devsas''''\''));" style="cursor:
pointer;"><b> Path for '$(lsdev -Cl $devsas -F description)' : </b><em>
'$devsas' </em><strong class="alert">Path missing or failed</strong> <img
src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif" title="Clic on device to
have other informations"></a>' >> $temp"jfp9"
else
echo '<a onclick="javascript:
showinf(document.getElementById('\'''tab''$devsas''''\''));" style="cursor:
pointer;"><b> Path for '$(lsdev -Cl $devsas -F description)' : </b><em>
'$devsas' </em> <img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif"
title="Clic on device to have other informations"></a>' >> $temp"jfp9"
fi
echo '<a cellpadding=2 cellspacing=0
rules=cols bgcolor=#d6d6d8 id="tab'$devsas'" style="display: none;">' >>
$temp"jfp9"
sed 's/'$devsas'/<em>'$devsas'<\/em>/g;
s/'$sas'/<em>'$sas'<\/em>/g' $temp"jfp111" > $temp"jfp90" ; echo '.\c'
sed 's/Operational/<b>Operational <\/b>/g;
s/operational/<b>operational <\/b>/g; s/OPERATIONAL/<b>OPERATIONAL <\/b>/g;'
$temp"jfp90" > $temp"jfp111" ; echo '.\c'
sed "s/Failed/<strong
class=\"alert\">Failed<\/strong>/g; s/failed/<strong
class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $temp"jfp111" > $temp"jfp90"
sed "s/missing/<strong
class=\"alert\">missing<\/strong>/g; s/Missing/<strong
class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $temp"jfp90" > $temp"jfp111"
sed "s/suspect/<strong
class=\"alert\">suspect<\/strong>/g; s/Suspect/<strong
class=\"alert\">Suspect<\/strong>/g; s/SUSPECT/<strong
class=\"alert\">SUSPECT<\/strong>/g" $temp"jfp111" > $temp"jfp90"
cat $temp"jfp90" >> $temp"jfp9"
echo '</a>' >> $temp"jfp9"
else
echo '<a onclick="javascript:
showinf(document.getElementById('\'''tab''$devsas''''\''));" style="cursor:
pointer;"><b> Path for '$(lsdev -Cl $devsas -F description)' : </b><em>
'$devsas' </em> none </a>' >> $temp"jfp9"
fi
done
echo '</td></tr>' >> $temp"jfp9"
cat $temp"jfp9" >> $temp"jfp888"
> $temp"jfp9"
done
if [ $miss = 1 ]
then
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><a onclick="javascript:
showinf(document.getElementById('\'''tab''$sas''''\''));" style="cursor:
pointer;"><b> PATH IN ADAPTER '$(lsdev -Cl $sas -F description)' : </b><em>
'$sas' </em><img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif"
title="Clic on adapter to have other informations"></a> <strong class="alert">Path
missing or failed</strong> </td></tr>' > $temp"jfp999"
else
echo '</td></tr></TABLE><TABLE cellpadding=1 cellspacing=1
border=1 bgcolor=#becddb><tr><td><a onclick="javascript:
showinf(document.getElementById('\'''tab''$sas''''\''));" style="cursor:
pointer;"><b> PATH IN ADAPTER '$(lsdev -Cl $sas -F description)' : </b><em>
'$sas' </em><img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif"
title="Clic on adapter to have other informations"></a></td></tr>' > $temp"jfp999"
fi
cat $temp"jfp888" >> $temp"jfp999"
echo '</table>' >> $temp"jfp999"
cat $temp"jfp999">> $Modu
done
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> Adapter
sas </strong> , quantity : <strong> '$nbfib' </strong>' >> $Resu
if [ $miss = 1 ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j' "SAS
Raid Card" </a>' >> $Resu
fi

fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH003() # Num�ro d execution
{
$debug
#yyyy ModHHH003 oui "HARD Available SSA Adapter"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SSA Adapter"
version=" version 2013-1.4.2 date: 17/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH003"
typeset -i num=1
typeset ligne
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[]
SerialNumber[] ccin[] sizem[] location1[] location2[] location3[] location4[]
location5[] location6[] Manufacturer[] Firm[] NetAddr[]
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -S A -Cc adapter -F name,description | grep -v siss | tr ' ' '%' | tr ',' ' '
| awk '{print$1}' | grep -i ssa > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc adapter -F name,description | grep -v siss | grep -i ssa | tr ' '
'%' | tr ',' ' ' > $temp"listeadapt"
typeset -i numtotligne
typeset -i numligne=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number" | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} > $temp"jfp0" ;
ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ] ; then
ccin[$numligne]='none' ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr '.' '
' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} > $temp"jfp0" ;
Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "${Manufacturer[$numligne]}" = ''
] ; then Manufacturer[$numligne]='none' ; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
#NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address | tr '.' '
' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} > $temp"jfp0" ;
NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}" = '' ] ; then
NetAddr[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i "ROS%level" | awk '{print$2}'
| tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ;
Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$1}') ; if [ "$
{location1[$numligne]}" = '' ] ; then location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$2}') ; if [ "$
{location2[$numligne]}" = '' ] ; then location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$3}') ; if [ "$
{location3[$numligne]}" = '' ] ; then location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$4}') ; if [ "$
{location4[$numligne]}" = '' ] ; then location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$5}') ; if [ "$
{location5[$numligne]}" = '' ] ; then location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i ${NomAdapter[$numligne]}
| tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk '{print$6}') ; if [ "$
{location6[$numligne]}" = '' ] ; then location6[$numligne]='none' ; fi

echo ${NomAdapter[$numligne]} >> $temp"NomAdapter"


echo ${locaddr[$numligne]} >> $temp"locaddr""1"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""1"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""1"
echo ${ccin[$numligne]} >> $temp"ccin""1"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""1"
echo ${FRU[$numligne]} >> $temp"FRU""1"
echo ${Firm[$numligne]} >> $temp"Firm""1"
echo ${location1[$numligne]} >> $temp"location1""1"
echo ${location2[$numligne]} >> $temp"location2""1"
echo ${location3[$numligne]} >> $temp"location3""1"
done
let numtotligne=$numligne
cat $temp"NomAdapter" | sort -u > $temp"NomAdapter""1"
let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr ccin Manufacturer Firm location1 location2
location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-ssacard"><tr><td>SSA card :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{SerialNumber[$numligne]}'</td><td>'${Manufacturer[$numligne]}'</td><td><span
class="db-location">'${location1[$numligne]}$([[ ${location2[$numligne]} !=
'none' ]] && echo '-'${location2[$numligne]})$([[ ${location3[$numligne]} != 'none'
]] && echo '-'${location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] &&
echo '-'${location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo
'-'${location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td><td>'$
{Adapterdesc[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>SerialN
umber</th><th>manufacturer</th><th>Physical Location</th><th>Description</th></tr>"
>> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH004() # Num�ro d execution
{
$debug
#yyyy ModHHH004 oui
typeset j=$1
typeset TitreModule version
TitreModule="All devices list"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH004"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -C >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH005() # Num�ro d execution


{
$debug
#yyyy ModHHH005 oui
typeset j=$1
typeset TitreModule version
TitreModule="Raid SSA card"
version=" version 11-H.2.26"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH005"
typeset i jj Capac carte bb
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter -F name | grep ssa | while read carte ; do
echo '<b> Battery status card </b><em> '$carte' : </em>' >> $Modu
ssa_fw_status -a $carte >> $Modu
done
#Recherche de carte SSA RAID
lsdev -Cc adapter -F name | grep -v siss | grep ssa >$temp"jfp1"
if [ $? = 0 ]
then
echo '<b> Configured adapter SSA : </b><em> \c' >> $Modu
lsdev -Cc adapter -F name | grep -v siss | grep ssa >> $Modu
echo ' </em> ' >> $Modu
lsdev -Cc adapter -F name | grep -v siss | grep ssa | while read
jj ; do

# info des connexions sur les cartes SSA raid


echo '<b> SSA link : </b>' >> $Modu
echo 'disk '$jj' P/N S/N A1 A2 B1 B2
etat' >> $Modu
ssaraid -I -z -l $jj | grep -v Dormant | grep -v hdisk | while
read pdisk SNum etat aa dim bb ; do
ref=$(lscfg -vl $pdisk | grep -E 'Part|R�f�rence')
long=$(echo $ref | wc -m)
let position=long-7
ref1=$(echo $ref | cut -c $position-)
ssaconn -l $pdisk -a $jj | read ppdisk aa A1 A2 B1 B2
echo $ppdisk' '$aa' '$ref1' '$SNum' '$A1' '$A2' '$B1'
'$B2' '$etat' '$dim >> $temp"jfp""4"
done
# --- comptage des disques pour le r�sum�
Nbbb=$(cat $temp"jfp4" | awk '{print $1 }' | sort -u | wc -l)
NbAdp=$(lsdev -Cc adapter -F name | grep ssa | sort -u | wc -l)
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> Adapter
SSA </strong> , Quantity : <strong> '$NbAdp' </strong> , Disk quantity : <strong>
'$Nbbb' </strong>' >> $Resu
for ssa in $(lsdev -Cc adapter -F name| grep ssa)
do
lscfg -vl $ssa | grep -iE "ROS Level|FRU|Part Number" | tr
" " "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk
'{print$2}'|tr "#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" "
")
cat $temp"jfp6" | grep 'ROS#Level' |read xx Z99
Z9=$(echo $Z99|tr " " "." | tr "#" " " | awk '{print$1}')
done
done
cat $temp"jfp""4" >> $Modu
echo '' >> $Modu
echo '<b> Relation ship pdisk to hdisk : </b>' >> $Modu
for i in $(lsdev -CS1 -cpdisk -sssar -F name)
do
echo "$i: "$(ssaxlate -l $i) >> $Modu
done
echo '' >> $Modu
for i in $(lsdev -Cc adapter -F name | grep -v siss | grep ssa)
do
echo '<b> Raid Lists on </b><em> '$i' </em>'
>> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lsmssaraid_hdr_cmd_to_exec -l $i >> $Modu
echo '' >> $Modu
echo '<b>Hot spare disk lists on </b><em> '$i'
</em>' >> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lhssaraid_hdr_cmd_to_exec -l $i >> $Modu
echo '' >> $Modu
for jj in $(/usr/ssa/ssaraid/bin/ssaraid.smit
lsmssaraid_hdr_cmd_to_exec -l $i | awk '{print $1}')
do
echo '<b>disks list member </b><em>
'$jj' </em><b> on </b><em> '$i' </em>' >> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lssaraid_hdr_cmd_to_exec -l $i -n $jj >> $Modu
done
echo '' >> $Modu
echo '<b>Rejected raid disk list on </b><em> '$i'
</em>' >> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lfssaraid_hdr_cmd_to_exec -l $i >> $Modu
echo '' >> $Modu
echo '<b>Array Candidate disk list on </b><em>
'$i' </em>' >> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lcssaraid_hdr_cmd_to_exec -l $i >> $Modu
echo '' >> $Modu
echo '<b>AIX System disks list on </b><em> '$i'
</em>' >> $Modu
/usr/ssa/ssaraid/bin/ssaraid.smit
lassaraid_hdr_cmd_to_exec -l $i >> $Modu
echo '' >> $Modu
done
else
>$Modu
fi
# --- Fin du module
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH006() # Num�ro d execution


{
$debug
#yyyy ModHHH006 oui
typeset j=$1
typeset TitreModule version
TitreModule="Error logs(errpt)"
version=" version 2013-1.3.6 date: 11/03/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH006"
typeset errligne infosrc sequence infodate infosrn
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
echo '<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">In this log,
click on the line. You will view all details (errpt -a) for this line' >> $Modu
echo '' >> $Modu
errpt -a | grep "Sequence Number:" | tr ' ' '%' |tr ':' ' ' | awk '{print$2}' | tr
'%' ' ' | while read sequence ; do
errligne=$(errpt -l $sequence | grep -v "DESCRIPTION")
errpt -al $sequence > $temp"jfp1"
infosrc=$(cat $temp"jfp1" | grep "SRC:")
infosrn=$(cat $temp"jfp1" | grep "SRN:")
infodate=$(cat $temp"jfp1" | grep Date | sed 's/Date\/Time://g')
echo '<a onclick="javascript:
showinf(document.getElementById('\'''tab''$sequence''''\''));" style="cursor:
pointer;"><strong class="alert1">'$errligne'</strong></a> '$infodate'
<em>'$infosrc'</em> <em>'$infosrn'</em><a cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="tab'$sequence'" style="display: none;">' >> $Modu
cat $temp"jfp1" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''tab''$sequence''''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</a>' >> $Modu
done
cat $Modu | grep -iE "Failed|missing|dead|sysplanar|degraded|warning" >
$temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/sysplanar/<strong class=\"alert\">sysplanar<\/strong>/g;
s/Sysplanar/<strong class=\"alert\">Sysplanar<\/strong>/g; s/SYSPLANAR/<strong
class=\"alert\">SYSPLANAR<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|sysplanar|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j'
"Error logs(errpt)" </a>' >> $Resu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH007() # Num�ro d execution


{
$debug
#yyyy ModHHH007 oui
typeset j=$1
typeset TitreModule version
TitreModule="hards errors logs summary"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH007"
typeset i
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
errpt -d H > $temp"jfp1"
cat $temp"jfp1" |grep -v IDENTIFIER > $temp"jfp""2" ; mv $temp"jfp""2" $temp"jfp1"

# --- debut d analyse d erreurs ---


if [[ -s $temp"jfp1" ]]
then
>$temp"jfp""2"
# ----- extraction des lignes avec un ID en double
for i in $(cat $temp"jfp1" | awk '{print $1}')
do
cat $temp"jfp1" |grep -w $i > $temp"jfp"
if [ $? = 0 ]
then
print $i >> $temp"jfp""3"
fi
cat $temp"jfp1" |grep -v $i > $temp"jfp""2" ; mv
$temp"jfp""2" $temp"jfp1"
done
>$temp"jfp1"
>$temp"jfp""2"
# ----- extraction des numeros de sequence et cr�ation du fichier resume des
erreurs
for i in $(cat $temp"jfp""3")
do
errpt -j $i -a | grep -i equence | awk '{print $NF}' >
$temp"jfp1"
NombreLigne=$(cat $temp"jfp1" | wc -l)
print
'____________________________________________________________________________' >>
$temp"jfp""2"
print
'============================================================================' >>
$temp"jfp""2"
print 'there are '$NombreLigne' type error on this server : '$
(hostname) >> $temp"jfp""2"
errpt -a -l $(cat $temp"jfp1") >> $temp"jfp""2"
done
else
> $temp"jfp""2"
fi
# --- creation du fichier analyselog.txt
mv $temp"jfp""2" $Modu
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH008() # Num�ro d execution


{
$debug
#yyyy ModHHH008 oui
typeset j=$1
typeset TitreModule version
TitreModule="Firmware Level"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH008"
typeset i
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module

if [ $(echo $NomAudit | cut -c -2) != 91 ]


then
lscfg -vp | grep -p alterable | grep -E ":|alterable|FRU|part" >> $Modu
echo '' >> $Modu
lscfg -vp | grep -p LID >> $Modu
else
((i=0))
lscfg -vp | while read ligne ; do
echo $ligne | grep -i "platform specific" > $temp"jfp2"
if [ -s $temp"jfp2" ] || (( $i == 1 ))
then
((i=1))
echo $ligne >> $temp"jfp1"
fi
done
cat $temp"jfp1" | grep -ip firmware >> $Modu
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH009() # Num�ro d execution


{
$debug
#yyyy ModHHH009 oui
typeset j=$1
typeset TitreModule version
TitreModule="SCSI Raid card"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH009"
typeset i bb Nbbb xx status addr info
typeset location_adptr location_adptr scsi_id_adptr hdisks scsi_id_hdisk
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter -F name| grep scraid > $temp"jfp1"
if [ -s $temp"jfp1" ]
then
let nbfib=0
for scraid in $(lsdev -Cc adapter -F name| grep scraid)
do
((nbfib+=1))
lscfg -vl $scraid | grep -iE "Loadable Microcode|FRU|Part Number" | tr
" " "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk '{print$2}'|tr "#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" " ")
cat $temp"jfp6" | grep 'Loadable#Microcode' |read xx Z99
Z9=$(echo $Z99|tr " " "." | tr "#" " " | awk '{print$1}')
lsdev -l $scraid | read xx status addr info
echo '<b> adapter : </b><em> '$scraid' </em> '$status' '$addr'
'$info' Parts : '$part' , FRU : '$FRU' , Firmware : '$Z9 >> $Modu
done
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> SCRAID
adapter </strong> , quantity : <strong> '$nbfib' </strong>' >> $Resu
echo '' >> $Modu
fi
lsdev -C -F name | grep scraid | while read CarteScsiRaid ; do
echo '<b> adapter : </b><em> '$CarteScsiRaid' </em>' > $temp"jfp1"
location_adptr=`lsdev -Cl $CarteScsiRaid | awk '{ print $3 }'`
scsi_id_adptr=`echo $location_adptr | cut -c1-5`

# --- hdisks Available


hdisks=`lsdev -C -tarray -sscraid -SA -F name`

if [ -n "$hdisks" ]
then
for i in $hdisks
do
location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'`
scsi_id_hdisk=`echo $location_hdisk | cut -c1-5`
if [ $scsi_id_hdisk = $scsi_id_adptr ]
then
scraidmgr -C -l $i >> $temp"jfp1"
fi
done
fi

# --- hdisks Defined


hdisks=`lsdev -C -tarray -sscraid -SD -F name`

if [ -n "$hdisks" ]
then
for i in $hdisks
do
location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'`
scsi_id_hdisk=`echo $location_hdisk | cut -c1-5`
if [ $scsi_id_hdisk = $scsi_id_adptr ]
then
scraidmgr -J -l $i >> $temp"jfp1" 2>$temp"jfp5"
if [ $? -ne 0 ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$CarteScsiRaid', Disk Array '$i' ; IN ERROR
</a>' >> $Resu
echo '<em> '$CarteScsiRaid' </em><b> , Disk Array </b><em>
'$i' : </em><br/>' >> $temp"jfp1"
cat $temp"jfp5" >> $temp"jfp1"
fi
fi
done
fi

#--- FAILED drives (Dead Hot Spare)


scraidmgr -W -l $CarteScsiRaid >> $temp"jfp1"

#--- SPARE Drives


scraidmgr -S -l $CarteScsiRaid >> $temp"jfp1"

#---HOT SPARE and NONEXISTENT Drives


scraidmgr -V -l $CarteScsiRaid >> $temp"jfp1"

# Display limited information regarding adapter write cache


scraidmgr -G -l $CarteScsiRaid >> $temp"jfp1"
# sortie des informations de VPD
>$temp"jfp""3"
scraidmgr -l $CarteScsiRaid -B | grep -v "drive" > $temp"jfp""4"
cat $temp"jfp""4" | grep -v ":N:" | cut -b1-2 | while read bb ; do
scraidmgr -l $CarteScsiRaid -P -y $bb | grep -E "Type|Model|Level|S/N|State"
| cut -c28- > $temp"jfp""2"
((i=1))
cat $temp"jfp""2" | while read aa[$i] ; do
((i+=1))
done
Nbbb=$(echo ${aa[1]} | grep "FAIL")
[ "$Nbbb" != "" ] && echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$CarteScsiRaid', Channel '$bb'FAIL</a>' >>
$Resu

echo 'Channel :'$bb' ;'${aa[2]}'_'${aa[3]}' ; level:'${aa[4]}${aa[5]}' ; S/N:'$


{aa[6]}' ; '${aa[1]} >> $temp"jfp""3"
done

# --- mise en forme


cat $temp"jfp1" >> $Modu
echo '' >> $Modu
echo 'Channels list :' >> $Modu
cat $temp"jfp""3" >> $Modu
# --- comptage des disques pour le r�sum�
cat $temp"jfp""3" | awk '{print $3 }' | while read bb ; do
cat $temp"jfp""3" | awk '{print $3 }' | read bb
if [[ $bb != "" ]]
then
Nbbb=$(cat $temp"jfp""3" | grep $bb | wc -l)
cat $temp"jfp""3" | grep -v $bb > $temp"jfp""2" ; mv $temp"jfp""2"
$temp"jfp""3"
fi
done

done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH010() # Num�ro d execution


{
$debug
#yyyy ModHHH010 oui
typeset j=$1
typeset TitreModule version
TitreModule=" Boot list"
version=" version 2013-1.4.6 date: 14/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH010"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
bootlist -m normal -o > $Modu
echo "" >> $Modu
echo "Last disk boot :" >> $Modu
bootinfo -b >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH011() # Num�ro d execution


{
$debug
#yyyy ModHHH011 oui 9 "HARD Available PLATFORM SPECIFIC ..."
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available PLATFORM SPECIFIC ..."
version=" version 2013-1.4.3 date: 04/10/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH011"
typeset -i num=1
typeset ligne ligne2
typeset Adapterdesc[] FRU[] SerialNumber[] ccin[] sizem[] typeM[] location1[]
location2[] location3[] location4[] location5[] location6[]
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lscfg -vp | tr ' ' '%' | sed 's/\.\./ /g' > $temp"jfp0"
if [ -s $temp"jfp0" ]
then
calculcouleur
> $temp"Nom"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"FRU""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"

sed -e '1,/PLATFORM%SPECIFIC/d' $temp"jfp0" > $temp"jfp00"


sed "s/ation:/atio/g" $temp"jfp00" > $temp"jfp0"
sed '/Location/ s/\./x/g' $temp"jfp0" > $temp"jfp00"
sed '/Location/ s/\-/y/g' $temp"jfp00" > $temp"jfp0"
sed '/YL/ s/\./x/g' $temp"jfp0" > $temp"jfp00"
sed '/YL/ s/\-/y/g' $temp"jfp00" > $temp"PlatformSpe"
cat $temp"PlatformSpe" | grep -i location | awk '{print$2}' > $temp"jfp1"
if [ ! -s $temp"jfp1" ]
then
#cat $temp"PlatformSpe" | grep -i "(YL)" | awk '{print$2}' | sed
's/^[x\t]*//' > $temp"jfp1"
cat $temp"PlatformSpe" | grep -i "(YL)" | awk '{print$2}' > $temp"jfp1"
fi
cat $temp"jfp1" | sort -u > $temp"listeloc"
typeset -i numtotligne
typeset -i numligne=0
cat $temp"listeloc" | while read ligne ; do
((numligne+=1))
cat $temp"PlatformSpe" | grep -wp $ligne > $temp"PlaSpeLigne"
if (( $(cat $temp"PlaSpeLigne" | grep -i ":" | awk '{print$1}' | tr '%' ' ' |
tr ':' ' ' | wc -l) > 1 ))
then
FRU[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i FRU | tr '.' ' ' |
awk '{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = "none" ] ; then FRU[$numligne]=$(cat
$temp"PlaSpeLigne" | grep -p $ligne | grep -i Part%Number | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != "none" ]
then
cat $temp"PlaSpeLigne" | grep -wp "${FRU[$numligne]}" >
$temp"PlaSpeLigne2"
Nom[$numligne]=$(cat $temp"PlaSpeLigne2" | grep -i ":" | awk
'{print$1}' | tr '%' ' ' | tr ':' ' ') ; echo ${Nom[$numligne]} > $temp"jfp0" ;
Nom[$numligne]=$(cat $temp"jfp0") ; if [ "${Nom[$numligne]}" = '' ] ; then
Nom[$numligne]='none' ; fi
SerialNumber[$numligne]=$(cat $temp"PlaSpeLigne2" | grep -i
"Serial" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber[$numligne]} > $temp"jfp0" ; SerialNumber[$numligne]=$(cat
$temp"jfp0") ; if [ "${SerialNumber[$numligne]}" = '' ] ; then
SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"PlaSpeLigne2" | grep -i Customer%Card
%ID%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
typeM[$numligne]=$(cat $temp"PlaSpeLigne2" | grep -i Type | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} > $temp"jfp0" ;
typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = '' ] ; then
typeM[$numligne]='none' ; fi
location1[$numligne]=$(echo $ligne | tr '%' ' ' | sed
's/^[x\t]*//' | tr 'x' '.' | tr 'y' ' ' | awk '{print$1}') ; if [ "$
{location1[$numligne]}" = '' ] ; then location1[$numligne]='none' ; fi
location2[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr
'y' ' ' | awk '{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr
'y' ' ' | awk '{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr
'y' ' ' | awk '{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr
'y' ' ' | awk '{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr
'y' ' ' | awk '{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
histo=$(echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} | tr ' '
'x' | tr '-' 'y' | tr '.' 'z')

cat $tpsort"HARDLoc" | tr ' ' 'x' | tr '-' 'y' | tr '.' 'z' |


grep -w "$histo" > $temp"jfp0000"
if [ $? = 0 ]
then
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
else
echo ${Nom[$numligne]} >> $temp"Nom""1"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""1"
echo ${ccin[$numligne]} >> $temp"ccin""1"
echo ${FRU[$numligne]} >> $temp"FRU""1"
echo ${typeM[$numligne]} >> $temp"typeM""1"
echo ${location1[$numligne]} >> $temp"location1""1"
echo ${location2[$numligne]} >> $temp"location2""1"
echo ${location3[$numligne]} >> $temp"location3""1"
fi
fi
else
Nom[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i ":" | awk '{print$1}'
| tr '%' ' ' | tr ':' ' ') ; echo ${Nom[$numligne]} > $temp"jfp0" ;
Nom[$numligne]=$(cat $temp"jfp0") ; if [ "${Nom[$numligne]}" = '' ] ; then
Nom[$numligne]='none' ; fi
SerialNumber[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i "Serial" |
tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
FRU[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i FRU | tr '.' ' ' |
awk '{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = "none" ] ; then FRU[$numligne]=$(cat
$temp"PlaSpeLigne" | grep -p $ligne | grep -i Part%Number | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi ; fi
typeM[$numligne]=$(cat $temp"PlaSpeLigne" | grep -i Type | tr '.' ' ' |
awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} > $temp"jfp0" ;
typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = '' ] ; then
typeM[$numligne]='none' ; fi
location1[$numligne]=$(echo $ligne | tr '%' ' ' | sed 's/^[x\t]*//' |
tr 'x' '.' | tr 'y' ' ' | awk '{print$1}') ; if [ "${location1[$numligne]}" =
'' ] ; then location1[$numligne]='none' ; fi
location2[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr 'y' '
' | awk '{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr 'y' '
' | awk '{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr 'y' '
' | awk '{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr 'y' '
' | awk '{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(echo $ligne | tr '%' ' ' | tr 'x' '.' | tr 'y' '
' | awk '{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi

histo=$(echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$


{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} | tr ' '
'x' | tr '-' 'y' | tr '.' 'z')

cat $tpsort"HARDLoc" | tr ' ' 'x' | tr '-' 'y' | tr '.' 'z' | grep -w
"$histo" > $temp"jfp0000"
if [ $? = 0 ]
then
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
else
echo ${Nom[$numligne]} >> $temp"Nom""1"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""1"
echo ${ccin[$numligne]} >> $temp"ccin""1"
echo ${FRU[$numligne]} >> $temp"FRU""1"
echo ${typeM[$numligne]} >> $temp"typeM""1"
echo ${location1[$numligne]} >> $temp"location1""1"
echo ${location2[$numligne]} >> $temp"location2""1"
echo ${location3[$numligne]} >> $temp"location3""1"
fi
fi
done
let numtotligne=$numligne

for typeinfo in SerialNumber


do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done
for typeinfo in FRU Nom ccin typeM location1 location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-hardelement"><tr><td>Hardware element :</td><td>'$
{Nom[$numligne]}'</td><td>'${typeM[$numligne]}'</td><td>'$
{SerialNumber[$numligne]}'</td><td>'${FRU[$numligne]}'</td><td>'$
{ccin[$numligne]}'</td><td><span class="db-location">'${location1[$numligne]}$([[ $
{location2[$numligne]} != 'none' ]] && echo '-'${location2[$numligne]})$([[ $
{location3[$numligne]} != 'none' ]] && echo '-'${location3[$numligne]})$([[ $
{location4[$numligne]} != 'none' ]] && echo '-'${location4[$numligne]})$([[ $
{location5[$numligne]} != 'none' ]] && echo '-'${location5[$numligne]})$([[ $
{location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo "<tr><th></th><th>Name</th><th>Type
Model</th><th>Serial</th><th>FRU</th><th>CCIN</th><th>Physical Location</th></tr>"
>> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH012() # Num�ro d execution


{
$debug
#yyyy ModHHH012 oui
typeset j=$1
typeset TitreModule version
TitreModule="Powerpaths status"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH012"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
if [ -x $(which powermt) ]
then
powermt check_registration > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powerpath keys </b>' >> $Modu ; cat $temp"jfp1"
>> $Modu ; echo "" >> $Modu ) || ( echo '<b> powerpath keys </b><a class="alert">
No reponse for command "powermt check_registration" </a>' >> $Modu )
powermt version > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powerpath version </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ) || ( echo '<b> powerpath version </b><a
class="alert"> No reponse for command "powermt version" </a>' >> $Modu )
[ -s $temp"jfp1" ] && ( echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to
1.'$j' '$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong>
Driver Powerpath </strong> , Version : <strong> '$(cat $temp"jfp1" | tr " " "#" |
sed "s/Version/ /g" | awk '{print$2}' | tr "#" " ")' </strong>' >> $Resu )
powermt display > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powermt display </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ) || ( echo '<b> powermt display </b><a
class="alert"> No reponse for command "powermt display" </a>' >> $Modu )
powermt display dev='all' > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powermt display dev=all </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ) || ( echo '<b> powermt display dev=all
</b><a class="alert"> No reponse for command "powermt display dev=all" </a>' >>
$Modu )
cat $temp"jfp1" | grep dead > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> list of dead path </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'" class="alert">Powerpath : paths dead </a>' >> $Resu )
# echo '' >> $Modu
powermt display paths > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powermt display paths </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ) || ( echo '<b> powermt display paths
</b><a class="alert"> No reponse for command "powermt display paths" </a>' >>
$Modu )
powermt display unmanaged > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<b> powermt display unmanaged </b>' >> $Modu ; cat
$temp"jfp1" >> $Modu ; echo "" >> $Modu ) || ( echo '<b> powermt display unmanaged
</b><a class="alert"> No reponse for command "powermt display unmanaged" </a>' >>
$Modu )
cat $Modu | grep -iE "Failed|missing|stale|unknow|degraded|warning" >
$temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/DEAD/<strong class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH013() # Num�ro d execution
{
$debug
#yyyy ModHHH013 oui
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available Fiber Channel list (HBA)"
version=" version 2013-1.4.2 date: 27/08/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH013"
typeset -i num=1
typeset ligne
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[]
SerialNumber[] ccin[] sizem[] location1[] location2[] location3[] location4[]
location5[] location6[] Manufacturer[] Firm[] NetAddr[]
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -S A -Cc adapter -F name,description | grep -i fcs > $temp"listfibre"
if [ -s $temp"listfibre" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc adapter -F name,description | grep -i fcs | tr ' ' '%' | tr ',' ' '
> $temp"listfibre"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listfibre" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
PortSpeedSup[$numligne]=$(fcstat fcs0 | grep -i "speed" | grep "supported" |
sed 's/ */ /g' | tr ' ' '%' | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | sed
's/^[\ \t]//g') ; echo ${PortSpeedSup[$numligne]} > $temp"jfp0" ;
PortSpeedSup[$numligne]=$(cat $temp"jfp0") ; if [ "${PortSpeedSup[$numligne]}" = ''
] ; then PortSpeedSup[$numligne]='none' ; fi
PortSpeedRun[$numligne]=$(fcstat fcs0 | grep -i "speed" | grep "running" |
sed 's/ */ /g' | tr ' ' '%' | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | sed
's/^[\ \t]//g') ; echo ${PortSpeedRun[$numligne]} > $temp"jfp0" ;
PortSpeedRun[$numligne]=$(cat $temp"jfp0") ; if [ "${PortSpeedRun[$numligne]}" = ''
] ; then PortSpeedRun[$numligne]='none' ; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$
(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ;
fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%' '
') ; echo ${ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ;
if [ "${ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacturer |
tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} >
$temp"jfp0" ; NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}"
= '' ] ; then NetAddr[$numligne]='none' ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i Z9 | awk '{print$2}' |
tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ;
Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi
if [ "${Firm[$numligne]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%' ' '
| sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$
(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; echo $
{location1[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location1[$numligne]=$
(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; echo $
{location2[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; echo $
{location3[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; echo $
{location4[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; echo $
{location5[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; echo $
{location6[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = 'none' ]
then
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
fi
echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"
echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${VgAssos[$numligne]} >> $temp"VgAssos""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${ccin[$numligne]} >> $temp"ccin""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${PortSpeedSup[$numligne]} >> $temp"PortSpeedSup""11"
echo ${PortSpeedRun[$numligne]} >> $temp"PortSpeedRun""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${NetAddr[$numligne]} >> $temp"NetAddr""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
PortSpeedRun2[$numligne2]="${PortSpeedRun[$numligne]}"
PortSpeedSup2[$numligne2]="${PortSpeedSup[$numligne]}"
FRU2[$numligne2]="none"
SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial
%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin2[$numligne2]} >
$temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin2[$numligne2]}" =
'' ] ; then ccin2[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%'
' ') ; echo ${ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ;
fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
NetAddr2[$numligne2]=$(cat $temp"adapter" | grep -i Network
%Address | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{NetAddr2[$numligne2]} > $temp"jfp0" ; NetAddr2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${NetAddr2[$numligne2]}" = '' ] ; then NetAddr2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm2[$numligne2]=$
(cat $temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%'
' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} > $temp"jfp0" ;
Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" = '' ] ; then
Firm2[$numligne2]='none' ; fi ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; if [ "$
{location12[$numligne2]}" = '' ] ; then location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; if [ "$
{location22[$numligne2]}" = '' ] ; then location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; if [ "$
{location32[$numligne2]}" = '' ] ; then location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; if [ "$
{location42[$numligne2]}" = '' ] ; then location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; if [ "$
{location52[$numligne2]}" = '' ] ; then location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; if [ "$
{location62[$numligne2]}" = '' ] ; then location62[$numligne2]='none' ; fi
if [ "${location12[$numligne2]}" = 'none' ]
then
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi
fi
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${VgAssos2[$numligne2]} >> $temp"VgAssos2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${ccin2[$numligne2]} >> $temp"ccin2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${PortSpeedSup2[$numligne]} >> $temp"PortSpeedSup2""11"
echo ${PortSpeedRun2[$numligne]} >> $temp"PortSpeedRun2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${NetAddr2[$numligne2]} >> $temp"NetAddr2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done

let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"Adapterdesc""11" | sort -u > $temp"Adapterdesc""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"SerialNumber""11" | sort -u > $temp"SerialNumber""1"
cat $temp"ccin""11" | sort -u > $temp"ccin""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"PortSpeedSup""11" | sort -u > $temp"PortSpeedSup""1"
cat $temp"PortSpeedRun""11" | sort -u > $temp"PortSpeedRun""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"Adapterdesc2""11" | sort -u > $temp"Adapterdesc2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"SerialNumber2""11" | sort -u > $temp"SerialNumber2""1"
cat $temp"ccin2""11" | sort -u > $temp"ccin2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"PortSpeedSup2""11" | sort -u > $temp"PortSpeedSup2""1"
cat $temp"PortSpeedRun2""11" | sort -u > $temp"PortSpeedRun2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr ccin typeM Manufacturer Firm location1
location2 location3 PortSpeedSup PortSpeedRun
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 NomAdapter2 locaddr2 ccin2 typeM2 Manufacturer2 Firm2


location12 location22 location32 PortSpeedSup2 PortSpeedRun2
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done
let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-fchba"><tr><td>Fiber Channel card :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{ccin[$numligne]}'</td><td>'${NetAddr[$numligne]}'</td><td>'$
{SerialNumber[$numligne]}'</td><td>'${Manufacturer[$numligne]}'</td><td>'$
{PortSpeedSup[$numligne]}'</td><td>'${PortSpeedRun[$numligne]}'</td><td><span
class="db-location">'${location1[$numligne]}$([[ ${location2[$numligne]} !=
'none' ]] && echo '-'${location2[$numligne]})$([[ ${location3[$numligne]} != 'none'
]] && echo '-'${location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] &&
echo '-'${location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo
'-'${location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td><td>'$
{Adapterdesc[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> Fiber Channel card with FRU
</th>' >> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th><a
style=color:#824128>NetworkAddress</a></th><th>SerialNum</th><th>manufacturer</th><
th>Speed Support</th><th>Speed Running</th><th>Physical
Location</th><th>Description</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>Fiber Channel card :</td><td>'$
{NomAdapter2[$numligne]}'</td><td>'${locaddr2[$numligne]}'</td><td>'$
{FRU2[$numligne]}'</td><td>'${Firm2[$numligne]}'</td><td>'$
{ccin2[$numligne]}'</td><td>'${NetAddr2[$numligne]}'</td><td>'$
{SerialNumber2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{PortSpeedSup2[$numligne]}'</td><td>'${PortSpeedRun2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})$([[ ${location52[$numligne]} != 'none' ]] && echo '-'$
{location52[$numligne]})$([[ ${location62[$numligne]} != 'none' ]] && echo '-'$
{location62[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td></tr>' >>
$temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=3> Fiber Channel card without FRU
</th>' >> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th><a
style=color:#824128>NetworkAddress</a></th><th>SerialNum</th><th>manufacturer</th><
th>Speed Support</th><th>Speed Running</th><th>Physical
Location</th><th>Description</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH014() # Num�ro d execution


{
$debug
#yyyy ModHHH014 oui
typeset j=$1
typeset TitreModule version
TitreModule="PCI X SCSI Raid card"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH014"
typeset -i nbfib
typeset bb Nbbb sisioa part FRU Z9 Z99 xx xxx info feat addr status
typeset location_adptr location_adptr scsi_id_adptr hdisks scsi_id_hdisk
CarteScsiRaidX
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter -F name| grep sisioa > $temp"jfp1"
if [ -s $temp"jfp1" ]
then
let nbfib=0
for sisioa in $(lsdev -Cc adapter -F name| grep sisioa)
do
((nbfib+=1))
lscfg -vl $sisioa | grep -iE "(Z0)|(alterable)|FRU|Part Number" | tr "
" "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk '{print$2}'|tr "#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" " ")
cat $temp"jfp6" | grep '(alterable)' |read xx xxx Z99
Z9=$(echo $Z99|tr " " "." | tr "#" " " | awk '{print$1}')
Z9=$(echo $Z99|tr " " "." | tr "#" " ")
cat $temp"jfp6" | grep '(Z0)' |read xx xxx Z99
feat=$(echo $Z99|tr " " "." | tr "#" " " | awk '{print$1}')
lsdev -l $sisioa | read xx status addr info
echo '<b> adapter : </b><em> '$sisioa' </em> '$status' '$addr'
'$info' Parts : '$part' , FRU : '$FRU' , Firmware : '$Z9' Feature :
'$feat >> $Modu
done
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> PCI X SCSI
Raid card adapter </strong> , quantity : <strong> '$nbfib' </strong>' >> $Resu
echo '' >> $Modu
fi
lsdev -C -F name | grep sisioa | while read CarteScsiRaidX ; do
echo '<b> adapter : </b><em> '$CarteScsiRaidX' </em>' >> $Modu
sisraidmgr -L -j1 -l $CarteScsiRaidX >> $Modu
echo '<b> Info Battery : </b><em> '$CarteScsiRaidX' </em>' >> $Modu
sisraidmgr -M -o0 -l $CarteScsiRaidX >> $Modu
done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|Error
condition" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
cat "s/Error condition/<strong class=\"alert\">Error
condition<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


Error condition" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH015() # Num�ro d execution


{
$debug
#yyyy ModHHH015 oui
typeset j=$1
typeset TitreModule version
TitreModule="Enclosure or subsystem"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH015"
typeset bb Nbbb
typeset location_adptr location_adptr scsi_id_adptr hdisks scsi_id_hdisk
CarteScsiRaidX result
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$temp"jfp5"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter -F name | grep scraid > $temp"jfp0"
if [ -s $temp"jfp0" ]
then
cat $temp"jfp0" | while read CarteScsiRaid ; do
((i=0))
while (( $i < 4 ))
do
((i+=1))
scraidmgr -l $CarteScsiRaid -P -y "$i"F | grep Type | cut -c28-
>> $temp"jfp5"
done
>$temp"jfp6"
cat $temp"jfp5" | while read result ; do
[[ $result != "" ]] && echo "Product Type: "$result >>
$temp"jfp6"
done
done
fi
lscfg -vp | grep -iE "enclosure|ses|dac|safte" | awk '{print $1}' > $temp"jfp0"
cat $temp"jfp0" | while read enclo ; do
lscfg -vl $enclo | grep -iE "$enclo|Part Number|FRU|Machine Type|ROS Level|
Manufacturer" >> $temp"jfp2"
done
cat $temp"jfp2" | grep 9L1850 > $temp"jfp3"
cat $temp"jfp2" | grep 2104 >> $temp"jfp4"
if [ -s $temp"jfp3" ]
then
echo '<b> Configured subsystem ssa </b><em> 7133, P/N 09L1850 </em>' >>
$temp"jfp1"
echo 'baie ssa <strong>7133</strong>' >> $Resu
fi
if [ -s $temp"jfp4" ]
then
NomLabel="xxxx"
echo '<b> Configured susbsytem SCSI </b><em> 2104 </em>' >> $temp"jfp1"
echo $NomLabel'<strong> baie scsi 2104</strong>' >> $Resu
fi
if [ -s $temp"jfp6" ]
then
cat $temp"jfp6" | grep 2104 > $temp"jfp7"
if [ -s $temp"jfp7" ]
then
NomLabel="xxxx"
echo '<b> Configured subsystem scsi </b><em> 2104 with scraid card,
</em><b> recall in scsi raid card information</b>' >> $temp"jfp1"
fi
fi
echo '<b> Enclosures or subsytem details </b>' >> $temp"jfp1"
cat $temp"jfp1" >> $Modu
cat $temp"jfp2" >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH016() # Num�ro d execution
{
$debug
#yyyy ModHHH016 oui
typeset j=$1
typeset TitreModule version
TitreModule="Command : lsmap -all"
version=" version 2012-1.2.7 date: 18/12/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH016"
filtre='vios'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset -u Numparts
typeset parts numpart
/usr/ios/cli/ioscli lsmap -all > $Modu
cat $Modu | grep 0x0 | awk '{print$3}' | sort -u | while read parts ;do
Numparts=$(echo $parts | sed 's/0x0/000/')
numpart=$(echo 'ibase=16 ; '$Numparts | bc)
sed 's/'$parts'/'$parts' (Decimal : '$numpart' )/' $Modu > $temp"jfp6"
mv $temp"jfp6" $Modu
done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH017() # Num�ro d execution
{
$debug
#yyyy ModHHH017 oui
typeset j=$1
typeset TitreModule version
TitreModule="Command : lsmap -all -net"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH017"
filtre='vios'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
/usr/ios/cli/ioscli lsmap -all -net >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH018() # Num�ro d execution


{
$debug
#yyyy ModHHH018 oui
typeset j=$1
typeset TitreModule version
TitreModule="hards errors logs (-a), all"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH018"
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
errpt -a > $Modu
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

echo $j > $Somm


echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH019() # Num�ro d execution
{
$debug
#yyyy ModHHH019 oui
typeset j=$1
typeset TitreModule version
TitreModule="Drivers Lists: lsdev -Cc driver"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH019"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc driver > $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH020() # Num�ro d execution
{
$debug
#yyyy ModHHH020 oui
typeset j=$1
typeset TitreModule version
TitreModule="FAST: fget_config -Av"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH020"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
fget_config -Av >$temp"jfp1" 2>$temp"jfp1"
[ -s $temp"jfp1" ] && ( cat $temp"jfp1" > $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'" title="Go to 1.'$j' '$TitreModule'"><strong
class="alert0"> STORAGE : </strong></a><strong> FAST ARRAY </strong>' >> $Resu )
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH021() # Num�ro d execution
{
$debug
#yyyy ModHHH021 oui
typeset j=$1
typeset TitreModule version
TitreModule='lspath (lspath -HF "status name path_id parent connection")'
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH021"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lspath -HF "status name path_id parent connection"|sort -u > $temp"jfp1"
[ $? = 0 ] && cat $temp"jfp1" > $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j'
"lspath (lspath -HF "status name path_id parent connection")" </a>' >> $Resu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH022() # Num�ro d execution
{
$debug
#yyyy ModHHH022 oui

typeset j=$1
typeset TitreModule version
TitreModule="SDD DataPath (vpath)"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH022"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
$(which datapath) query version >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
lslpp -l | grep "devices\.sdd\." >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
echo '<b> datapath query version : </b>' >> $Modu
$(which datapath) query version >> $Modu
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> SDD
DataPath (vpath) </strong> , Version : <strong> '$(cat $temp"jfp1" | awk
'{print$3}') ' </strong>' >> $Resu
echo '<b> datapath query adapter : </b>' >> $Modu
$(which datapath) query adapter >> $Modu
echo '<b> datapath query device : </b>' >> $Modu
$(which datapath) query device >> $Modu
fi
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j'
"lspath (lspath -HF "status name path_id parent connection")" </a>' >> $Resu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH023() # Num�ro d execution
{
$debug
#yyyy ModHHH023 oui "MPIO SDDPCM"
typeset j=$1
typeset TitreModule version
TitreModule="MPIO SDDPCM"
version=" version 2013-1.3.5 date: 26/02/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH023"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
pcmpath query adapter >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
lslpp -L | grep "devices\.sddpcm\." >$temp"jfp1" 2>$temp"jfp1"
if [ $? = 0 ]
then
echo '<b> pcmpath query version : </b>' >> $Modu
pcmpath query version >> $Modu
pcmpath query version >$temp"jfp1" 2>$temp"jfp1"
echo '' >> $Modu
echo '<b> fileset MPIO et SDDPCM : </b>' >> $Modu
lslpp -l devices.fcp.disk.rte devices.fcp.disk.ibm.mpio*
devices.sas.disk.ibm.mpio* devices.sddpcm* >> $Modu 2>> $Modu
echo '' >> $Modu
echo '<b> sddpcm_get_config -Av </b>' >> $Modu
sddpcm_get_config -Av >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query adapter : </b>' >> $Modu
pcmpath query adapter >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query adaptstats : </b>' >> $Modu
pcmpath query adaptstats >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query device : </b>' >> $Modu
pcmpath query device >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query essmap : </b>' >> $Modu
pcmpath query essmap >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query portmap : </b>' >> $Modu
pcmpath query portmap >> $Modu
echo '' >> $Modu
echo '<b> pcmpath query wwpn : </b>' >> $Modu
pcmpath query wwpn >> $Modu
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> SDDPCM
(pcmpath) </strong> , Version : <strong> '$(cat $temp"jfp1" | sort -u | awk
'{print$3}') ' </strong>' >> $Resu
fi
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j'
"lspath (lspath -HF "status name path_id parent connection")" </a>' >> $Resu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH024() # Num�ro d execution
{
$debug
#yyyy ModHHH024 oui
typeset j=$1
typeset TitreModule version
TitreModule="Slots : (lsslot -c pci/slot/phb/port)"
version=" version 2012-1.2.1 date: 23/11/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH024"
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsslot -c pci > $temp"jfp1"
if [ -s $temp"jfp1" ]
then
echo '<b> lsslot physical commande : </b><strong><a href="#pci physical
connector"> pci physical connector (lsslot -c pci) </a></strong>' >> $Modu
echo '<b> lsslot physical commande : </b><strong><a href="#phb physical
connector"> phb physical connector (lsslot -c phb) </a></strong>' >> $Modu
echo '<b> lsslot logical commande : </b><strong><a href="#port logical
connector"> port logical connector (lsslot -c port) </a></strong>' >> $Modu
echo '<b> lsslot logical commande : </b><strong><a href="#slot logical
connector"> slot logical connector (lsslot -c slot) </a></strong>' >> $Modu

echo '<a name="pci physical connector"></a>' >> $Modu


echo '<b> lsslot physical commande : </b><em> pci physical connector
(lsslot -c pci) </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour Slots : (lsslot -c pci/slot/phb/port)</a>' >>
$Modu
echo '' >> $Modu
lsslot -c pci >> $Modu ; echo '\c' >> $Modu

echo '<a name="phb physical connector"></a>' >> $Modu


echo '<b> lsslot physical commande : </b><em> phb physical connector
(lsslot -c phb) </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour Slots : (lsslot -c pci/slot/phb/port)</a>' >>
$Modu
echo '' >> $Modu
lsslot -c phb >> $Modu ; echo '\c' >> $Modu

echo '<a name="port logical connector"></a>' >> $Modu


echo '<b> lsslot logical commande : </b><em> port logical connector
(lsslot -c port) </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour Slots : (lsslot -c pci/slot/phb/port)</a>' >>
$Modu
echo '' >> $Modu
lsslot -c port >> $Modu ; echo '\c' >> $Modu

echo '<a name="slot logical connector"></a>' >> $Modu


echo '<b> lsslot logical commande : </b><em> slot logical connector
(lsslot -c slot) </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour Slots : (lsslot -c pci/slot/phb/port)</a>' >>
$Modu
echo '' >> $Modu
lsslot -c slot >> $Modu ; echo '\c' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH025() # Num�ro d execution
{
$debug
#yyyy ModHHH025 oui

typeset j=$1
typeset TitreModule version
TitreModule="LPAR caracteristics"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH025"
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_lparstat_i''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'lparstat -i \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_lparstat_i" style="display: none;">' >> $Modu
lparstat -i >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_lparstat_i''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_amepat''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'amepat \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_amepat" style="display: none;">' >> $Modu
amepat >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_amepat''\''));" style="cursor: pointer;"
class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH026() # Num�ro d execution
{
$debug
#yyyy ModHHH026 oui
typeset j=$1
typeset TitreModule version
TitreModule="MPIO Path (mpio_get_config)"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH026"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
mpio_get_config -Av >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH027() # Num�ro d execution
{
$debug
#yyyy ModHHH027 oui
typeset j=$1
typeset TitreModule version
TitreModule="Detail of DEVICES list"
version=" version 11-H.2.24"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH027"
typeset -i i=0
typeset -i tp=0
typeset device DevAnaly par AdapMicr1 AdapRos AdapFeature
typeset addr etat description AdapZO AdapFRU AdapZ9 design AdapRos1 AdapPart
index
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
let tp=4
let index=0
for DevAnaly in cdrom tape diskette gxme keyboard rwoptical tablet container disk
do
((tp+=1))
>$temp"jfp"$tp
lsdev -Cc $DevAnaly -F name | while read device ; do
let i=0
par=$device
while [[ $par != "sysplanar0" ]]
do
((i+=1))
pare[$i]=$(lsdev -Cl $par -F parent)
if [[ ${pare[$i]} = "" ]]
then
par="sysplanar0"
else
par=${pare[$i]}
fi
done
while [[ $i -ge 2 ]]
do
((i-=1))
print ' -Parent---'$i'--> \c' >> $temp"jfp"$tp
lsdev -Cl ${pare[$i]} >> $temp"jfp"$tp
done
addr=$(lsdev -Cl $device | awk '{ print $3 }')
etat=$(lsdev -Cl $device | awk '{ print $2 }')
lscfg -vl $device | read nom description
lscfg -vl $device | grep -iE "(Z0)|(Z9)|FRU|ROS Level|Microcode|Part
Number|Feature Code" | tr " " "#" > $temp"jfp2"
AdapZO=$(cat $temp"jfp2" | grep -i "(Z0)" | tr ")" " " | awk '{print
$2}' | tr "#." " ")
AdapFRU=$(cat $temp"jfp2" | grep -i "FRU" | tr "." " " | awk '{print
$2}' | tr "#." " ")
AdapZ9=$(cat $temp"jfp2" | grep -i "(Z9)" | tr ")" " " | awk '{print
$2}' | tr "#." " ")
cat $temp"jfp2" | grep -i "Microcode" | tr "." " " | read design
AdapMicr1
AdapMicr=$(echo $AdapMicr1 | tr "# " " .")
cat $temp"jfp2" | grep -iE "ROS#Level" | tr "." " " | read design
AdapRos1
AdapRos=$(echo $AdapRos1 | tr "# " " .")
AdapPart=$(cat $temp"jfp2" | grep -i "Part#Number" | tr "." " " | awk
'{print $2}' | tr "#." " ")
AdapFeature=$(cat $temp"jfp2" | grep -i "Feature Code" | tr "." " " |
awk '{print $2}' | tr "#." " ")
echo $device" "$etat" "$addr" "$description" ---("$AdapPart")
("$AdapFRU") ("$AdapRos" "$AdapMicr") ("$AdapZO") ("$AdapZ9")("$AdapFeature"
"$AdapRos")" >> $temp"jfp"$tp
echo >> $temp"jfp"$tp
if [[ -s $temp"jfp"$tp ]]
then
((index+=1))
fi
done
done
[ $index != 0 ] && ( echo '<b> Definition Comments : </b>' >> $Modu )
[ $index != 0 ] && ( echo '<b> '$DevAnaly'
</b>.|.status.|.addresse.|.Location/description.|.P/N.....FRU...|...Type/model...|.
..Firmware...|...Info_Suppl' >> $Modu )
[[ -s $temp"jfp5" ]] && ( echo '<b> CDROM list </b>' >> $Modu ; cat $temp"jfp5"
>> $Modu )
[[ -s $temp"jfp6" ]] && ( echo '<b> TAPE list </b>' >> $Modu ; cat $temp"jfp6" >>
$Modu )
[[ -s $temp"jfp7" ]] && ( echo '<b> Diskette list </b>' >> $Modu ; cat
$temp"jfp7" >> $Modu )
[[ -s $temp"jfp8" ]] && ( echo '<b> Graphic Card list </b>' >> $Modu ; cat
$temp"jfp8" >> $Modu )
[[ -s $temp"jfp9" ]] && ( echo '<b> Keyboard list </b>' >> $Modu ; cat
$temp"jfp9" >> $Modu )
[[ -s $temp"jfp10" ]] && ( echo '<b> rwoptical list </b>' >> $Modu ; cat
$temp"jfp10" >> $Modu )
[[ -s $temp"jfp11" ]] && ( echo '<b> tablet list </b>' >> $Modu ; cat
$temp"jfp11" >> $Modu )
[[ -s $temp"jfp12" ]] && ( echo '<b> container list </b>' >> $Modu ; cat
$temp"jfp12" >> $Modu )
[[ -s $temp"jfp13" ]] && ( echo '<b> disk list </b>' >> $Modu ; cat $temp"jfp13"
>> $Modu )

sed "s/Defined/<strong class=\"alert\">Defined<\/strong>/g; s/defined/<strong


class=\"alert\">defined<\/strong>/g; s/DEFINED/<strong
class=\"alert\">DEFINED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
cat $temp"jfp78" > $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH028() # Num�ro d execution
{
$debug
#yyyy ModHHH028 oui
typeset j=$1
typeset TitreModule version
TitreModule="HBA configuration (fiber)"
version=" version 2012-1.2.0 date: 12/11/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH028"
typeset -i nbfib
typeset HBA fcs part FRU Z9 xx xxx Z99 CCIN
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset WWPN FCSTAT SPEED TYPE SERIAL ROM FIRMWARE MODEL LOCATION FCS_STATE
MAX_XFER_SIZE NUM_CMD_ELEMS FSCSI FSCSI_STATE FC_ERR_RECOV DYNTRK coulstat1
coulstat2
typeset ADDR FEATURE dev1 state1 addr1 d coulstat4

lsdev -C -Sa | grep fcs >$temp"1" 2>$temp"1"


if [ $? = "0" ]
then
let nbfib=0
for fcs in $(lsdev -C -Sa -F name| grep fcs)
do
((nbfib+=1))
lscfg -vl $fcs | grep -iE "(Z9)|FRU|Part Number|Customer Card ID
Number|Network Address" | tr " " "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk '{print$2}'|tr "#" " ")
Netwwn=$(cat $temp"jfp6" | grep Network | awk '{print$2}'|tr "#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" " ")
cat $temp"jfp6" | grep '(Z9)' |read xx xxx Z99
Z9=$(echo $Z99|tr " " "." | tr "#" " ")
CCIN=$(cat $temp"jfp6" | grep Customer#Card#ID#Number | awk
'{print$2}'|tr "#" " ")

done
echo '<strong class="alert2"> Fiber adapter ( fcs ): </strong><strong>
'$nbfib' </strong>' >> $Resu
echo '<CAPTION style=background:#add8e6><b> HBA card : (</b>'$NomVolume >
$temp"jfp1ResulCom"
echo "xxxx- Etat carte HBA :" >> $temp"jfp1ResulCom"
print
"b,HBA,b,STATE,b,ADDR,b,FEATURE,b,PART_NB,b,FRU_NB,b,TYPE,b,MODEL,b,SPEED,b,ROM,b,F
/W,b,S/N,b,LOCATION,b,WWPN,b,MAX_XFER_SIZE,b,NUM_CMD_ELEMS,bc,FSCSI,bc,STATE,bc,FC_
ERR_RECOV,bc,DYNTRK" >> $temp"jfp1ResulCom"
for HBA in `lsdev -Cc adapter | grep ^fcs | awk '{print $1}'`; do
> $temp"jfp2"
WWPN=`lscfg -vl $HBA | grep Network | sed 's/\./ /g' | awk '{print $NF}'`
FCSTAT=`fcstat $HBA 2>/dev/null | sed 's/$/,/' | sed -e :a -e '$!N;
s/\n/ /; ta' | sed 's/ //g' | sed 's/ //g'`
SPEED=`echo $FCSTAT | tr "," "\n" | grep running | awk -F: '{print $NF}'`
if [[ $SPEED = "" ]]; then
SPEED="N/A"
fi
TYPE=`echo $FCSTAT | tr "," "\n" | grep "PortType" | awk -F: '{print $NF}'`
if [[ $TYPE = "" ]]; then
TYPE="Link Down"
fi
SERIAL=`echo $FCSTAT | tr "," "\n" | grep Serial | awk -F: '{print
$NF}'`
ROM=`echo $FCSTAT | tr "," "\n" | grep ROM | awk -F: '{print $NF}'`
FIRMWARE=`echo $FCSTAT | tr "," "\n" | grep Firmware | awk -F: '{print
$NF}'`
MODEL=`lscfg -pl $HBA | grep Model | awk '{print $NF}'`
LOCATION=`lscfg -pl $HBA | grep Location | awk '{print $NF}'`
FCS_STATE=`lsdev -l $HBA | awk '{print $2}'`
MAX_XFER_SIZE=`lsattr -El $HBA -a max_xfer_size | awk '{print $2}'`
NUM_CMD_ELEMS=`lsattr -El $HBA -a num_cmd_elems | awk '{print $2}'`
FSCSI=`echo $HBA | sed 's/fcs/fscsi/'`
FSCSI_STATE=`lsdev -l $FSCSI 2>/dev/null | awk '{print $2}'`
FC_ERR_RECOV=`lsattr -El $FSCSI -a fc_err_recov 2>/dev/null | awk
'{print $2}'`
DYNTRK=`lsattr -El $FSCSI -a dyntrk 2>/dev/null | awk '{print $2}'`
ADDR=`lsdev -Cc adapter | grep $HBA | awk '{print$3}'`
FEATURE=`lscfg -vl $HBA | grep Feature | tr " " "%" |tr "." " " | awk
'{print$2}'`
[[ $FEATURE = "" ]] && FEATURE=none
PART_NB=`lscfg -vl fcs0 | grep "Part Number" | tr " " "%" |tr "." " " |
awk '{print$2}'`
[[ $PART_NB = "" ]] && PART_NB=none
FRU_NB=`lscfg -vl fcs0 | grep "FRU" | tr " " "%" |tr "." " " | awk
'{print$2}'`
[[ $FRU_NB = "" ]] && FRU_NB=none
coulstat1=ro
coulstat2=ro
coulstat3=ro
coulstat4=ro
[[ $FCS_STATE = "Available" ]] && coulstat1=vc
[[ $FSCSI_STATE = "Available" ]] && coulstat2=vc
[[ $TYPE != "Link Down" ]] && coulstat4=b
lsdev -C| grep $ADDR | grep -vE "$HBA|fscsi" | while read dev1 state1
addr1 d ; do
coulstat3=ro
[[ $state1 = "Available" ]] && coulstat3=vc
print 'b,'$dev1','$coulstat3','$state1',b,'$addr1 >> $temp"jfp2"
done
print
'bf,'$HBA','$coulstat1','$FCS_STATE',b,'$ADDR',b,'$FEATURE',b,'$PART_NB',b,'$FRU_NB
','$coulstat4','$TYPE',b,'$MODEL',b,'$SPEED',b,'$ROM',b,'$FIRMWARE',b,'$SERIAL',b,'
$LOCATION',b,'$WWPN',b,'$MAX_XFER_SIZE',b,'$NUM_CMD_ELEMS',bc,'$FSCSI','$coulstat2'
,'$FSCSI_STATE',bc,'$FC_ERR_RECOV',bc,'$DYNTRK >> $temp"jfp1ResulCom"
cat $temp"jfp2" >> $temp"jfp1ResulCom"
done
echo " " > $temp"jfp1TitreVolume"
tritablec "Etat carte HBA :" $temp"jfp1ResulCom" $temp"jfp1sorti"
$temp"jfp1TitreVolume"
cat $temp"jfp1sorti" >> $Modu

echo '<hr>' >> $Modu


fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j' "HBA
configuration (fiber)" </a>' >> $Resu
fi

fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH029() # Num�ro d execution
{
$debug
#yyyy ModHHH029 oui
typeset j=$1
typeset TitreModule version
TitreModule="ATF Objet"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH029"
typeset obj
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -C -Sa | grep atf
if [ $? = "0" ]
then
for obj in $(lsdev -C -Sa -F name | grep atf)
do
echo '<b> '$obj:' </b>' >> $Modu
/usr/sbin/atf/atfi -d $obj -p >> $Modu
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> ATF : </strong></a><strong> present
</strong>' >> $Resu
echo '' >> $Modu
done
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH030() # Num�ro d execution
{
$debug
#yyyy ModHHH030 oui
typeset j=$1
typeset TitreModule version
TitreModule="MINIDUMP (mdmprpt)"
version=" version 11-H.2.15"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH030"
typeset NumSeq
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
mdmprpt >$temp"1" 2>$temp"1"
if [ $? = "0" ]
then
for NumSeq in $(errpt -a -N minidump | grep "Sequence Number" | awk
'{print$3}')
do
echo '<b> Sequence Number : </b><em> '$NumSeq' </em>' >> $Modu
mdmprpt -l $NumSeq >> $Modu
echo '' >> $Modu
done
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/Faulting/<strong class=\"alert\">Faulting<\/strong>/g;
s/Faulting/<strong class=\"alert\">Faulting<\/strong>/g; s/Faulting/<strong
class=\"alert\">Faulting<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH031() # Num�ro d execution
{
$debug
#yyyy ModHHH031 oui 8 "alog file (alog -ot console, etc...)"
typeset j=$1
typeset TitreModule version
TitreModule="alog file (alog -ot console, etc...)"
version=" version 2013-1.4.6 date: 14/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH031"
typeset logfile
filtre='infolog'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset -i num=3
echo '<b> Command : </b><em> alog -L </em> <img
src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">In this result of command,
click on the line. You will see all details of alog corresponding' >> $Modu
alog -L | while read logfile ; do
echo '<a onclick="javascript:
showinf(document.getElementById('\'''tab''$logfile''''\''));" style="cursor:
pointer;"><strong class="alert1"><img
src="http://galetiere.fr/aufildeaix/Info/signauxfleche'$num'.gif">
'$logfile'</strong></a> <a cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="tab'$logfile'" style="display: none;">' >> $Modu
if (( $num == 3 )) ; then let num=4 ; else let num=3 ; fi
alog -ot $logfile | tr "<>" "[]" >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''tab''$logfile''''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</a>' >> $Modu
done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in chapter 1.'$j'
"Console messages" </a>' >> $Resu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH032() # Num�ro d execution
{
$debug
#yyyy ModHHH032 oui
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available Ethernet Adapter(network card)"
version=" version 2013-1.4.2 date: 17/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH032"
typeset ligne
filtre='network'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[] SerialNumber[]
ccin[] sizem[] location1[] location2[] location3[] location4[] location5[]
location6[] Manufacturer[] Firm[] NetAddr[]

lsdev -S A -Cc adapter -F name,description | tr ' ' '%' | tr ',' ' ' | awk
'{print$1}' | grep -i ent > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc adapter -F name,description | grep -i ent | grep -iv scsi | tr ' '
'%' | tr ',' ' ' > $temp"listeadapt"
lsdev -S A -Cc adapter -F name,description | grep -i hba | grep -iv scsi | tr ' '
'%' | tr ',' ' ' >> $temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
addip[$numligne]=$(netstat -in|grep $(echo ${NomAdapter[$numligne]} | sed
's/t//') | egrep -v "link" | awk '{print $4}' | tr '\n' ';') ; echo $
{addip[$numligne]} > $temp"jfp0" ; addip[$numligne]=$(cat $temp"jfp0") ; if [ "$
{addip[$numligne]}" = '' ] ; then addip[$numligne]='none' ; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%' '
') ; echo ${ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ;
if [ "${ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} >
$temp"jfp0" ; NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}"
= '' ] ; then NetAddr[$numligne]='none' ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%' ' '
| sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$
(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; echo $
{location1[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location1[$numligne]=$
(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; echo $
{location2[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; echo $
{location3[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; echo $
{location4[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; echo $
{location5[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; echo $
{location6[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = "none" ]
then
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
fi

echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"


echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${addip[$numligne]} >> $temp"addip""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${ccin[$numligne]} >> $temp"ccin""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${NetAddr[$numligne]} >> $temp"NetAddr""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
addip2[$numligne2]="${addip[$numligne]}"
FRU2[$numligne2]="none"
SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial
%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin2[$numligne2]} >
$temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin2[$numligne2]}" =
'' ] ; then ccin2[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%'
' ') ; echo ${ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ;
fi ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
NetAddr2[$numligne2]=$(cat $temp"adapter" | grep -i Network
%Address | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{NetAddr2[$numligne2]} > $temp"jfp0" ; NetAddr2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${NetAddr2[$numligne2]}" = '' ] ; then NetAddr2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm2[$numligne2]=$
(cat $temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%'
' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} > $temp"jfp0" ;
Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" = '' ] ; then
Firm2[$numligne2]='none' ; fi ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; if [ "$
{location12[$numligne2]}" = '' ] ; then location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; if [ "$
{location22[$numligne2]}" = '' ] ; then location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; if [ "$
{location32[$numligne2]}" = '' ] ; then location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; if [ "$
{location42[$numligne2]}" = '' ] ; then location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; if [ "$
{location52[$numligne2]}" = '' ] ; then location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; if [ "$
{location62[$numligne2]}" = '' ] ; then location62[$numligne2]='none' ; fi
if [ "${location12[$numligne2]}" = 'none' ]
then
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi
fi
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${addip2[$numligne]} >> $temp"addip2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${ccin2[$numligne2]} >> $temp"ccin2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${NetAddr2[$numligne2]} >> $temp"NetAddr2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done
let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"addip""11" | sort -u > $temp"addip""1"
cat $temp"Adapterdesc""11" | sort -u > $temp"Adapterdesc""1"
cat $temp"NetAddr""11" | sort -u > $temp"NetAddr""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"SerialNumber""11" | sort -u > $temp"SerialNumber""1"
cat $temp"ccin""11" | sort -u > $temp"ccin""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"addip2""11" | sort -u > $temp"addip2""1"
cat $temp"Adapterdesc2""11" | sort -u > $temp"Adapterdesc2""1"
cat $temp"NetAddr2""11" | sort -u > $temp"NetAddr2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"SerialNumber2""11" | sort -u > $temp"SerialNumber2""1"
cat $temp"ccin2""11" | sort -u > $temp"ccin2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber NetAddr addip
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr ccin typeM Manufacturer Firm location1
location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 NomAdapter2 locaddr2 ccin2 typeM2 Manufacturer2 Firm2


location12 location22 location32
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-networkcard"><tr><td>network card :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{ccin[$numligne]}'</td><td>'${NetAddr[$numligne]}'</td><td>'$
{Manufacturer[$numligne]}'</td><td><span class="db-location">'$
{location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo '-'$
{location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo '-'$
{location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td><td>'${Adapterdesc[$numligne]}'</td><td>'$
{addip[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> network card with FRU </th>'
>> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th><a
style=color:#824128>NetworkAddress</a></th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>address IP</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>network card :</td><td>'${NomAdapter2[$numligne]}'</td><td>'$
{locaddr2[$numligne]}'</td><td>'${FRU2[$numligne]}'</td><td>'$
{Firm2[$numligne]}'</td><td>'${ccin2[$numligne]}'</td><td>'$
{NetAddr2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})$([[ ${location52[$numligne]} != 'none' ]] && echo '-'$
{location52[$numligne]})$([[ ${location62[$numligne]} != 'none' ]] && echo '-'$
{location62[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td><td>'$
{addip2[$numligne]}'</td></tr>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> network card without FRU
</th>' >> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>CCIN</t
h><th><a
style=color:#824128>NetworkAddress</a></th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>address IP</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH033() # Num�ro d execution
{
$debug
#yyyy ModHHH033 oui
typeset j=$1
typeset TitreModule version
TitreModule="Command NPIV: lsmap -all -npiv"
version=" version 11-H.2.24"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH033"
filtre='vios'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
#/usr/ios/cli/ioscli lsmap -all -npiv : NPIV>> $Modu
/usr/ios/cli/ioscli lsmap -all -npiv >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH034() # Num�ro d execution
{
$debug
#yyyy ModHHH034 oui
typeset j=$1
typeset TitreModule version
TitreModule="Command : lsnports : NPIV"
version=" version 11-H.2.24"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH034"
typeset name fab
filtre='vios'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
/usr/ios/cli/ioscli lsnports 2>$temp"jfp1" 1>$temp"jfp1"
if [ $? = 0 ]
then
[[ $(/usr/ios/cli/ioscli lsnports) != "" ]] && echo '<b> remark : </b> if
parameter fabric=1 on fiber adapter, you can use NPIV with this fiber and the
optical switch.' >> $Modu
echo '' >> $Modu
/usr/ios/cli/ioscli lsnports >> $Modu
>$temp"jfp1"
/usr/ios/cli/ioscli lsnports -field name fabric | while read name fab ; do
if [ $fab = "1" ]
then
echo $name' \c' >> $temp"jfp1"
fi
done
echo ' ' >> $temp"jfp1"
[[ $(/usr/ios/cli/ioscli lsmap -all -npiv) != "" ]] && (echo '<strong
class="alert2"> NPIV : </strong><strong> Configured </strong> '$( [ -s
$temp"jfp1" ] && echo 'fibers that you can use NPIV :'$(cat $temp"jfp1")) >> $Resu
)

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH035() # Num�ro d execution
{
$debug
#yyyy ModHHH035 oui
typeset j=$1
typeset TitreModule version
TitreModule="Mapping disks (MIRRORING)"
version=" version 2013-1.4.8 date: 11/02/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH035"
typeset -i i
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset d1 d2 d3 d4 SomPPs MirrorType Quorum miss miss1 miss2 ldisk
typeset etat Nbc Nbi varia a1 a2 a3 a4 a5 a6 a7 ac1 ac2 ac3 ac4 ac5 ac6 ac7
> $Modu
echo '<b><font face="Arial,Verdana,Helvetica">Warning :</font></b><font
face="Arial,Verdana,Helvetica"> The colors do not match with the copy disks
number.</font><br/>' >> $Modu
echo '<b><font face="Arial,Verdana,Helvetica">Warning :</font></b><font
face="Arial,Verdana,Helvetica"> the copy number in (DISK(PV)) colonne is only the
copy number of one block.</font><br/>' >> $Modu
for NomVolume in $(lsvg -o)
do
> $temp"jfp1listdiskmissing"
> $temp"jfp1listdiskvg"
> $temp"jfp1lsvgL"
> $temp"jfp1Resultvg"
> $temp"jfp1Titre"
> $temp"jfp1listdisklvl"
let Nbc=1
let Nbi=1

lsvg -p $NomVolume > $temp"lsvgp" &


pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lsvg -p "$NomVolume"
after time out of command ---" >> $Modu ; echo 'module HHH035, kill after time out
command: lsvg -p '$NomVolume >> $tpsort"KILL9" )
fi
lsvg -l $NomVolume > $temp"lsvgl" &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lsvg -l "$NomVolume"
after time out of command ---" >> $Modu ; echo 'module HHH035, kill after time out
command: lsvg -l '$NomVolume >> $tpsort"KILL9" )
fi

[ -s $temp"lsvgp" ] && cat $temp"lsvgp" | grep -w missing >


$temp"jfp1listdiskmissing"
[ -s $temp"lsvgp" ] && cat $temp"lsvgp" | grep -vwE "PV_NAME|$NomVolume" |
awk '{print$1}' > $temp"jfp1listdiskvg"
[ -s $temp"lsvgl" ] && cat $temp"lsvgl" | grep -vwE "LV NAME|$NomVolume" |
while read varia ; do
echo $varia >> $temp"jfp1lsvgL"
done
for varia in $([ -s $temp"jfp1listdiskvg" ] && cat $temp"jfp1listdiskvg")
do

lspv -l $varia > $temp"lspvl" &


pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lspv -l "$varia"
after time out of command ---" >> $Modu ; echo 'module HHH035, kill after time out
command: lspv -l '$varia >> $tpsort"KILL9" )
fi
[ -s $temp"lspvl" ] && cat $temp"lspvl" | grep -vwE "$varia|LV NAME" |
while read d1 d2 d3 d4 ; do
print $varia $d1 $d2 $d3 >> $temp"jfp1listdisklvl"
done
[ -s $temp"lspvl" ] && cat $temp"lspvl" >> $temp"jfp1null"
if [ $? != '0' ]
then
d1=FAIL ; d2=0 ; d3=0 ; d4=0
print $varia $d1 $d2 $d3 >> $temp"jfp1listdisklvl"
fi
done
[ -s $temp"jfp1lsvgL" ] && cat $temp"jfp1lsvgL" | while read a1 a2 a3 a4 a5
a6 a7 ; do
let MirrorType=$a4/$a3
case $MirrorType in
1) ac1=b ; ac2=b ; ac4=b ; ac6=b ; ac7=b ;;
2) ac1=vc ; ac2=vc ; ac4=vc ; ac6=vc ; ac7=b ;;
3) ac1=vf ; ac2=vf ; ac4=vf ; ac6=vf ; ac7=b ;;
esac
[[ $(echo $a6| grep close) != '' ]] && ac6=jf
[[ $(echo $a6| grep stale) != '' ]] && ac6=rv
let i=1
[ -s $temp"jfp1listdisklvl" ] && cat $temp"jfp1listdisklvl" | grep -wE
"$a1|FAIL" | while read vari[$i] vari[$i+1] vari[$i+2] vari[$i+3] ; do
varic[$i]=ro ; varic[$i+2]=rv ; varic[$i+3]=rv
lspv -M ${vari[$i]} > $temp"lspvM" &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lspv
-M "${vari[$i]}" after time out of command ---" >> $Modu ; echo 'module HHH035,
kill after time out command: lspv -M '${vari[$i]} >> $tpsort"KILL9" )
fi
[ -s $temp"lspvM" ] && cat $temp"lspvM" | grep $a1 | tr ":"
" " | awk '{print$5}' | read vari[$i+1]
((i+=4))
done
let Nbi=$i-4
[[ $Nbi -gt $Nbc ]] && Nbc=$Nbi
let i=1
let SomPPs=${vari[$i+3]}
while [[ $i -le $Nbi ]]
do
((i+=4))
if [[ ${vari[$i+3]} != "" ]]
then
let SomPPs=$SomPPs+${vari[$i+3]}
fi
done
if [[ $SomPPs -ne $a4 ]]
then
ac2=ro ; ac4=ro
fi
TraiteMirok $Nbi
let i=1
while [[ $i -le $Nbi ]]
do
if [[ ${vari[$i+2]} -eq ${vari[$i+3]} ]]
then
if [[ ${vari[$i+2]} -eq '0' ]]
then
varic[$i]=vc ; varic[$i+2]=rv ; varic[$i+3]=rv
fi
else
varic[$i]=jf ; varic[$i+2]=ro ; varic[$i+3]=jf
fi
((i+=4))
done

Type=$(lslv $a1 | grep -w "SCHED POLICY" | cut -c 44- | awk


'{print$3}')
print $ac1','$MirrorType'
'$Type','$ac2','$a1','$ac2','$a2','$ac2','$a3','$ac4','$a4','$ac2','$a5','$ac6','$a
6','$ac7','$a7'\c' >> $temp"jfp1Resultvg"
let i=1
while [[ $i -le $Nbi ]]
do
print ','${varic[$i]}','${vari[$i]}': '${vari[$i+1]}','$
{varic[$i+2]}','${vari[$i+2]}','${varic[$i+3]}','${vari[$i+3]}'\c' >>
$temp"jfp1Resultvg"
((i+=4))
done
print >> $temp"jfp1Resultvg"
done
print 'jc,Mirror Type,jc,LV NAME,jc,TYPE,jc,LPs,jc,PPs,jc,PVs,jc,LV
STATE,jc,MOUNT POINT\c' > $temp"jfp1Titre"
let i=1
while [[ $i -le $Nbc ]]
do
print ',jc,DISK(PV),jc,LPs,jc,PPs\c' >> $temp"jfp1Titre"
((i+=4))
done
print >> $temp"jfp1Titre"
echo "xxxx- Analyse du Volume Groupe :" > $temp"jfp1ResulCom"
[ -s $temp"jfp1Titre" ] && cat $temp"jfp1Titre" >> $temp"jfp1ResulCom"
[ -s $temp"jfp1Resultvg" ] && cat $temp"jfp1Resultvg" >> $temp"jfp1ResulCom"
echo '<CAPTION style=background:#add8e6><b style=background:#add8e6>Analyse
of Volume Group : (</b>'$NomVolume'\c' > $temp"jfp1TitreVolume"
echo '<b style=background:#add8e6>) Quorum : </b>\c' >>
$temp"jfp1TitreVolume"
lsvg $NomVolume > $temp"lsvgQ" &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lsvg "$NomVolume"
after time out of command ---" >> $Modu ; echo 'module HHH035, kill after time out
command: lsvg '$NomVolume >> $tpsort"KILL9" )
fi
let Quorum=$(cat $temp"lsvgQ" | grep -w QUORUM | cut -c 46- | awk
'{print$2}')
[[ $Quorum -eq 2 ]] && echo ' Yes' >> $temp"jfp1TitreVolume" || echo ' No'>>
$temp"jfp1TitreVolume"
echo '<font face="Arial,Verdana,Helvetica">\c' >> $temp"jfp1TitreVolume"
echo '[Disks list: \c' >> $temp"jfp1TitreVolume"

[ -s $temp"jfp1listdiskmissing" ] && cat $temp"jfp1listdiskmissing" | while


read miss miss1 miss2 ; do
print '('$miss' '$miss1')\c' >> $temp"jfp1TitreVolume"
done
echo '<font face="courier new,monospaced,courier">, \c' >>
$temp"jfp1TitreVolume"
[ -s $temp"jfp1listdiskvg" ] && cat $temp"jfp1listdiskvg" | while read
ldisk ; do
print $ldisk' \c' >> $temp"jfp1TitreVolume"
done
print '</font>]</CAPTION>' >> $temp"jfp1TitreVolume"
tritablec "Analyse du Volume Groupe :" $temp"jfp1ResulCom" $temp"jfp1sorti"
$temp"jfp1TitreVolume"
[ -s $temp"jfp1sorti" ] && cat $temp"jfp1sorti" >> $Modu
echo '</font><hr>' >> $Modu
done
echo '</font>' >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded" >
$temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded"


| while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 2.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
tritablec() #Nomchapitre NomFichier NomR�sultat
{
#exec 2>>module_tritablec.log ; set -x
typeset -i a=0
typeset temp ligne colonne chapitre i mot b aa c ligne1 j couleur
temp=$tpvar"tritablec"
chapitre=$1
>$temp
cat $2 | grep -p "$chapitre" | grep -v "xxxx-" | grep -v "$chapitre" | tr " " "%" >
$temp"Chapitre"
echo '<TABLE cellpadding="1" cellspacing="1" border="1" bgcolor=#FFFFFF>' > $3

#[ $4 != " " ] && cat $4 >> $3


cat $4 >> $3
((i=0))
for ligne in $(cat $temp"Chapitre")
do
echo $ligne | grep '"' > $temp"null"
if [ -s $temp"null" ]
then
echo $ligne | tr '"' "
" > $temp"1"
b=""
cat $temp"1" | while read aa ; do
long=$(echo $aa | wc -m)
let long=long-1
if [ "$(echo $aa | cut -c 1)" = "," ] || [ "$(echo $aa | cut -c
$long)" = "," ]
then
ligne1=$b$aa ; b=$ligne1
else
c=$(echo $aa | tr "," ";")
ligne1=$b$c ; b=$ligne1
fi
done
ligne=$ligne1
fi
((i+=1)) # num de ligne
let j=1 # bascule de couleurs
echo '<tr>' >> $3
echo $ligne | tr "," "
" | while read colonne ; do
mot=$(echo $colonne | tr "%" " ")
if [ "$j" = "1" ]
then
case $mot in
vc) couleur='#CCFFCC' ;;
vf) couleur='#A7FFA7' ;;
ro) couleur='#FF9900' ;;
rv) couleur='RED' ;;
bc) couleur='#D1E8FF' ;;
bf) couleur='#C1E0FF' ;;
jc) couleur='#FFFFE5' ;;
jf) couleur='#FFFF00' ;;
b) couleur='#FEFEFE' ;;
esac
let j=2
else
let j=1
if [ "$i" = "1" ]
then
echo '<td style=background:'$couleur'><font face="courier
new,monospaced,courier" ><b style=background:#FFFFE5>'$mot'</b></font></td>' >> $3
else
echo '<td style=background:'$couleur'><font face="courier
new,monospaced,courier" >'$mot'</font></td>' >> $3
fi
fi
done
echo '</tr>' >> $3
done
echo '</table>' >> $3
rm -f $tpvar"tritablec"*
return $a
}
TraiteMirok()
{
#set -x
typeset -i a=0
typeset temp memoryJ
typeset d i j etat compl
typeset -i Nbi=$1
temp=$tpvar"TraiteMirok"
>$temp
((i=1))
((d=1))
memoryJ=""
while [[ $i -le $Nbi ]]
do
if [[ $(echo $memoryJ | grep -w $i) = "" ]]
then
if [[ ${vari[$i+2]} -eq $a3 ]]
then
if [[ $d -lt 0 ]]
then
varic[$i]=bf
varic[$i+2]=bc
varic[$i+3]=bc
else
varic[$i]=vf
varic[$i+2]=vc
varic[$i+3]=vc
fi
let d=d*(-1)
else
let etat=0
let j=$i+4
while [[ $j -le $Nbi ]]
do
if [[ $(echo $memoryJ | grep -w $j) = "" ]]
then
let etat=1
if [[ $a3 -gt ${vari[$i+2]} ]]
then
let compl=$a3-${vari[$i+2]}
if [[ $compl -eq ${vari[$j+2]} ]]
then
if [[ $d -lt 0 ]]
then
varic[$i]=bf
varic[$i+2]=bc
varic[$i+3]=bc
varic[$j]=bf
varic[$j+2]=bc
varic[$j+3]=bc
memoryJ=$memoryJ" "$j" "
else
varic[$i]=vf
varic[$i+2]=vc
varic[$i+3]=vc
varic[$j]=vf
varic[$j+2]=vc
varic[$j+3]=vc
memoryJ=$memoryJ" "$j" "
fi
let j=$Nbi+1
let d=d*(-1)
fi
else
varic[$i]=ro
varic[$i+2]=rv
varic[$i+3]=rv

fi
fi
((j+=4))
done
fi
fi
((i+=4))
done
rm -f $tpvar"TraiteMirok"*
return $a
}
ModHHH036() # Num�ro d execution
{
$debug
#yyyy ModHHH036 oui
typeset j=$1
typeset TitreModule version
TitreModule="lspv -l (for each disk)"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH036"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
for i in $(lspv | grep -iv none | grep -i active | awk '{print$1}')
do
lspv -l $i > $temp"jfp1" 2>> $temp"jfp1" &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lspv -l after time out
of command ---" >> $Modu ; echo 'module HHH036, kill after time out command lspv
-l' >> $tpsort"KILL9" )
fi

if [[ -s $temp"jfp1" ]]
then
#echo "Disque "$i" : " >> $Modu
echo '<em> '$i' </em><b> '$(lsdev -Cc disk | grep -w $i | read val val1;
echo $val1)' : </b>' >> $Modu
#lsdev -Cc disk | grep $i >> $Modu
cat $temp"jfp1" | grep -v $i >> $Modu
fi
echo '' >> $Modu
done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 2.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH046() # Num�ro d execution


{
$debug
#yyyy ModHHH046 oui
typeset j=$1
typeset TitreModule version
TitreModule="lscfg -vp"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH046"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lscfg -vp > $temp"jfp1"
if [ $? = 0 ]
then
echo '#lscfg -vp ' > $Modu
lscfg -vp >> $Modu
else
echo '#lscfg -v ' > $Modu
lscfg -v >> $Modu
fi
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH043() # Num�ro d execution
{
$debug
#yyyy ModHHH043 oui
typeset j=$1
typeset TitreModule version
TitreModule="lsdev -Cc disk"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH043"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc disk > $Modu
cat $Modu | grep -i virtual > $temp"jfp1"
[ -s $temp"jfp1" ] && ( echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to
1.'$j' '$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong>
Virtual Disk </strong> ' >> $Resu )
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH039() # Num�ro d execution
{
$debug
#yyyy ModHHH039 oui
typeset j=$1
typeset TitreModule version
TitreModule="lspv"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH039"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lspv > $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH042() # Num�ro d execution
{
$debug
#yyyy ModHHH042 oui
typeset j=$1
typeset TitreModule version
TitreModule="lsdev -Cs scsi"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH042"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cs scsi >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH044() # Num�ro d execution
{
$debug
#yyyy ModHHH044 oui
typeset j=$1
typeset TitreModule version
TitreModule="lsdev -Cc adapter"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH044"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -Cc adapter >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH045() # Num�ro d execution


{
$debug
#yyyy ModHHH045 oui
typeset j=$1
typeset TitreModule version
TitreModule="lsdev -C"
version=" version 11-H.1.00"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH045"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsdev -C >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 3.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH050() # Num�ro d execution
{
$debug
#yyyy ModHHH050 oui
typeset j=$1
typeset TitreModule version
TitreModule="Disk Driver (manage_disk_drivers -l)"
version=" version 2012-1.0.12 date: 31/05/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH050"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
/usr/bin/manage_disk_drivers -l >> $Modu
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|
warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong class=\"alert\">degraded<\/strong>/g;
s/Degraded/<strong class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH051() # Num�ro d execution
{
$debug
#yyyy ModHHH051 oui
typeset j=$1
typeset TitreModule version
TitreModule="Fibre Channel Statistics (fcstat fcsX)"
version=" version 2012-1.0.13 date: 04/06/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH051"
typeset fibre
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
fcstat > $temp"jfp1"
if [ $? != 127 ]
then
>$temp"jfp1"
for fibre in $(lsdev -C -F name -S 1 | grep fcs)
do
fcstat $fibre > $temp"jfp2"
if [ -s $temp"jfp2" ]
then
echo '<b> Fibre Channel : </b><em> '$fibre' </em>' >> $temp"jfp1"
cat $temp"jfp2" >> $temp"jfp1"
echo '' >> $temp"jfp1"
fi
done
cat $temp"jfp1" > $Modu
cat $Modu | grep -iE "Error Frames|Link Failure|Loss of Sync|Frames" >
$temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Error Frames/<strong class=\"alert0\">Error Frames:<\/strong>/g"
$Modu > $temp"jfp78" ; echo '.\c'
sed "s/Loss of Sync/<strong class=\"alert0\">Loss of Sync<\/strong>/g"
$temp"jfp78" > $Modu ; echo '.\c'
sed "s/Link Failure/<strong class=\"alert0\">Link Failure<\/strong>/g"
$Modu > $temp"jfp78" ; echo '.\c'
cat $temp"jfp78" > $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH052() # Num�ro d execution
{
$debug
#yyyy ModHHH052 oui
typeset j=$1
typeset TitreModule version
TitreModule="HITACHI HDLM"
version=" version 2012-1.0.14 date: 06/06/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH052"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module

if [ -x $(which dlnkmgr) ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> HITACHI
HDLM </strong>' >> $Resu
echo '<b> HDLM sys : </b><strong><a href="#HDLM sys"> dlnkmgr view -sys
</a></strong>' >> $Modu
echo '<b> HDLM device : </b><strong><a href="#HDLM device"> lsdev -C | grep
dlm </a></strong>' >> $Modu
echo '<b> HDLM drive : </b><strong><a href="#HDLM drive"> dlnkmgr view -drv
</a></strong>' >> $Modu
echo '<b> HDLM path : </b><strong><a href="#HDLM path"> dlnkmgr view -path
</a></strong>' >> $Modu

echo '<b> HDLM hba : </b><strong><a href="#HDLM hba"> dlnkmgr view -hba
</a></strong>' >> $Modu
echo '<b> HDLM cha : </b><strong><a href="#HDLM cha"> dlnkmgr view -cha
</a></strong>' >> $Modu
echo '<b> HDLM Dynamic : </b><strong><a href="#HDLM Dynamic"> lslpp -Lc|grep
-i dyn </a></strong>' >> $Modu

echo '<a name="HDLM sys"></a>' >> $Modu


echo '<b> HDLM sys : </b><em> dlnkmgr view -sys </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >>
$Modu
echo '' >> $Modu
$(which dlnkmgr) view -sys >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM device"></a>' >> $Modu
echo '<b> HDLM device : </b><em> lsdev -C | grep dlm </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >>
$Modu
echo '' >> $Modu
lsdev -C | grep dlm >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM drive"></a>' >> $Modu
echo '<b> HDLM drive : </b><em> dlnkmgr view -drv </em> \c' >> $Modu
; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >> $Modu
echo '' >> $Modu
$(which dlnkmgr) view -drv >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM path"></a>' >> $Modu
echo '<b> HDLM path : </b><em> dlnkmgr view -path </em> \c' >> $Modu
; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >> $Modu
echo '' >> $Modu
$(which dlnkmgr) view -path >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM hba"></a>' >> $Modu
echo '<b> HDLM hba : </b><em> dlnkmgr view -hba </em> \c' >> $Modu ;
echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >> $Modu
echo '' >> $Modu
$(which dlnkmgr) view -hba >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM cha"></a>' >> $Modu
echo '<b> HDLM cha : </b><em> dlnkmgr view -cha </em> \c' >> $Modu ;
echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >> $Modu
echo '' >> $Modu
$(which dlnkmgr) view -cha >> $Modu ; echo '\c' >> $Modu
echo '<a name="HDLM Dynamic"></a>' >> $Modu
echo '<b> HDLM Dynamic : </b><em> lslpp -Lc|grep -i dyn </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HITACHI HDLM</a>' >>
$Modu
echo '' >> $Modu
lslpp -Lc|grep -i dyn >> $Modu ; echo '\c' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH053() # Num�ro d execution
{
$debug
#yyyy ModHHH053 oui
typeset j=$1
typeset TitreModule version
TitreModule="HP StorageWorks, HSVxxx"
version=" version 2012-1.0.15 date: 12/06/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH053"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
/opt/hphsv/bin/lshsv 2>$temp"jfp100" 1>$temp"jfp100"
if [ $? = 0 ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> HP
StorageWorks </strong>' >> $Resu
echo '<b> HSV : </b><strong><a href="#lshba"> lshba </a></strong>' >> $Modu
echo '<b> HSV : </b><strong><a href="#lshsv"> lshsv </a></strong>' >> $Modu
echo '<b> HSV : </b><strong><a href="#lshsv -s"> lshsv -s </a></strong>' >>
$Modu
echo '<b> HSV : </b><strong><a href="#lshsv -p"> lshsv -p </a></strong>' >>
$Modu
echo '<b> HSV : </b><strong><a href="#lsvpaths"> lsvpaths </a></strong>' >>
$Modu

echo '<a name="lshba"></a>' >> $Modu


echo '<b> HDLM sys : </b><em> lshba </em> \c' >> $Modu ; echo '<a
href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks</a>' >> $Modu
echo '' >> $Modu
/opt/hphsv/bin/lshba >> $Modu ; echo '\c' >> $Modu
echo '<a name="lshsv"></a>' >> $Modu
echo '<b> HDLM sys : </b><em> lshsv </em> \c' >> $Modu ; echo '<a
href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks</a>' >> $Modu
echo '' >> $Modu
/opt/hphsv/bin/lshsv >> $Modu ; echo '\c' >> $Modu
echo '<a name="lshsv -s"></a>' >> $Modu
echo '<b> HDLM sys : </b><em> lshsv -s </em> \c' >> $Modu ; echo '<a
href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks</a>' >> $Modu
echo '' >> $Modu
/opt/hphsv/bin/lshsv -s >> $Modu ; echo '\c' >> $Modu
echo '<a name="lshsv -p"></a>' >> $Modu
echo '<b> HDLM sys : </b><em> lshsv -p </em> \c' >> $Modu ; echo '<a
href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks</a>' >> $Modu
echo '' >> $Modu
/opt/hphsv/bin/lshsv -p >> $Modu ; echo '\c' >> $Modu
echo '<a name="lsvpaths"></a>' >> $Modu
echo '<b> HDLM sys : </b><em> lsvpaths </em> \c' >> $Modu ; echo '<a
href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks</a>' >> $Modu
echo '' >> $Modu
/opt/hphsv/bin/lsvpaths >> $Modu ; echo '\c' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH054() # Num�ro d execution
{
$debug
#yyyy ModHHH054 oui
typeset j=$1
typeset TitreModule version
TitreModule="HP StorageWorks, Secure Path"
version=" version 2012-1.0.16 date: 14/06/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH054"
typeset device
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
/usr/lpp/cbxfc/cbxfcsm listdev 2>$temp"jfp100" 12>$temp"jfp100"
if [ $? = 0 ]
then
echo '<b> HP StorageWorks listdev : </b><strong><a href="#Hlistdev">
/usr/lpp/cbxfc/cbxfcsm listdev </a></strong>' >> $Modu
echo '<b> HP StorageWorks listadapt : </b><strong><a href="#Hlistadapt">
/usr/lpp/cbxfc/cbxfcsm listadapt </a></strong>' >> $Modu
echo '<b> HP StorageWorks listall : </b><strong><a href="#Hlistall">
/usr/lpp/cbxfc/cbxfcsm listall </a></strong>' >> $Modu
echo '<b> HP StorageWorks listpath : </b><strong><a href="#Hlistpath">
/usr/lpp/cbxfc/cbxfcsm listpath hdiskXX </a></strong>' >> $Modu
echo '<b> HP StorageWorks HSG disk : </b><strong><a href="#HSGdisk"> lsdev
-Cc disk | grep " HSG" </a></strong>' >> $Modu

echo '<a name="Hlistdev"></a>' >> $Modu


echo '<b> HP StorageWorks listdev : </b><em> /usr/lpp/cbxfc/cbxfcsm listdev
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour
HP StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/lpp/cbxfc/cbxfcsm listdev >> $Modu ; echo '\c' >>
$Modu
echo '<a name="Hlistadapt"></a>' >> $Modu
echo '<b> HP StorageWorks listadapt : </b><em> /usr/lpp/cbxfc/cbxfcsm
listadapt </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour HP StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/lpp/cbxfc/cbxfcsm listadapt >> $Modu ; echo '\c' >>
$Modu
echo '<a name="Hlistall"></a>' >> $Modu
echo '<b> HP StorageWorks listall : </b><em> /usr/lpp/cbxfc/cbxfcsm listall
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP
StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/lpp/cbxfc/cbxfcsm listall >> $Modu ; echo '\c' >>
$Modu
echo '<a name="Hlistpath"></a>' >> $Modu
/usr/lpp/cbxfc/cbxfcsm listdev | awk '{print$1}' | while read device ; do
echo '<b> HP StorageWorks listpath : </b><em> /usr/lpp/cbxfc/cbxfcsm listpath
'$device' </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour HP StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/lpp/cbxfc/cbxfcsm listpath $device >> $Modu ; echo
'\c' >> $Modu
done

echo '<a name="HSGdisk"></a>' >> $Modu


echo '<b> HP StorageWorks HSG disk : </b><em> lsdev -Cc disk | grep " HSG"
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP
StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
lsdev -Cc disk | grep " HSG" >> $Modu ; echo '\c' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
/usr/cbxfc/cbxfcsm listdev 2>$temp"jfp100" 12>$temp"jfp100"
if [ $? = 0 ]
then
echo '<b> HP StorageWorks listdev : </b><strong><a href="#Hlistdev"> cbxfcsm
listdev </a></strong>' >> $Modu
echo '<b> HP StorageWorks listadapt : </b><strong><a href="#Hlistadapt">
cbxfcsm listadapt </a></strong>' >> $Modu
echo '<b> HP StorageWorks listall : </b><strong><a href="#Hlistall"> cbxfcsm
listall </a></strong>' >> $Modu
echo '<b> HP StorageWorks listpath : </b><strong><a href="#Hlistpath">
cbxfcsm listpath hdiskXX </a></strong>' >> $Modu
echo '<b> HP StorageWorks HSG disk : </b><strong><a href="#HSGdisk"> lsdev
-Cc disk |grep " HSG" </a></strong>' >> $Modu

echo '<a name="Hlistdev"></a>' >> $Modu


echo '<b> HP StorageWorks listdev : </b><em> /usr/cbxfc/cbxfcsm listdev </em>
\c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks,
Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/cbxfc/cbxfcsm listdev >> $Modu ; echo '\c' >> $Modu
echo '<a name="Hlistadapt"></a>' >> $Modu
echo '<b> HP StorageWorks listadapt : </b><em> /usr/cbxfc/cbxfcsm listadapt
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP
StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/cbxfc/cbxfcsm listadapt >> $Modu ; echo '\c' >> $Modu
echo '<a name="Hlistall"></a>' >> $Modu
echo '<b> HP StorageWorks listall : </b><em> /usr/cbxfc/cbxfcsm listall </em>
\c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP StorageWorks,
Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/cbxfc/cbxfcsm listall >> $Modu ; echo '\c' >> $Modu
echo '<a name="Hlistpath"></a>' >> $Modu
/usr/cbxfc/cbxfcsm listdev | awk '{print$1}' | while read device ; do
echo '<b> HP StorageWorks listpath : </b><em> /usr/cbxfc/cbxfcsm listpath
'$device' </em> \c' >> $Modu ; echo '<a href="#'$
{SignetS[$NumNum+1000]}'">retour HP StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
/usr/cbxfc/cbxfcsm listpath $device >> $Modu ; echo '\c'
>> $Modu
done
echo '<a name="HSGdisk"></a>' >> $Modu
echo '<b> HP StorageWorks HSG disk : </b><em> lsdev -Cc disk | grep " HSG"
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour HP
StorageWorks, Secure Path</a>' >> $Modu
echo '' >> $Modu
lsdev -Cc disk | grep " HSG" >> $Modu ; echo '\c' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH055() # Num�ro d execution
{
$debug
#yyyy ModHHH055 oui
typeset j=$1
typeset TitreModule version
TitreModule="lscfg by Modules/Drawers list"
version=" version 2013-1.4.0 date: 18/04/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH055"
typeset -i num
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lscfg -vp 2>$temp"jfp100" 1>$temp"jfp100"
if [ $? = 0 ]
then
lscfg -vp > $temp"jfp0"
cat $temp"jfp0" | grep -i "Physical Location" | tr " " "%" | tr ":" " " | awk
'{print$2}' | tr "%" " " | tr "-" " " | awk '{print$1}' > $temp"jfp1"
ligne=$(cat $temp"jfp1" | wc -l)
let num=1
echo ' ' >> $Resu
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert4"> Modules/Drawers in this machine :
</strong></a> (for information only)' >> $Resu

sed -e '1,/PLATFORM SPECIFIC/d' $temp"jfp0" > $temp"jfp3"


lscfg | awk '{print$2}' > $temp"jfp4"

echo ' ' > $temp"jfp11"

while (( $ligne > '0' ))


do

panel='';fsp='';cec='';proc='';dimm='';disk='';rmt='';fcs='';ent='';raid='';lhea=''
cat $temp"jfp1" | read drawer
cat $temp"jfp3" | grep -wp $drawer > $temp"jfp11" ; echo '\c' >> $temp"jfp11"
cat $temp"jfp11" | grep -i panel > /dev/null
if [ $? = 0 ]
then
panel=' (presence of panel)'
fi
cat $temp"jfp11" | grep " FSP " | grep -vi nc > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
fsp=' ('$NbDevice' x FSP)'
fi
cat $temp"jfp11" | grep " PROC " > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
proc=' ('$NbDevice' x PROC)'
fi
cat $temp"jfp11" | grep " CEC:" > /dev/null
if [ $? = 0 ]
then
cec=' (CEC)'
fi
cat $temp"jfp11" | grep " DIMM" > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
dimm=' ('$NbDevice' x DIMM)'
fi
cat $temp"jfp4" > $temp"jfp5"
> $temp"jfp16"
for resource in $(cat $temp"jfp5")
do
lscfg -vl $resource > $temp"jfp6" 2>> /dev/null
if [ -s $temp"jfp6" ]
then
cat $temp"jfp6" | grep $drawer > /dev/null
if [ $? = 0 ]
then
cat $temp"jfp6" >> $temp"jfp16"
sed -e '/'$resource'/d' $temp"jfp5" > $temp"jfp7" ; cp
$temp"jfp7" $temp"jfp5"
fi
fi
done
cat $temp"jfp5" > $temp"jfp4"
device='';devicev=''
cat $temp"jfp16" | grep "disk" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x DISK )'
fi
fi
cat $temp"jfp16" | grep "disk" | grep -i virtual | grep -vi Target >
$temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual DISK )'
fi
fi
disk=$device$devicev
device='';devicev=''
cat $temp"jfp16" | grep " rmt" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x Tape )'
fi
fi
cat $temp"jfp16" | grep " rmt" | grep -i virtual > $temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual Tape )'
fi
fi
rmt=$device$devicev
device='';devicev=''
cat $temp"jfp16" | grep " fcs" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x Fiber )'
fi
fi
cat $temp"jfp16" | grep " fcs" | grep -i virtual > $temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual Fiber )'
fi
fi
fcs=$device$devicev

device='';devicev=''
cat $temp"jfp16" | grep " ent" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x Ethernet Adapter )'
fi
fi
cat $temp"jfp16" | grep " ent" | grep -i virtual > $temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual Ethernet Adapter )'
fi
fi
ent=$device$devicev

device='';devicev=''
cat $temp"jfp16" | grep "raid" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x Raid Adapter )'
fi
fi
cat $temp"jfp16" | grep "raid" | grep -i virtual > $temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual Raid Adapter )'
fi
fi
raid=$device$devicev

cat $temp"jfp16" | grep " lhea" | grep -vi virtual > $temp"jfpD00"
if [ $? = 0 ]
then
lhea=' (LHEA)'
fi
device='';devicev=''
cat $temp"jfp16" | grep -E "cd0|cd1|cd2|cd3|cd4|cd5" | grep -vi virtual >
$temp"jfpD00"
if [ $? = 0 ]
then
NbDevice=$(cat $temp"jfpD00" | wc -l)
if [ $NbDevice != 0 ]
then
device=' ('$NbDevice' x CD/DVD )'
fi
fi
cat $temp"jfp16" | grep -E "cd0|cd1|cd2|cd3|cd4|cd5" | grep -i virtual >
$temp"jfpD01"
if [ $? = 0 ]
then
NbDeviceV=$(cat $temp"jfpD01" | wc -l)
if [ $NbDeviceV != 0 ]
then
devicev=' ('$NbDeviceV' x Virtual CD/DVD )'
fi
fi
cd=$device$devicev

echo '<b> Module/Drawer '$num' : </b><strong><a href="#'$drawer'"> '$drawer'


</a></strong> '$cec$proc$dimm$raid$disk$rmt$fcs$ent$lhea$fsp$cd$panel >> $Modu
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert4"> Module/Drawer '$num' : </strong></a>\c'
>> $Resu
echo '<strong> '$drawer' </strong>
'$cec$proc$dimm$raid$disk$rmt$fcs$ent$lhea$fsp$cd$panel'</a>' >> $Resu

echo '<a name="'$drawer'"></a>' >> $temp"jfp10"


echo '<b> Module/Drawer '$num' : </b><em> '$drawer'
</em>'$cec$proc$dimm$raid$disk$rmt$fcs$ent$lhea$fsp$cd$panel' \c' >>
$temp"jfp10" ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour lscfg by
Modules/Drawers list</a>' >> $temp"jfp10"
echo '' >> $temp"jfp10"

cat $temp"jfp16" >> $temp"jfp17"


echo ' ' >> $temp"jfp17"
echo ' PLATFORM SPECIFIC ' >> $temp"jfp17"
echo ' ' >> $temp"jfp17"
cat $temp"jfp11" >> $temp"jfp17"
sed "s/"$drawer"/<a href=\"#"$drawer"\"> "$drawer" <\/a>/g" $temp"jfp17" >
$temp"jfp12"
sed "s/FRU Number/<strong class=\"alert0\">FRU Number<\/strong>/g; s/Part
Number/<strong class=\"alert0\">Part Number<\/strong>/g;" $temp"jfp12" >
$temp"jfp11"
sed "s/Virtual/<strong class=\"alert1\">Virtual<\/strong>/g;
s/virtual/<strong class=\"alert1\">virtual<\/strong>/g;" $temp"jfp11" >>
$temp"jfp10"
cat $temp"jfp1" | grep -wv $drawer > $temp"jfp2"
cat $temp"jfp2" > $temp"jfp1"
ligne=$(cat $temp"jfp1" | wc -l)
((num+=1))
> $temp"jfp17"
done
cat $temp"jfp10" >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|degraded|


warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong class=\"alert\">stale<\/strong>/g;
s/Stale/<strong class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong class=\"alert\">unknown<\/strong>/g;
s/Unknown/<strong class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $Resu
done
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH056() # Num�ro d execution


{
$debug
#yyyy ModHHH056 oui
typeset j=$1
typeset TitreModule version
TitreModule="Storage NETAPP config"
version=" version 2012-1.1.9 date: 06/11/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH056"
typeset pid
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
if [ -x $(which sanlun) ]
then
echo '<b> Nettapp version : </b><strong><a href="#Nettapp version"> sanlun
version </a></strong>' >> $Modu
echo '<b> Nettapp adapter : </b><strong><a href="#Nettapp adapter"> sanlun
fcp show adapter </a></strong>' >> $Modu
echo '<b> Nettapp adapter v : </b><strong><a href="#Nettapp adapter v">
sanlun fcp show adapter -v </a></strong>' >> $Modu
echo '<b> Nettapp adapter c : </b><strong><a href="#Nettapp adapter c">
sanlun fcp show adapter -c </a></strong>' >> $Modu
echo '<b> Nettapp lun : </b><strong><a href="#Nettapp lun"> sanlun lun show
</a></strong>' >> $Modu
echo '<b> Nettapp lun v : </b><strong><a href="#Nettapp lun v"> sanlun lun
show -v </a></strong>' >> $Modu
echo '<b> Nettapp lun p : </b><strong><a href="#Nettapp lun p"> sanlun lun
show -p </a></strong>' >> $Modu
echo '<a name="Nettapp version"></a>' >> $Modu
echo '<b> Nettapp version : </b><em> sanlun version </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun version >> $Modu
echo '\c' >> $Modu
echo '<a name="Nettapp adapter"></a>' >> $Modu
echo '<b> Nettapp adapter : </b><em> sanlun fcp show adapter
</em> \c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour
Storage NETAPP config</a>' >> $Modu
echo '' >> $Modu
sanlun fcp show adapter >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun fcp show adapter
after time out of command ---" >> $Modu ; echo 'module HHH056, kill after time out
command: sanlun fcp show adapter' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
echo '<a name="Nettapp adapter v"></a>' >> $Modu
echo '<b> Nettapp adapter v : </b><em> sanlun fcp show adapter -v </em>
\c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun fcp show adapter -v >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun fcp show adapter
-v after time out of command ---" >> $Modu ; echo 'module HHH056, kill after time
out command: sanlun fcp show adapter -v' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
echo '<a name="Nettapp adapter c"></a>' >> $Modu
echo '<b> Nettapp adapter c : </b><em> sanlun fcp show adapter -c </em>
\c' >> $Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun fcp show adapter -c >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun fcp show adapter
-c after time out of command ---" >> $Modu ; echo 'module HHH056, kill after time
out command: sanlun fcp show adapter -c' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
echo '<a name="Nettapp lun"></a>' >> $Modu
echo '<b> Nettapp lun : </b><em> sanlun lun show </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun lun show >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun lun show after
time out of command ---" >> $Modu ; echo 'module HHH056, kill after time out
command: sanlun lun show' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
echo '<a name="Nettapp lun v"></a>' >> $Modu
echo '<b> Nettapp lun v : </b><em> sanlun lun show -v </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun lun show -v >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun lun show -v
after time out of command ---" >> $Modu ; echo 'module HHH056, kill after time out
command: sanlun lun show -v ' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
echo '<a name="Nettapp lun p"></a>' >> $Modu
echo '<b> Nettapp lun p : </b><em> sanlun lun show -p </em> \c' >>
$Modu ; echo '<a href="#'${SignetS[$NumNum+1000]}'">retour Storage NETAPP
config</a>' >> $Modu
echo '' >> $Modu
sanlun lun show -p >> $Modu &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 80
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill sanlun lun show -p after
time out of command ---" >> $Modu ; echo 'module HHH056, kill after time out
command: sanlun lun show -p' >> $tpsort"KILL9" )
fi
echo '\c' >> $Modu
sed "s/Operational/<strong class=\"alert0\">Operational<\/strong>/g; s/up /<strong
class=\"alert1\">up <\/strong>/g;" $Modu > $temp"jfp10"
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> STORAGE : </strong></a><strong> NettApp
</strong> , version : '$(sanlun version) >> $Resu
cat $temp"jfp10" > $Modu

cat $Modu | grep -iE "Failed|missing|dead|Link Down|down|


degraded|warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong class=\"alert\">Failed<\/strong>/g;
s/failed/<strong class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong class=\"alert\">faulted<\/strong>/g;
s/Faulted/<strong class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong class=\"alert\">missing<\/strong>/g;
s/Missing/<strong class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/Link Down/<strong class=\"alert\">Link
Down<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/down/<strong class=\"alert\">down<\/strong>/g"
$temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong class=\"alert\">warning<\/strong>/g;
s/Warning/<strong class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|Link Down|down|


degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'" class="alert"
title="Go to 1.'$j' '$TitreModule'">'$alert'</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in
chapter 1.'$j' "Storage NETAPP config" </a>' >> $Resu
fi
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH057() # Num�ro d execution
{
$debug
#yyyy ModHHH057 oui
typeset j=$1
typeset TitreModule version
TitreModule="fiber path - fscsi -"
version=" version 2012-1.1.9 date: 06/11/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH057"
typeset -i col
typeset fscsi fcs part FRU xx xxx Z99 Z9 Feature CCIN WWN disque disk status
path cnt addr ligne coul
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module

lspath -HF "name status path_id parent connection" | grep fscsi|sort -u >
$temp"jfp1"
if [ -s $temp"jfp1" ]
then
cat $temp"jfp1" | awk '{print$1}' | sort -u > $temp"jfp2"
cat $temp"jfp1" | awk '{print$4}' | sort -u > $temp"jfp5"
echo '<table cellpadding=2 cellspacing=0 rules=cols bgcolor=#d6d6d8>' >
$temp"jfp9"
#let nbfib=0
for fscsi in $(cat $temp"jfp5")
do
fcs=$(lsdev -Cl $(lsdev -Cl $fscsi -F parent) -F name)
lscfg -l $fcs |read xx Location description
lscfg -vl $fcs | grep -iE "(Z9)|FRU|Part Number|Customer Card ID
Number|Network Address" | tr " " "#" |tr '.' ' ' > $temp"jfp6"
part=$(cat $temp"jfp6" | grep Part#Number | awk '{print$2}'|tr "#" " ")
FRU=$(cat $temp"jfp6" | grep FRU | awk '{print$2}'|tr "#" " ")
cat $temp"jfp6" | grep '(Z9)' |read xx xxx Z99
Z9=$(echo $Z99|tr " " ".")
CCIN=$(cat $temp"jfp6" | grep Customer#Card#ID#Number | awk
'{print$2}'|tr "#" " ")
WWN=$(cat $temp"jfp6" | grep Network#Address | awk '{print$2}'|tr "#" "
")
lsdev -Cl $fcs | read xx status addr xx
coul="#FFFFFF"
echo '<tr><th style=background:#af7036 colspan=5 height="5"></th></tr>'
>> $temp"jfp9"
echo '<tr><td style=background:#faf6ce > </td><th
style=background:'$coul'>status</th><th style=background:'$coul'>adresse</th><th
style=background:'$coul'>location</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#faf6ce"
echo '<tr><td style=background:#faf6ce > '$fcs' </td><td
style=background:'$coul'>'$status'</td><td style=background:'$coul'>'$addr'</td><td
style=background:'$coul'>'$Location'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
coul="#FFFFFF"
echo '<tr><td style=background:#faf6ce > </td><th
style=background:'$coul'>Part Number</th><th style=background:'$coul'>FRU</th><th
style=background:'$coul'>Firmware</th><th style=background:'$coul'>CCIN</th><th
style=background:'$coul'>Network Address</th></tr>' >> $temp"jfp9"
coul="#f6fed0"
echo '<tr><td style=background:#faf6ce > </td><td
style=background:'$coul'>'$part'</td><td style=background:'$coul'>'$FRU'</td><td
style=background:'$coul'>'$Z9'</td><td style=background:'$coul'>'$CCIN'</td><td
style=background:'$coul'>'$WWN'</td></tr>' >> $temp"jfp9"
#((nbfib+=1))
lsattr -El $fcs -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#f8f0b0"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#FFFFFF"
[[ $col != 1 ]] && echo '<tr><td style=background:#faf6ce >
</td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
[[ $col = 1 ]] && echo '<tr><th style=background:#faf6ce >
</th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
done
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
lscfg -l $fscsi |read xx Location description
lsdev -Cl $fscsi | read xx status addr xx
coul="#FFFFFF"
echo '<tr><td style=background:#fcf9e0 > </td><th
style=background:'$coul'>status</th><th style=background:'$coul'>adresse</th><th
style=background:'$coul'>location</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#fcf9e0"
echo '<tr><td style=background:#fcf9e0 > '$fscsi' </td><td
style=background:'$coul'>'$status'</td><td style=background:'$coul'>'$addr'</td><td
style=background:'$coul'>'$Location'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
lsattr -El $fscsi -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#f8f0b0"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#ffffff"

[[ $col != 1 ]] && echo '<tr><td style=background:#fcf9e0 >


</td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && echo '<tr><th style=background:#fcf9e0 >
</th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul
colspan=2>/g" $temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul
colspan=2>/g" $temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
done
done
#echo 'Fiber adapter ( fcs ): <strong> '$nbfib' </strong>' >> $Resu
echo '<tr><th style=background:#af7036 colspan=10
height="5"></th></tr></table>' >> $temp"jfp9"
for disque in $(cat $temp"jfp2")
do
lscfg -l $disque |read xx Location description
lsdev -Cl $disque | read xx status addr xx
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="tab'$disque'" style="display: none;">' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=4></th>' >> $temp"jfp9"
coul="#ffffff"
echo '<tr><td style=background:#fcf1e6 width="80"> </td><th
style=background:'$coul'>status</th><th style=background:'$coul'>adresse</th><th
style=background:'$coul'>location</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#fcf8e6"
echo '<tr><td style=background:#fcf1e6 > '$disque' </td><td
style=background:'$coul'>'$status'</td><td style=background:'$coul'>'$addr'</td><td
style=background:'$coul'>'$Location'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
#echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
lsattr -El $disque -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#fae7d2"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#ffffff"
[[ $col = 1 ]] && echo '<tr><th style=background:#fcf1e6
width="80"> </th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col != 1 ]] && echo '<tr><td style=background:#fcf1e6
width="80"> </td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
done
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
echo '<tr><td style=background:#f9e3cb width="80"> '$disque'
</td><th style=background:#FFFFFF colspan=6><table><a onclick="javascript:
showinf(document.getElementById('\'''tab''$disque''''\''));" style="cursor:
pointer;"><img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif"> Clic here
to have other informations</a></table></th></tr>' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=7></th>' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 width="80"> </td><th
style=background:#FFFFFF>name</th><th style=background:#FFFFFF>status</th><th
style=background:#FFFFFF>path_id</th><th style=background:#FFFFFF>parent</th><th
style=background:#FFFFFF>connection</th><th
style=background:#FFFFFF>priority</th></tr>' >> $temp"jfp9"
let col=0
for fscsi in $(cat $temp"jfp1" | grep -w $disque | awk
'{print$4}' | sort -u)
do
coul="#f5eadf"
[[ $col = 1 ]] && coul="#faf5f0"
((col+=1))
[[ $col = 2 ]] && let col=0
infofcs=$(lsdev -Cl $fscsi -F parent)' - '$(lsattr -El $
(lsdev -Cl $fscsi -F parent) -O|grep -v "^#")
infofscsi1=$(lsdev -Cl $fscsi)
infofscsi2=$fscsi' - '$(lsattr -El $fscsi -O |grep -v
"^#")

cat $temp"jfp1" | grep -w $disque | grep -w $fscsi >


$temp"jfp3"
cat $temp"jfp3" |while read disk status path fscsi cnt ; do
echo '<tr><td style=background:#fcf1e6 > </td><td
style=background:'$coul'>'$disk'</td><td style=background:'$coul'>'$status'</td><td
style=background:'$coul'>'$path'</td><td style=background:'$coul'
title="'$infofscsi1 >> $temp"jfp9"
echo ' '$infofscsi2'">'$fscsi'</td><td
style=background:'$coul'>'$cnt'</td><td style=background:'$coul'>'$(lspath -AE -l
$disque -p $fscsi -w $cnt -a priority|awk '{print $2}')'</td></tr>' >> $temp"jfp9"
done

done
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=7></th>' >> $temp"jfp9"

done
echo '</table>' >> $temp"jfp9"
cat $temp"jfp9" >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning|defined|Disable" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong
class=\"alert\">Failed<\/strong>/g; s/failed/<strong
class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong
class=\"alert\">faulted<\/strong>/g; s/Faulted/<strong
class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong
class=\"alert\">missing<\/strong>/g; s/Missing/<strong
class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong
class=\"alert\">stale<\/strong>/g; s/Stale/<strong
class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong
class=\"alert\">unknown<\/strong>/g; s/Unknown/<strong
class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong
class=\"alert\">warning<\/strong>/g; s/Warning/<strong
class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/Defined/<strong
class=\"alert5\">Defined<\/strong>/g; s/defined/<strong
class=\"alert5\">defined<\/strong>/g; s/DEFINED/<strong
class=\"alert5\">DEFINED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/Disabled/<strong
class=\"alert5\">Disabled<\/strong>/g; s/disabled/<strong
class=\"alert5\">disabled<\/strong>/g; s/DISABLED/<strong
class=\"alert5\">DISABLED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|


unknow|degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> error on (fiber path - fscsi -)
</a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in
chapter 1.'$j' "error on (fiber path - fscsi -)" </a>' >> $Resu
fi
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
RechChild()
{
$debug
typeset -i a=0
typeset parent=$1
typeset -i busp=$2
typeset -i lignp=$3
typeset -i colp=$4
typeset -i lignc=$5
typeset -i colc=$6
typeset parentc=$7
typeset child=""
typeset mac
echo $parent | grep ent >/dev/null
if [ $? != 0 ]
then
for child in $(lsdev -p $parent -F name)
do
if [ $child != "" ]
then
echo $child >
$tpvar"BusPci_"$busp"_"$lignp"_"$colp"_"$lignc"_"$colc"_"$parentc
((lignc+=1))
let a=1
fi
done
else
mac=$(cat $tpvar"entjfp4" | grep -w $parent | awk '{print$2}')
for child in $(cat $tpvar"entjfp6" | grep -w $mac | awk '{print$1}')
do
if [ $child != "" ]
then
echo $child >
$tpvar"BusPci_"$busp"_"$lignp"_"$colp"_"$lignc"_"$colc"_"$parentc
((lignc+=1))
let a=1
fi
done
fi
return $a
}
recul()
{
((genchil-=1))
((genpar-=1))
((lignc[$genpar]+=1))

if [ -s $tpvar"BusPci_"$busp"_"${lignp[$genpar]}"_"${colp[$genpar]}"_"$
{lignc[$genpar]}"_"${colc[$genpar]}"_"${parent[$genpar]} ]
then
let lignp[$genchil]=${lignc[$genpar]} ; let colp[$genchil]=${colc[$genpar]} ;
let lignc[$genchil]=1 ; let colc[$genchil]=${colc[$genpar]}+1

fi
}
ModHHH058() # Num�ro d execution
{
$debug
#yyyy ModHHH058 oui
typeset j=$1
typeset TitreModule version
TitreModule="Bus Architecture of machine"
version=" version 2012-1.2.2 date: 6/12/12"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH058"
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
typeset -i col
typeset -i genpar=1 retour=1 genchil=2
typeset -i lignp[0] colp[0] lignc[0] colc[0]
typeset -i tblign=1 tbcol=1 busp=1 nbrecul=0
typeset Dbus hardloc status dev macaddr
typeset -i tblignmax=0 tbcolmax=0
# --- Calcul du module

> $tpvar"entjfp5"
for en in $(lsdev -Cc if -F name | grep -v et | grep en)
do
>$tpvar"entjfp7"
entstat -d $en | grep -E "Hardware Address|ETHERNET STATISTICS" | sed
"s/ETHERNET STATISTICS/%/" | sed "s/ ://" | sed "s/Hardware Address://" | while
read ligne ; do
echo $ligne'' >>$tpvar"entjfp7"
done
nbligne=$(cat $tpvar"entjfp7" | wc -l)
if (( $nbligne >= 2 ))
then
cat $tpvar"entjfp7" | sed 's/%//g' | sed "/^$/d" | sed "s/)//g" | sed
"s/(//g" >>$tpvar"entjfp5"
fi
done
>$tpvar"entjfp3"
typeset -i basc=0
netstat -in|awk '{print $1}'|sort -u|egrep -v "Name|lo0" > $temp"jfpnetstatok"
for ligne in $(cat $tpvar"entjfp5")
do
if (( $basc == 0 ))
then
cat $temp"jfpnetstatok" | grep -w $ligne > $temp"jfpok"
if [ -s $temp"jfpok" ]
then
echo $ligne' \c' >>$tpvar"entjfp3" ; let basc=1 ; addip=$(netstat
-in|grep $ligne| egrep -v "link" | awk '{print $4}' | tr '\n' ';')
else
echo $ligne' \c' >>$tpvar"entjfp3" ; let basc=1 ; addip=""
fi
elif (( $basc == 1 ))
then
echo $ligne' \c' >>$tpvar"entjfp3" ; let basc=0 ; echo $addip
>>$tpvar"entjfp3"
fi
done
cat $tpvar"entjfp3" | grep -v ent > $tpvar"entjfp6"
> $tpvar"entjfp5"
for en in $(lsdev -Cc adapter -F name |grep ent)
do
>$tpvar"entjfp7"
entstat -d $en | grep -E "Hardware Address|ETHERNET STATISTICS" | sed
"s/ETHERNET STATISTICS/%/" | sed "s/ ://" | sed "s/Hardware Address://" | while
read ligne ; do
echo $ligne'' >>$tpvar"entjfp7"
done
nbligne=$(cat $tpvar"entjfp7" | wc -l)
if (( $nbligne >= 2 ))
then
cat $tpvar"entjfp7" | sed 's/%//g' | sed "/^$/d" | sed "s/)//g" | sed
"s/(//g" >>$tpvar"entjfp5"
fi
done
>$tpvar"entjfp4"
typeset -i basc=0
for ligne in $(cat $tpvar"entjfp5")
do
if (( $basc == 0 ))
then
echo $ligne' \c' >>$tpvar"entjfp4" ; let basc=1
elif (( $basc == 1 ))
then
echo $ligne >>$tpvar"entjfp4" ; let basc=0
fi
done

for choixbus in $(lsdev -Cc sys -F name)


do
parent[$genpar]="base"
parent[$genchil]=$choixbus
let lignp[$genpar]=0 ; let colp[$genpar]=0 ; let lignc[$genpar]=0 ; let
colc[$genpar]=0
let lignp[$genchil]=0 ; let colp[$genchil]=0 ; let lignc[$genchil]=1 ; let
colc[$genchil]=1
echo $choixbus > $tpvar"BusPci_"$busp"_"${lignp[$genpar]}"_"$
{colp[$genpar]}"_"${lignc[$genpar]}"_"${colc[$genpar]}"_"${parent[$genpar]}

while (( $retour == 1 ))
do
if [ -s $tpvar"BusPci_"$busp"_"${lignp[$genpar]}"_"$
{colp[$genpar]}"_"${lignc[$genpar]}"_"${colc[$genpar]}"_"${parent[$genpar]} ]
then
parent[$genchil]=$(cat $tpvar"BusPci_"$busp"_"$
{lignp[$genpar]}"_"${colp[$genpar]}"_"${lignc[$genpar]}"_"${colc[$genpar]}"_"$
{parent[$genpar]})
cp $tpvar"BusPci_"$busp"_"${lignp[$genpar]}"_"$
{colp[$genpar]}"_"${lignc[$genpar]}"_"${colc[$genpar]}"_"${parent[$genpar]}
$tpvar"tbcase_"$tblign"_"$tbcol
RechChild ${parent[$genchil]} $busp ${lignp[$genchil]} $
{colp[$genchil]} ${lignc[$genchil]} ${colc[$genchil]} ${parent[$genchil]}
retour=$?
let nbrecul=0
else
retour=0
fi
if [ $retour = 1 ]
then
((tbcol+=1))
let nbrecul=0
(( $tbcolmax < $tbcol )) && let tbcolmax=tbcol
((genchil+=1))
((genpar+=1))
let lignp[$genchil]=${lignc[$genpar]} ; let
colp[$genchil]=${colc[$genpar]} ; let lignc[$genchil]=1 ; let colc[$genchil]=$
{colc[$genpar]}+1
else
if [[ $genpar > 0 ]]
then
((lignc[$genpar]+=1))
if [ -s $tpvar"BusPci_"$busp"_"${lignp[$genpar]}"_"$
{colp[$genpar]}"_"${lignc[$genpar]}"_"${colc[$genpar]}"_"${parent[$genpar]} ]
then
let lignp[$genchil]=${lignc[$genpar]} ; let
colp[$genchil]=${colc[$genpar]} ; let lignc[$genchil]=1 ; let colc[$genchil]=$
{colc[$genpar]}+1
((tblign+=1))
else
recul $genpar $genchil
((tbcol-=1))
((nbrecul+=1))
(( $nbrecul <= 1 )) && ((tblign+=1))
fi
let retour=1
else
let retour=0
fi
fi
done
let genpar=1 ; let genchil=2 ; let retour=1 ; ((tblign+=1)) ; let tbcol=1
((busp+=1))
done
let tblignmax=$tblign-2
typeset -i tblign=1 tbcol=1
echo '<TABLE cellpadding=1 cellspacing=1 border=1 bgcolor=#becddb>' > $Modu
while (( $tblign <= $tblignmax ))
do
echo '<tr>' >> $Modu
while (( $tbcol <= $tbcolmax ))
do
if [ -s $tpvar"tbcase_"$tblign"_"$tbcol ]
then
dev=$(cat $tpvar"tbcase_"$tblign"_"$tbcol)
IDbus=$(lsattr -El $dev | grep "bus_id" | awk '{print$2}')
hardloc=$(lscfg -l $dev | awk '{print$2}')
status=$(lsdev -l $dev -F "status" | sed "s/Defined/<strong
class=\"alert\">Defined<\/strong>/")
volG=$(lspv | grep -w $dev |awk '{print$3 ,$4}')
macaddr=$(cat $tpvar"entjfp4" | grep -w $dev | awk '{print$2}')
macaddrip=$(cat $tpvar"entjfp6" | grep -w $dev | awk '{print$2}')
ipaddr=$(cat $tpvar"entjfp6" | grep -w $dev | awk '{print$3}' |
tr ';' ' ')
echo '<td style=background:#FFFFED title="'$(lsdev -Cl $dev |
while read lligne ; do echo $lligne"&#13&#10 \c" ; done ; lscfg -vl $dev | while
read lligne ; do echo $lligne"&#13&#10 \c" ; done ; lsattr -El $dev | while read
lligne ; do echo $lligne"&#13&#10 \c" ; done)'"><b> '$(echo $dev ; echo ' </b>
'$status ; [[ $IDbus != "" ]] && echo "("$IDbus")\c" ; [[ $volG != "" ]] && echo
"<b> (VG: "$volG") </b>\c" ; [[ $macaddr != "" ]] && echo "<b> "$macaddr" </b>\c" ;
[[ $macaddrip != "" ]] && echo "<b> "$macaddrip" </b>\c" ; [[ $ipaddr != "" ]] &&
echo "<b> ("$ipaddr") </b>\c" ; [[ $hardloc != "" ]] && echo
"&#13&#10("$hardloc")")'</td>' >> $Modu
else
echo '<td style=background:#FFFFFF></td>' >> $Modu
fi
((tbcol+=1))
done
echo '</tr>' >> $Modu
let tbcol=1
((tblign+=1))
done
echo '</tr></table>' >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|Definved" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failevd/<strong
class=\"alert\">Failevd<\/strong>/g; s/failevd/<strong
class=\"alert\">failevd<\/strong>/g; s/FAILvD/<strong
class=\"alert\">FAILvD<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong
class=\"alert\">faulted<\/strong>/g; s/Faulted/<strong
class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong
class=\"alert\">missing<\/strong>/g; s/Missing/<strong
class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/deavd/<strong
class=\"alert\">deavd<\/strong>/g; s/Deavd/<strong
class=\"alert\">Deavd<\/strong>/g; s/DEAvD/<strong
class=\"alert\">DEAvD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong
class=\"alert\">stale<\/strong>/g; s/Stale/<strong
class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong
class=\"alert\">unknown<\/strong>/g; s/Unknown/<strong
class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/Definved/<strong
class=\"alert\">Definved<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|


unknow|degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> error on (Bus Architecture of
machine) </a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in
chapter 1.'$j' "error on (Bus Architecture of machine)" </a>' >> $Resu
fi
fi

rm -f $tpvar"BusPci_"*
rm -f $tpvar"tbcase_"*
rm -f $tpvar"entjfp"*
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH059() # Num�ro d execution
{
$debug
#yyyy ModHHH059 oui
typeset j=$1
typeset TitreModule version
TitreModule="Managed by HMC"
version=" version 2013-1.4.6 date: 21/01/2014"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH059"
typeset -i num=1
filtre='infopart'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lsrsrc IBM.MCP | grep IPAddresses > $temp"jfp1" &
pid=$!
sleep 2
kill -0 $pid 1>$temp"0" 2>$temp"0"
if [ $? = '0' ]
then
sleep 30
kill -0 $pid 1>$temp"0" 2>$temp"0"
[ $? = '0' ] && (kill -9 $pid ; echo "--- kill lsrsrc IBM.MCP | grep
IPAddresses after time out of command ---" >> $Modu ; echo 'module HHH059, kill
after time out command: lsrsrc IBM.MCP | grep IPAddresses' >> $tpsort"KILL9" )
fi
if [ -s $temp"jfp1" ]
then
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_lsrsrc_IBM_MCP''\''));" style="cursor:
pointer;"><strong class="alert1"> \c' >> $Modu
echo 'lsrsrc IBM.MCP \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_lsrsrc_IBM_MCP" style="display: none;">' >> $Modu
lsrsrc IBM.MCP >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_lsrsrc_IBM_MCP''\''));" style="cursor:
pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu
echo '<a onclick="javascript:
showinf(document.getElementById('\'''cmd_lsrsrc_IBM_ManagementServer''\''));"
style="cursor: pointer;"><strong class="alert1"> \c' >> $Modu
echo 'lsrsrc IBM.ManagementServer \c' >> $Modu
echo '</strong></a><tt cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="cmd_lsrsrc_IBM_ManagementServer" style="display: none;">' >>
$Modu
lsrsrc IBM.ManagementServer >> $Modu
echo '<strong onclick="javascript:
showinf(document.getElementById('\'''cmd_lsrsrc_IBM_ManagementServer''\''));"
style="cursor: pointer;" class="alert1">
<img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif">Close
details</strong>' >> $Modu
echo '</tt>' >> $Modu

let num=1
echo '<a href="#'${SignetS[$NumNum+1000]}'" title="Go to 1.'$j'
'$TitreModule'"><strong class="alert0"> Managed by HMC : </strong></a>\c' >> $Resu
for ligne in $(cat $temp"jfp1" | tr ' ",' '% ' | awk '{print $2,$3}'| tr ' '
'/' | sed "s/\//\//" | sed "s/\/}/ /")
do
echo ' HMC '$num' : <strong><span id="db-ipHMC"> '$ligne'
</span></strong> \c' >> $Resu
((num+=1))
done
cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|
degraded|Definved" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong
class=\"alert\">Failed<\/strong>/g; s/failed/<strong
class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong
class=\"alert\">faulted<\/strong>/g; s/Faulted/<strong
class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong
class=\"alert\">missing<\/strong>/g; s/Missing/<strong
class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong
class=\"alert\">stale<\/strong>/g; s/Stale/<strong
class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong
class=\"alert\">unknown<\/strong>/g; s/Unknown/<strong
class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/Definved/<strong
class=\"alert\">Definved<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|


unknow|degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> error on (Managed by HMC) </a>'
>> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in
chapter 1.'$j' "error on (Managed by HMC)" </a>' >> $Resu
fi
fi
fi

rm -f $tpvar"BusPci_"*
rm -f $tpvar"tbcase_"*
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH060() # Num�ro d execution


{
$debug
#yyyy ModHHH060 oui "Virtual path - vscsi -"
typeset j=$1
typeset TitreModule version
TitreModule="Virtual path - vscsi -"
version=" version 2012-1.3.1 date: 07/01/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH060"
typeset -i col
filtre='vios'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
lspath -HF "name status path_id parent connection" | grep vscsi|sort -u >
$temp"jfp1"
if [ -s $temp"jfp1" ]
then
cat $temp"jfp1" | awk '{print$1}' | sort -u > $temp"jfp2"
cat $temp"jfp1" | awk '{print$4}' | sort -u > $temp"jfp5"
echo '<table cellpadding=2 cellspacing=0 rules=cols bgcolor=#d6d6d8>' >
$temp"jfp9"
#let nbfib=0
for vscsi in $(cat $temp"jfp5")
do
par=$(lsdev -Cl $(lsdev -Cl $vscsi -F parent) -F name)
lscfg -l $par |read xx Location description
lsdev -Cl $par | read xx status xx
coul="#FFFFFF"
echo '<tr><th style=background:#af7036 colspan=5 height="5"></th></tr>'
>> $temp"jfp9"
echo '<tr><td style=background:#faf6ce > </td><th
style=background:'$coul'>status</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#faf6ce"
echo '<tr><td style=background:#faf6ce > '$par' </td><td
style=background:'$coul'>'$status'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
lsattr -El $par -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#f8f0b0"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#FFFFFF"
[[ $col != 1 ]] && echo '<tr><td style=background:#faf6ce >
</td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
[[ $col = 1 ]] && echo '<tr><th style=background:#faf6ce >
</th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
done
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
lscfg -l $vscsi |read xx Location description
lsdev -Cl $vscsi | read xx status addr xx
coul="#FFFFFF"
echo '<tr><td style=background:#fcf9e0 > </td><th
style=background:'$coul'>status</th><th style=background:'$coul'>adresse</th><th
style=background:'$coul'>location</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#fcf9e0"
echo '<tr><td style=background:#fcf9e0 > 'vscsi' </td><td
style=background:'$coul'>'$status'</td><td style=background:'$coul'>'$addr'</td><td
style=background:'$coul'>'$Location'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
lsattr -El $vscsi -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#f8f0b0"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#ffffff"

[[ $col != 1 ]] && echo '<tr><td style=background:#fcf9e0 >


</td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && echo '<tr><th style=background:#fcf9e0 >
</th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul
colspan=2>/g" $temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul
colspan=2>/g" $temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
done
done

echo '<tr><th style=background:#af7036 colspan=10


height="5"></th></tr></table>' >> $temp"jfp9"
for disque in $(cat $temp"jfp2")
do
lscfg -l $disque |read xx Location description
lsdev -Cl $disque | read xx status xx
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8 id="tab'$disque'" style="display: none;">' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=4></th>' >> $temp"jfp9"
coul="#ffffff"
echo '<tr><td style=background:#fcf1e6 width="80"> </td><th
style=background:'$coul'>status</th><th style=background:'$coul'>adresse</th><th
style=background:'$coul'>location</th><th
style=background:'$coul'>description</th></tr>' >> $temp"jfp9"
coul="#fcf8e6"
echo '<tr><td style=background:#fcf1e6 > '$disque' </td><td
style=background:'$coul'>'$status'</td><td style=background:'$coul'>'$addr'</td><td
style=background:'$coul'>'$Location'</td><td
style=background:'$coul'>'$description'</td></tr>' >> $temp"jfp9"
#echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
lsattr -El $disque -O > $temp"jfp7"
let col=0
cat $temp"jfp7" | while read ligne ; do
((col+=1)) ; coul="#fae7d2"
echo $ligne > $temp"jfp8"
[[ $col = 1 ]] && coul="#ffffff"
[[ $col = 1 ]] && echo '<tr><th style=background:#fcf1e6
width="80"> </th><th style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col != 1 ]] && echo '<tr><td style=background:#fcf1e6
width="80"> </td><td style=background:'$coul'>\c' >> $temp"jfp9"
[[ $col = 1 ]] && sed "s/:/<\/th><th style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col = 1 ]] && echo "</th></tr>" >> $temp"jfp9"
[[ $col != 1 ]] && sed "s/:/<\/td><td style=background:$coul>/g"
$temp"jfp8" >> $temp"jfp9"
[[ $col != 1 ]] && echo "</td></tr>" >> $temp"jfp9"
done
echo '</table><table cellpadding=2 cellspacing=0 rules=cols
bgcolor=#d6d6d8>' >> $temp"jfp9"
echo '<tr><td style=background:#f9e3cb width="80"> '$disque'
</td><th style=background:#FFFFFF colspan=6><table><a onclick="javascript:
showinf(document.getElementById('\'''tab''$disque''''\''));" style="cursor:
pointer;"><img src="http://galetiere.fr/aufildeaix/Info/lumiere02.gif"> Clic here
to have other informations</a></table></th></tr>' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=7></th>' >> $temp"jfp9"
echo '<tr><td style=background:#fcf1e6 width="80"> </td><th
style=background:#FFFFFF>name</th><th style=background:#FFFFFF>status</th><th
style=background:#FFFFFF>path_id</th><th style=background:#FFFFFF>parent</th><th
style=background:#FFFFFF>connection</th><th
style=background:#FFFFFF>priority</th></tr>' >> $temp"jfp9"
let col=0
for vscsi in $(cat $temp"jfp1" | grep -w $disque | awk
'{print$4}' | sort -u)
do
coul="#f5eadf"
[[ $col = 1 ]] && coul="#faf5f0"
((col+=1))
[[ $col = 2 ]] && let col=0
infofcs=$(lsdev -Cl $vscsi -F parent)' - '$(lsattr -El $
(lsdev -Cl $vscsi -F parent) -O|grep -v "^#")
infovscsi1=$(lsdev -Cl $vscsi)
infovscsi2=$vscsi' - '$(lsattr -El $vscsi -O |grep -v
"^#")

cat $temp"jfp1" | grep -w $disque | grep -w $vscsi >


$temp"jfp3"
cat $temp"jfp3" |while read disk status path vscsi cnt ; do
echo '<tr><td style=background:#fcf1e6 > </td><td
style=background:'$coul'>'$disk'</td><td style=background:'$coul'>'$status'</td><td
style=background:'$coul'>'$path'</td><td style=background:'$coul'
title="'$infovscsi1 >> $temp"jfp9"
echo ' '$infovscsi2'">'$vscsi'</td><td
style=background:'$coul'>'$cnt'</td><td style=background:'$coul'>'$(lspath -AE -l
$disque -p $vscsi -w $cnt -a priority|awk '{print $2}')'</td></tr>' >> $temp"jfp9"
done

done
echo '<tr><td style=background:#fcf1e6 height="5"></td><th
style=background:#af7036 colspan=7></th>' >> $temp"jfp9"

done
echo '</table>' >> $temp"jfp9"
cat $temp"jfp9" >> $Modu

cat $Modu | grep -iE "Failed|missing|dead|stale|unknow|


degraded|warning" > $temp"jfp77"
if [ -s $temp"jfp77" ]
then
sed "s/Failed/<strong
class=\"alert\">Failed<\/strong>/g; s/failed/<strong
class=\"alert\">failed<\/strong>/g; s/FAILED/<strong
class=\"alert\">FAILED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/faulted/<strong
class=\"alert\">faulted<\/strong>/g; s/Faulted/<strong
class=\"alert\">Faulted<\/strong>/g; s/FAULTED/<strong
class=\"alert\">FAULTED<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/missing/<strong
class=\"alert\">missing<\/strong>/g; s/Missing/<strong
class=\"alert\">Missing<\/strong>/g; s/MISSING/<strong
class=\"alert\">MISSING<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/dead/<strong class=\"alert\">dead<\/strong>/g;
s/Dead/<strong class=\"alert\">Dead<\/strong>/g; s/DEAD/<strong
class=\"alert\">DEAD<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/stale/<strong
class=\"alert\">stale<\/strong>/g; s/Stale/<strong
class=\"alert\">Stale<\/strong>/g; s/STALE/<strong
class=\"alert\">STALE<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/unknown/<strong
class=\"alert\">unknown<\/strong>/g; s/Unknown/<strong
class=\"alert\">Unknown<\/strong>/g; s/UNKNOWN/<strong
class=\"alert\">UNKNOWN<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'
sed "s/degraded/<strong
class=\"alert\">degraded<\/strong>/g; s/Degraded/<strong
class=\"alert\">Degraded<\/strong>/g; s/DEGRADED/<strong
class=\"alert\">DEGRADED<\/strong>/g" $Modu > $temp"jfp78" ; echo '.\c'
sed "s/warning/<strong
class=\"alert\">warning<\/strong>/g; s/Warning/<strong
class=\"alert\">Warning<\/strong>/g; s/WARNING/<strong
class=\"alert\">WARNING<\/strong>/g" $temp"jfp78" > $Modu ; echo '.\c'

cat $Modu | grep -iE "Failed|missing|dead|stale|


unknow|degraded|warning" | while read alert ; do
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> error on (Virtual path - vscsi
-) </a>' >> $temp"jfp88"
done
if [ -s $temp"jfp88" ]
then
echo '<a href="#'${SignetS[$NumNum+1000]}'"
class="alert" title="Go to 1.'$j' '$TitreModule'"> Warning, error messages in
chapter 1.'$j' "error on (Virtual path - vscsi -)" </a>' >> $Resu
fi
fi
fi

rm -f $tpvar"BusPci_"*
rm -f $tpvar"tbcase_"*
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
calculcouleur()
{
typeset -i coul1=252
typeset -i coul2=249
typeset -i coul3=224
typeset -i incr=16
typeset -i Nbcouleur=90
typeset -i coul=1
valcoul[$coul]='#'$(echo 'obase=16 ; ibase=10 ; '$coul1''| bc)$(echo 'obase=16 ;
ibase=10 ; '$coul2''| bc)$(echo 'obase=16 ; ibase=10 ; '$coul3''| bc)
while (( $coul < $Nbcouleur ))
do
((coul+=1))
((coul3-=incr));((coul2-=incr));((coul1-=incr));let coul3=${coul3#-};let
coul1=${coul1#-};let coul2=${coul2#-}
valcoul[$coul]='#'$(echo 'obase=16 ; ibase=10 ; '$coul1''| bc)$(echo
'obase=16 ; ibase=10 ; '$coul2''| bc)$(echo 'obase=16 ; ibase=10 ; '$coul3''| bc)
if (( $coul == 6 ))
then
let coul1=225
let coul2=251
let coul3=239
elif (( $coul == 12 ))
then
let coul1=225
let coul2=242
let coul3=251
elif (( $coul == 18 ))
then
let coul1=255
let coul2=212
let coul3=177
elif (( $coul == 24 ))
then
let coul1=254
let coul2=249
let coul3=178
elif (( $coul == 30 ))
then
let coul1=193
let coul2=253
let coul3=179
elif (( $coul == 36 ))
then
let coul1=180
let coul2=252
let coul3=223
elif (( $coul == 42 ))
then
let coul1=179
let coul2=242
let coul3=253
elif (( $coul == 48 ))
then
let coul1=177
let coul2=218
let coul3=255
elif (( $coul == 54 ))
then
let coul1=185
let coul2=178
let coul3=254
elif (( $coul == 60 ))
then
let coul1=244
let coul2=177
let coul3=255
elif (( $coul == 66 ))
then
let coul1=254
let coul2=178
let coul3=220
fi
done
}
ModHHH061() # Num�ro d execution
{
$debug
#yyyy ModHHH061 oui
typeset j=$1
typeset TitreModule version
TitreModule="HARD memory list"
version=" version 2013-1.4.2 date 20/08/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH061"
filtre='wywyw'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset Adapterdesc[] FRU[] SerialNumber[] ccin[] sizem[] location1[] location2[]
location3[] location4[] location5[] location6[]

lscfg -vp | grep -ip "Size" | tr ' ' '%' > $temp"jfplscfg"
if [ -s $temp"jfplscfg" ]
then
calculcouleur
> $temp"LocPosSize"
> $temp"LocPosFRU"
> $temp"LocPosMem"

cat $temp"jfplscfg" | grep -i "Serial%Number" | tr '.' ' ' | awk '{print$2}' | tr


'%' ' ' > $temp"listeSerialNum"
typeset -i numtotligne
typeset -i numligne=0
for ligne in $(cat $temp"listeSerialNum")
do
((numligne+=1))
FRU[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i FRU | tr '.'
' ' | awk '{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = "none" ] ; then FRU[$numligne]=$(cat
$temp"jfplscfg" | grep -p $ligne | grep -i Part%Number | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi ; fi
SerialNumber[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Serial%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber[$numligne]} > $temp"jfp0" ; SerialNumber[$numligne]=$(cat
$temp"jfp0") ; if [ "${SerialNumber[$numligne]}" = '' ] ; then
SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i Customer
%Card%ID%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
sizem[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i Size | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${sizem[$numligne]} > $temp"jfp0" ;
sizem[$numligne]=$(cat $temp"jfp0") ; if [ "${sizem[$numligne]}" = '' ] ; then
sizem[$numligne]='none' ; fi
location1[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}'
) ; echo ${location1[$numligne]} > $temp"jfp0" ; location1[$numligne]=$(cat
$temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk
'{print$2}') ; echo ${location2[$numligne]} > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk
'{print$3}') ; echo ${location3[$numligne]} > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk
'{print$4}') ; echo ${location4[$numligne]} > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk
'{print$5}') ; echo ${location5[$numligne]} > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
Location | tr ':' ' ' | awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk
'{print$6}') ; echo ${location6[$numligne]} > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = "none" ]
then
location1[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | sed 's/^[.\t]*//' | tr '%' ' ' | tr
'.' 'x'| tr '-' ' ' | awk '{print$1}' | tr 'x' '.' ) ; echo ${location1[$numligne]}
> $temp"jfp0" ; location1[$numligne]=$(cat $temp"jfp0") ; if [ "$
{location1[$numligne]}" = '' ] ; then location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-' ' '
| awk '{print$2}' | tr 'x' '.' ) ; echo ${location2[$numligne]} > $temp"jfp0" ;
location2[$numligne]=$(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ;
then location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-' ' '
| awk '{print$3}' | tr 'x' '.' ) ; echo ${location3[$numligne]} > $temp"jfp0" ;
location3[$numligne]=$(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ;
then location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-' ' '
| awk '{print$4}' | tr 'x' '.' ) ; echo ${location4[$numligne]} > $temp"jfp0" ;
location4[$numligne]=$(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ;
then location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-' ' '
| awk '{print$5}' | tr 'x' '.' ) ; echo ${location5[$numligne]} > $temp"jfp0" ;
location5[$numligne]=$(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ;
then location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"(YL)" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-' ' '
| awk '{print$6}' | tr 'x' '.' ) ; echo ${location6[$numligne]} > $temp"jfp0" ;
location6[$numligne]=$(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ;
then location6[$numligne]='none' ; fi
fi
if [ "${location1[$numligne]}" = "none" ]
then
location1[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$1}' | tr 'x' '.' ) ; echo ${location1[$numligne]} > $temp"jfp0" ;
location1[$numligne]=$(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ;
then location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$2}' | tr 'x' '.' ) ; echo ${location2[$numligne]} > $temp"jfp0" ;
location2[$numligne]=$(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ;
then location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$3}' | tr 'x' '.' ) ; echo ${location3[$numligne]} > $temp"jfp0" ;
location3[$numligne]=$(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ;
then location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$4}' | tr 'x' '.' ) ; echo ${location4[$numligne]} > $temp"jfp0" ;
location4[$numligne]=$(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ;
then location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$5}' | tr 'x' '.' ) ; echo ${location5[$numligne]} > $temp"jfp0" ;
location5[$numligne]=$(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ;
then location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"jfplscfg" | grep -p $ligne | grep -i
"Location" | sed 's/\.\./ /g' | awk '{print$2}' | tr '%' ' ' | tr '.' 'x'| tr '-'
' ' | awk '{print$6}' | tr 'x' '.' ) ; echo ${location6[$numligne]} > $temp"jfp0" ;
location6[$numligne]=$(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ;
then location6[$numligne]='none' ; fi
fi
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""1"
echo ${ccin[$numligne]} >> $temp"ccin""1"
echo ${FRU[$numligne]} >> $temp"FRU""1"
echo ${sizem[$numligne]} >> $temp"sizem""1"
echo ${location1[$numligne]} >> $temp"location1""1"
echo ${location2[$numligne]} >> $temp"location2""1"
echo ${location3[$numligne]} >> $temp"location3""1"
done
let numtotligne=$numligne
let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in ccin FRU sizem location1 location2 location3


do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done
let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-dimm"><tr><td>Memory DIMM :</td><td>'$
{FRU[$numligne]}'</td><td>'${sizem[$numligne]}'</td><td>'$
{SerialNumber[$numligne]}'</td><td>'${ccin[$numligne]}'</td><td><span class="db-
location">'${location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo
'-'${location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo '-'$
{location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo
"<tr><th></th><th>FRU</th><th>Size</th><th>SerialNum</th><th>CCIN</th><th>Physical
Location</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH062() # Num�ro d execution


{
$debug
#yyyy ModHHH062 oui "HARD Available SCSI DISK"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SCSI DISK"
version=" version 2013-1.4.2 date: 23/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH062"
typeset ligne
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[] SerialNumber[]
ccin[] sizem[] location1[] location2[] location3[] location4[] location5[]
location6[] Manufacturer[] Firm[]

lsdev -S A -Cc disk -F name,description | grep -i scsi| tr ' ' '%' | tr ',' ' ' |
awk '{print$1}' > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"typeM""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc disk -F name,description | grep -i scsi | tr ' ' '%' | tr ',' ' ' >
$temp"listeadapt"
lsdev -S A -Cc pdisk -F name,description | grep -i scsi | tr ' ' '%' | tr ',' ' '
>> $temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
VgAssos[$numligne]=$(lspv | grep -w ${NomAdapter[$numligne]} | awk
'{print$3}') ; echo ${VgAssos[$numligne]} > $temp"jfp0" ; VgAssos[$numligne]=$(cat
$temp"jfp0") ; if [ "${VgAssos[$numligne]}" = '' ] ; then VgAssos[$numligne]='none'
; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i "ROS%Level" | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi

echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"


echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${VgAssos[$numligne]} >> $temp"VgAssos""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${ccin[$numligne]} >> $temp"ccin""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
VgAssos2[$numligne2]="${VgAssos[$numligne]}"
FRU2[$numligne2]="none"
SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial
%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin2[$numligne2]} >
$temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin2[$numligne2]}" =
'' ] ; then ccin2[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%'
' ') ; echo ${ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ;
fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm2[$numligne2]=$
(cat $temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%'
' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} > $temp"jfp0" ;
Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" = '' ] ; then
Firm2[$numligne2]='none' ; fi ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${VgAssos2[$numligne2]} >> $temp"VgAssos2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${ccin2[$numligne2]} >> $temp"ccin2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done
let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"Adapterdesc""11" | sort -u > $temp"Adapterdesc""1"
cat $temp"VgAssos""11" | sort -u > $temp"VgAssos""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"SerialNumber""11" | sort -u > $temp"SerialNumber""1"
cat $temp"ccin""11" | sort -u > $temp"ccin""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"Adapterdesc2""11" | sort -u > $temp"Adapterdesc2""1"
cat $temp"VgAssos2""11" | sort -u > $temp"VgAssos2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"SerialNumber2""11" | sort -u > $temp"SerialNumber2""1"
cat $temp"ccin2""11" | sort -u > $temp"ccin2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr VgAssos ccin typeM Manufacturer Firm
location1 location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 NomAdapter2 locaddr2 VgAssos2 ccin2 typeM2 Manufacturer2 Firm2
location12 location22 location32
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-scsidisk"><tr><td>SCSI Disk :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{typeM[$numligne]}'</td><td>'${SerialNumber[$numligne]}'</td><td>'$
{Manufacturer[$numligne]}'</td><td><span class="db-location">'$
{location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo '-'$
{location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})$([[ ${location5[$numligne]} != 'none' ]] && echo '-'$
{location5[$numligne]})$([[ ${location6[$numligne]} != 'none' ]] && echo '-'$
{location6[$numligne]})'</span></td><td>'${Adapterdesc[$numligne]}'</td><td>'$
{VgAssos[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SCSI Disk with FRU </th>' >>
$Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>SCSI Disk :</td><td>'${NomAdapter2[$numligne]}'</td><td>'$
{locaddr2[$numligne]}'</td><td>'${FRU2[$numligne]}'</td><td>'$
{Firm2[$numligne]}'</td><td>'${typeM2[$numligne]}'</td><td>'$
{SerialNumber2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})$([[ ${location52[$numligne]} != 'none' ]] && echo '-'$
{location52[$numligne]})$([[ ${location62[$numligne]} != 'none' ]] && echo '-'$
{location62[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td><td>'$
{VgAssos2[$numligne]}'</td></tr>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SCSI Disk without FRU </th>'
>> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi

echo $j > $Somm


echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH063() # Num�ro d execution
{
$debug
#yyyy ModHHH063 oui "HARD Available SAS DISK"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SAS DISK"
version=" version 2013-1.4.2 date: 23/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH063"
typeset ligne
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[] SerialNumber[]
ccin[] sizem[] location1[] location2[] location3[] location4[] location5[]
location6[] Manufacturer[] Firm[] NetAddr[]

lsdev -S A -Cc disk -F name,description | grep -i sas| tr ' ' '%' | tr ',' ' ' |
awk '{print$1}' > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"typeM""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc disk -F name,description | grep -i sas | tr ' ' '%' | tr ',' ' ' >
$temp"listeadapt"
lsdev -S A -Cc pdisk -F name,description | grep -i sas | tr ' ' '%' | tr ',' ' ' >>
$temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
VgAssos[$numligne]=$(lspv | grep -w ${NomAdapter[$numligne]} | awk
'{print$3}') ; echo ${VgAssos[$numligne]} > $temp"jfp0" ; VgAssos[$numligne]=$(cat
$temp"jfp0") ; if [ "${VgAssos[$numligne]}" = '' ] ; then VgAssos[$numligne]='none'
; fi
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%' '
') ; echo ${ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ;
if [ "${ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
if [ "${Firm[$numligne]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "ROS%Level" | awk '{print$2}' | tr '%' ' ' | sed
's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$(cat
$temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then Firm[$numligne]='none' ;
fi ; fi
if [ "${Firm[$numligne]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%' ' '
| sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$
(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; echo $
{location1[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location1[$numligne]=$
(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; echo $
{location2[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; echo $
{location3[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; echo $
{location4[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; echo $
{location5[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; echo $
{location6[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = 'none' ]
then
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
fi
echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"
echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${VgAssos[$numligne]} >> $temp"VgAssos""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${ccin[$numligne]} >> $temp"ccin""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
VgAssos2[$numligne2]="${VgAssos[$numligne]}"
FRU2[$numligne2]="none"
SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial
%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin2[$numligne2]} >
$temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin2[$numligne2]}" =
'' ] ; then ccin2[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%'
' ') ; echo ${ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ;
fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
if [ "${Firm2[$numligne2]}" = 'none' ] ; then Firm2[$numligne2]=$
(cat $temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%'
' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} > $temp"jfp0" ;
Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" = '' ] ; then
Firm2[$numligne2]='none' ; fi ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; if [ "$
{location12[$numligne2]}" = '' ] ; then location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; if [ "$
{location22[$numligne2]}" = '' ] ; then location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; if [ "$
{location32[$numligne2]}" = '' ] ; then location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; if [ "$
{location42[$numligne2]}" = '' ] ; then location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; if [ "$
{location52[$numligne2]}" = '' ] ; then location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i Location |
awk '{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; if [ "$
{location62[$numligne2]}" = '' ] ; then location62[$numligne2]='none' ; fi
if [ "${location12[$numligne2]}" = 'none' ]
then
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter2[$numligne2]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi
fi
if (( $numligne > 0 )) ; then ((numligne-=1)); fi
echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${VgAssos2[$numligne2]} >> $temp"VgAssos2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${ccin2[$numligne2]} >> $temp"ccin2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done
let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"Adapterdesc""11" | sort -u > $temp"Adapterdesc""1"
cat $temp"VgAssos""11" | sort -u > $temp"VgAssos""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"SerialNumber""11" | sort -u > $temp"SerialNumber""1"
cat $temp"ccin""11" | sort -u > $temp"ccin""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"Adapterdesc2""11" | sort -u > $temp"Adapterdesc2""1"
cat $temp"VgAssos2""11" | sort -u > $temp"VgAssos2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"SerialNumber2""11" | sort -u > $temp"SerialNumber2""1"
cat $temp"ccin2""11" | sort -u > $temp"ccin2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
for typeinfo in Adapterdesc SerialNumber
do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr VgAssos ccin typeM Manufacturer Firm
location1 location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 NomAdapter2 locaddr2 VgAssos2 ccin2 typeM2 Manufacturer2 Firm2
location12 location22 location32
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done
let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-sasdisk"><tr><td>SAS Disk :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{typeM[$numligne]}'</td><td>'${SerialNumber[$numligne]}'</td><td>'$
{Manufacturer[$numligne]}'</td><td><span class="db-location">'$
{location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo '-'$
{location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})'</span></td><td>'${Adapterdesc[$numligne]}'</td><td>'$
{VgAssos[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SAS Disk with FRU </th>' >>
$Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>SAS Disk :</td><td>'${NomAdapter2[$numligne]}'</td><td>'$
{locaddr2[$numligne]}'</td><td>'${FRU2[$numligne]}'</td><td>'$
{Firm2[$numligne]}'</td><td>'${typeM2[$numligne]}'</td><td>'$
{SerialNumber2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td><td>'$
{VgAssos2[$numligne]}'</td></tr>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SAS Disk without FRU </th>'
>> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}
ModHHH064() # Num�ro d execution
{
$debug
#yyyy ModHHH064 oui "HARD Available SSA DISK"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SSA DISK"
version=" version 2013-1.4.2 date: 24/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH064"
typeset ligne
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[] SerialNumber[]
ccin[] sizem[] location1[] location2[] location3[] location4[] location5[]
location6[] Manufacturer[] Firm[] NetAddr[]

lsdev -S A -Cc disk -F name,description | grep -v siss | grep -i ssa| tr ' ' '%' |
tr ',' ' ' | awk '{print$1}' > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"typeM""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc disk -F name,description | grep -vi "virtual" | grep -v siss | grep
-i ssa | tr ' ' '%' | tr ',' ' ' > $temp"listeadapt"
lsdev -S A -Cc pdisk -F name,description | grep -vi "virtual" | grep -v siss | grep
-i ssa | tr ' ' '%' | tr ',' ' ' >> $temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
VgAssos[$numligne]=$(lspv | grep -w ${NomAdapter[$numligne]} | awk
'{print$3}') ; echo ${VgAssos[$numligne]} > $temp"jfp0" ; VgAssos[$numligne]=$(cat
$temp"jfp0") ; if [ "${VgAssos[$numligne]}" = '' ] ; then VgAssos[$numligne]='none'
; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
#NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} >
$temp"jfp0" ; NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}"
= '' ] ; then NetAddr[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i "ROS%Level" | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi

echo ${NomAdapter[$numligne]} >> $temp"NomAdapter""11"


echo ${locaddr[$numligne]} >> $temp"locaddr""11"
echo ${Adapterdesc[$numligne]} >> $temp"Adapterdesc""11"
echo ${VgAssos[$numligne]} >> $temp"VgAssos""11"
echo ${SerialNumber[$numligne]} >> $temp"SerialNumber""11"
echo ${typeM[$numligne]} >> $temp"typeM""11"
echo ${Manufacturer[$numligne]} >> $temp"Manufacturer""11"
echo ${FRU[$numligne]} >> $temp"FRU""11"
echo ${Firm[$numligne]} >> $temp"Firm""11"
echo ${location1[$numligne]} >> $temp"location1""11"
echo ${location2[$numligne]} >> $temp"location2""11"
echo ${location3[$numligne]} >> $temp"location3""11"
else
((numligne2+=1))
NomAdapter2[$numligne2]="${NomAdapter[$numligne]}"
Adapterdesc2[$numligne2]="${Adapterdesc[$numligne]}"
locaddr2[$numligne2]="${locaddr[$numligne]}"
VgAssos2[$numligne2]="${VgAssos[$numligne]}"
FRU2[$numligne2]="none"
SerialNumber2[$numligne2]=$(cat $temp"adapter" | grep -i "Serial
%Number" | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{SerialNumber2[$numligne2]} > $temp"jfp0" ; SerialNumber2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${SerialNumber2[$numligne2]}" = '' ] ; then
SerialNumber2[$numligne2]='none' ; fi
ccin2[$numligne2]=$(cat $temp"adapter" | grep -i Customer%Card%ID
%Number | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne2]} >
$temp"jfp0" ; ccin[$numligne2]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne2]}" = ''
] ; then ccin[$numligne2]='none' ; fi
if [ "${ccin2[$numligne2]}" = 'none' ] ; then ccin2[$numligne2]=$
(cat $temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin2[$numligne2]} > $temp"jfp0" ; ccin2[$numligne2]=$(cat $temp"jfp0") ; if [ "$
{ccin2[$numligne2]}" = '' ] ; then ccin2[$numligne2]='none' ; fi ; fi
if (( $(echo "${ccin2[$numligne2]}" | wc -c) > 5 )) ; then
ccin2[$numligne2]="none" ; fi
typeM2[$numligne2]=$(cat $temp"adapter" | grep -i Machine%Type
%and%Model | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{typeM2[$numligne2]} > $temp"jfp0" ; typeM2[$numligne2]=$(cat $temp"jfp0") ; if
[ "${typeM2[$numligne2]}" = '' ] ; then typeM2[$numligne2]='none' ; fi
Manufacturer2[$numligne2]=$(cat $temp"adapter" | grep -i
Manufacture | tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo $
{Manufacturer2[$numligne2]} > $temp"jfp0" ; Manufacturer2[$numligne2]=$(cat
$temp"jfp0") ; if [ "${Manufacturer2[$numligne2]}" = '' ] ; then
Manufacturer2[$numligne2]='none' ; fi
Firm2[$numligne2]=$(cat $temp"adapter" | grep -i "ROS%Level" |
awk '{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm2[$numligne2]} >
$temp"jfp0" ; Firm2[$numligne2]=$(cat $temp"jfp0") ; if [ "${Firm2[$numligne2]}" =
'' ] ; then Firm2[$numligne2]='none' ; fi
location12[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location12[$numligne2]}" = '' ] ; then
location12[$numligne2]='none' ; fi
location22[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location22[$numligne2]}" = '' ] ; then
location22[$numligne2]='none' ; fi
location32[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location32[$numligne2]}" = '' ] ; then
location32[$numligne2]='none' ; fi
location42[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$4}') ; if [ "${location42[$numligne2]}" = '' ] ; then
location42[$numligne2]='none' ; fi
location52[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$5}') ; if [ "${location52[$numligne2]}" = '' ] ; then
location52[$numligne2]='none' ; fi
location62[$numligne2]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$6}') ; if [ "${location62[$numligne2]}" = '' ] ; then
location62[$numligne2]='none' ; fi

if (( $numligne > 0 )) ; then ((numligne-=1)); fi


echo ${NomAdapter2[$numligne2]} >> $temp"NomAdapter2""11"
echo ${locaddr2[$numligne2]} >> $temp"locaddr2""11"
echo ${Adapterdesc2[$numligne2]} >> $temp"Adapterdesc2""11"
echo ${VgAssos2[$numligne2]} >> $temp"VgAssos2""11"
echo ${SerialNumber2[$numligne2]} >> $temp"SerialNumber2""11"
echo ${typeM2[$numligne2]} >> $temp"typeM2""11"
echo ${Manufacturer2[$numligne2]} >> $temp"Manufacturer2""11"
echo ${FRU2[$numligne2]} >> $temp"FRU2""11"
echo ${Firm2[$numligne2]} >> $temp"Firm2""11"
echo ${location12[$numligne2]} >> $temp"location12""11"
echo ${location22[$numligne2]} >> $temp"location22""11"
echo ${location32[$numligne2]} >> $temp"location32""11"
if [ "${NomAdapter2[$numligne2]}" = '' ] ; then if (( $numligne2
> 0 )) ; then ((numligne2-=1)); fi ; fi
fi
done
let numtotligne=$numligne
let numtotligne2=$numligne2
cat $temp"NomAdapter""11" | sort -u > $temp"NomAdapter""1"
cat $temp"locaddr""11" | sort -u > $temp"locaddr""1"
cat $temp"VgAssos""11" | sort -u > $temp"VgAssos""1"
cat $temp"typeM""11" | sort -u > $temp"typeM""1"
cat $temp"Manufacturer""11" | sort -u > $temp"Manufacturer""1"
cat $temp"FRU""11" | sort -u > $temp"FRU""1"
cat $temp"Firm""11" | sort -u > $temp"Firm""1"
cat $temp"location1""11" | sort -u > $temp"location1""1"
cat $temp"location2""11" | sort -u > $temp"location2""1"
cat $temp"location3""11" | sort -u > $temp"location3""1"

cat $temp"NomAdapter2""11" | sort -u > $temp"NomAdapter2""1"


cat $temp"locaddr2""11" | sort -u > $temp"locaddr2""1"
cat $temp"VgAssos2""11" | sort -u > $temp"VgAssos2""1"
cat $temp"typeM2""11" | sort -u > $temp"typeM2""1"
cat $temp"Manufacturer2""11" | sort -u > $temp"Manufacturer2""1"
cat $temp"FRU2""11" | sort -u > $temp"FRU2""1"
cat $temp"Firm2""11" | sort -u > $temp"Firm2""1"
cat $temp"location12""11" | sort -u > $temp"location12""1"
cat $temp"location22""11" | sort -u > $temp"location22""1"
cat $temp"location32""11" | sort -u > $temp"location32""1"

let numligne=1
while (( $numligne <= $numtotligne ))
do
if [ ${location1[$numligne]} != "none" ]
then
echo ${ccin[$numligne]}' '${FRU[$numligne]}' '$
{location1[$numligne]}'-'${location2[$numligne]}'-'${location3[$numligne]}'-'$
{location4[$numligne]}'-'${location5[$numligne]}'-'${location6[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
if [ ${location12[$numligne]} != "none" ]
then
echo ${ccin2[$numligne]}' '${FRU2[$numligne]}' '$
{location12[$numligne]}'-'${location22[$numligne]}'-'${location32[$numligne]}'-'$
{location42[$numligne]}'-'${location52[$numligne]}'-'${location62[$numligne]} >>
$tpsort"HARDLoc"
fi
((numligne+=1))
done

for typeinfo in Adapterdesc SerialNumber


do
echo '.\c'
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \${$typeinfo[$numligne]})
if [ "${valinfo[$numligne]}" != "none" ] ; then valinfo[$numligne]='<a
class="db-'$typeinfo'">'${valinfo[$numligne]}'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
done

for typeinfo in FRU NomAdapter locaddr VgAssos typeM Manufacturer Firm location1
location2 location3
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a class="db-'$typeinfo'" style=background:'$
{valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

for typeinfo in FRU2 Nom2 locaddr2 VgAssos2 typeM2 Manufacturer2 Firm2 location12
location22 location32
do
echo '.\c'
let coulc=1
let coulf=13
let contr=1
cat $temp$typeinfo"1" | while read mot ; do
if [ "$mot" != "none" ]
then
if (( $contr == 1 )) ; then
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulc]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulc+=1)) ; let contr=2
else
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
valinfo[$numligne]=$(eval echo \$
{$typeinfo[$numligne]})
if [ "$mot" = "${valinfo[$numligne]}" ] ; then
valinfo[$numligne]='<a style=background:'${valcoul[$coulf]}'>'$mot'</a>' ; fi
eval "$typeinfo[$numligne]"="\${valinfo[$numligne]}"
((numligne+=1))
done
((coulf+=1)) ; let contr=1
fi
fi
done
done

let numligne=1
while (( $numligne <= $numtotligne ))
do
echo '<span class="db-ssadisk"><tr><td>SSA Disk :</td><td>'$
{NomAdapter[$numligne]}'</td><td>'${locaddr[$numligne]}'</td><td>'$
{FRU[$numligne]}'</td><td>'${Firm[$numligne]}'</td><td>'$
{typeM[$numligne]}'</td><td>'${SerialNumber[$numligne]}'</td><td>'$
{Manufacturer[$numligne]}'</td><td><span class="db-location">'$
{location1[$numligne]}$([[ ${location2[$numligne]} != 'none' ]] && echo '-'$
{location2[$numligne]})$([[ ${location3[$numligne]} != 'none' ]] && echo '-'$
{location3[$numligne]})$([[ ${location4[$numligne]} != 'none' ]] && echo '-'$
{location4[$numligne]})'</span></td><td>'${Adapterdesc[$numligne]}'</td><td>'$
{VgAssos[$numligne]}'</td></tr></span>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SSA Disk with FRU </th>' >>
$Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
>$temp"LocPosMem1"
>$temp"LocPosMem12"
let numligne=1
while (( $numligne <= $numtotligne2 ))
do
echo '<tr><td>SSA Disk :</td><td>'${NomAdapter2[$numligne]}'</td><td>'$
{locaddr2[$numligne]}'</td><td>'${FRU2[$numligne]}'</td><td>'$
{Firm2[$numligne]}'</td><td>'${typeM2[$numligne]}'</td><td>'$
{SerialNumber2[$numligne]}'</td><td>'${Manufacturer2[$numligne]}'</td><td>'$
{location12[$numligne]}$([[ ${location22[$numligne]} != 'none' ]] && echo '-'$
{location22[$numligne]})$([[ ${location32[$numligne]} != 'none' ]] && echo '-'$
{location32[$numligne]})$([[ ${location42[$numligne]} != 'none' ]] && echo '-'$
{location42[$numligne]})'</td><td>'${Adapterdesc2[$numligne]}'</td><td>'$
{VgAssos2[$numligne]}'</td></tr>' >> $temp"LocPosMem1"
((numligne+=1))
done
if [ -s $temp"LocPosMem1" ]
then
echo '<table>' >> $Modu
echo '<tr><th></th><th colspan=4> SSA Disk without FRU </th>'
>> $Modu
echo
"<tr><th></th><th>Name</th><th>LocAddr</th><th>FRU</th><th>Firmware</th><th>TypeMod
el</th><th>SerialNum</th><th>manufacturer</th><th>Physical
Location</th><th>Description</th><th>VG associated</th></tr>" >> $Modu
cat $temp"LocPosMem1" >> $Modu
echo '</table>' >> $Modu
fi
fi
echo $j > $Somm
echo $TitreModule >> $Somm
rm -f $tpvar$j$NomMod"jfp"*
return $a
else
TitreMod=$TitreModule" "$version
fi
}

ModHHH065() # Num�ro d execution


{
$debug
#yyyy ModHHH065 oui 9 "HARD Available SAS Adapter"
typeset j=$1
typeset TitreModule version
TitreModule="HARD Available SAS Adapter"
version=" version 2013-1.4.2 date: 27/09/2013"
if [[ $j != "conf" ]]
then
typeset temp NomMod filtre
typeset -i a=0
NomMod="HHH065"
typeset ligne
filtre='disk'
temp=$tpvar$j$NomMod"jfp"
Somm=$tpsort"Som"$NomMod
Modu=$tpsort"Mod"$NomMod
Resu=$tpsort"Res"$NomMod
>$temp"jfp1"
>$Modu
>$Somm
echo $NomMod' '$TitreModule >> $tpsort"ListeTitreMS"
NomMd[$NumNum+1000]="Mod"$NomMod
TitreS[$NumNum+1000]=$TitreModule
NumS[$NumNum+1000]=$j
SignetS[$NumNum+1000]="titre"$NomMod
listlien[$NumNum+1000]=$(cat $tpsort"listedelien" | grep $filtre | read wwww
xxxx listL ; echo $listL)
# --- Calcul du module
typeset NomAdapter[] Adapterdesc[] locaddr[] VgAssos[] typeM[] FRU[] SerialNumber[]
ccin[] sizem[] location1[] location2[] location3[] location4[] location5[]
location6[] Manufacturer[] Firm[] NetAddr[]

lsdev -S A -Cc adapter -F name,description | grep -i sas| tr ' ' '%' | tr ',' ' ' |
awk '{print$1}' > $temp"listeadapt"
if [ -s $temp"listeadapt" ]
then
calculcouleur
> $temp"NomAdapter"
> $temp"Adapterdesc""1"
> $temp"SerialNumber""1"
> $temp"ccin""1"
> $temp"Manufacturer""1"
> $temp"FRU""1"
> $temp"NetAddr""1"
> $temp"Firm""1"
> $temp"location1""1"
> $temp"location2""1"
> $temp"location3""1"
lsdev -S A -Cc adapter -F name,description | grep -i sas | tr ' ' '%' | tr ',' ' '
> $temp"listeadapt"
typeset -i numtotligne numligne1 numtotligne2 numligne2 numligne
let numligne1=0
let numligne=0
let numligne2=0
cat $temp"listeadapt" | while read ligne ; do
((numligne+=1))
NomAdapter[$numligne]=$(echo $ligne| awk '{print$1}') ; echo $
{NomAdapter[$numligne]} > $temp"jfp0" ; NomAdapter[$numligne]=$(cat $temp"jfp0") ;
if [ "${NomAdapter[$numligne]}" = '' ] ; then NomAdapter[$numligne]='none' ; fi
Adapterdesc[$numligne]=$(echo $ligne| awk '{print$2}' | tr '%' ' ') ; echo $
{Adapterdesc[$numligne]} > $temp"jfp0" ; Adapterdesc[$numligne]=$(cat
$temp"jfp0") ; if [ "${Adapterdesc[$numligne]}" = '' ] ; then
Adapterdesc[$numligne]='none' ; fi
locaddr[$numligne]=$(lsdev -Cl ${NomAdapter[$numligne]} -F location) ; echo $
{locaddr[$numligne]} > $temp"jfp0" ; locaddr[$numligne]=$(cat $temp"jfp0") ; if
[ "${locaddr[$numligne]}" = '' ] ; then locaddr[$numligne]='none' ; fi
lscfg -vpl ${NomAdapter[$numligne]} | tr ' ' '%' | sed 's/\.\./ /g' >
$temp"adapter"
FRU[$numligne]=$(cat $temp"adapter" | grep -i FRU | tr '.' ' ' | awk
'{print$2}' | tr '%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ;
FRU[$numligne]=$(cat $temp"jfp0") ; if [ "${FRU[$numligne]}" = '' ] ; then
FRU[$numligne]='none' ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Part%Number | awk '{print$2}' | sed 's/^[\.\t]//g' | tr
'%' ' ') ; echo ${FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0")
; if [ "${FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" = 'none' ] ; then FRU[$numligne]=$(cat
$temp"adapter" | grep -i Z3 | awk '{print$2}' | tr '%' ' ') ; echo $
{FRU[$numligne]} > $temp"jfp0" ; FRU[$numligne]=$(cat $temp"jfp0") ; if [ "$
{FRU[$numligne]}" = '' ] ; then FRU[$numligne]='none' ; fi ; fi
if [ "${FRU[$numligne]}" != 'none' ]
then
SerialNumber[$numligne]=$(cat $temp"adapter" | grep -i "Serial%Number"
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${SerialNumber[$numligne]} >
$temp"jfp0" ; SerialNumber[$numligne]=$(cat $temp"jfp0") ; if [ "$
{SerialNumber[$numligne]}" = '' ] ; then SerialNumber[$numligne]='none' ; fi
ccin[$numligne]=$(cat $temp"adapter" | grep -i Customer%Card%ID%Number
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${ccin[$numligne]} >
$temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "${ccin[$numligne]}" = '' ]
; then ccin[$numligne]='none' ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Marketing%ID | tr '.' ' ' | awk '{print$2}' | tr '%' '
') ; echo ${ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ;
if [ "${ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if [ "${ccin[$numligne]}" = 'none' ] ; then ccin[$numligne]=$(cat
$temp"adapter" | grep -i Z0 | awk '{print$2}' | tr '%' ' ') ; echo $
{ccin[$numligne]} > $temp"jfp0" ; ccin[$numligne]=$(cat $temp"jfp0") ; if [ "$
{ccin[$numligne]}" = '' ] ; then ccin[$numligne]='none' ; fi ; fi
if (( $(echo "${ccin[$numligne]}" | wc -c) > 5 )) ; then
ccin[$numligne]="none" ; fi
Manufacturer[$numligne]=$(cat $temp"adapter" | grep -i Manufacture | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${Manufacturer[$numligne]} >
$temp"jfp0" ; Manufacturer[$numligne]=$(cat $temp"jfp0") ; if [ "$
{Manufacturer[$numligne]}" = '' ] ; then Manufacturer[$numligne]='none' ; fi
NetAddr[$numligne]=$(cat $temp"adapter" | grep -i Network%Address | tr
'.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${NetAddr[$numligne]} >
$temp"jfp0" ; NetAddr[$numligne]=$(cat $temp"jfp0") ; if [ "${NetAddr[$numligne]}"
= '' ] ; then NetAddr[$numligne]='none' ; fi
typeM[$numligne]=$(cat $temp"adapter" | grep -i Machine%Type%and%Model
| tr '.' ' ' | awk '{print$2}' | tr '%' ' ') ; echo ${typeM[$numligne]} >
$temp"jfp0" ; typeM[$numligne]=$(cat $temp"jfp0") ; if [ "${typeM[$numligne]}" = ''
] ; then typeM[$numligne]='none' ; fi
Firm[$numligne]=$(cat $temp"adapter" | grep -i alterable | awk
'{print$2}' | tr '%' ' ' | sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} >
$temp"jfp0" ; Firm[$numligne]=$(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ]
; then Firm[$numligne]='none' ; fi
if [ "${Firm[$numligne]}" = 'none' ] ; then Firm[$numligne]=$(cat
$temp"adapter" | grep -i "Loadable%Microcode%Level" | awk '{print$2}' | tr '%' ' '
| sed 's/^[\.\t]//g') ; echo ${Firm[$numligne]} > $temp"jfp0" ; Firm[$numligne]=$
(cat $temp"jfp0") ; if [ "${Firm[$numligne]}" = '' ] ; then
Firm[$numligne]='none' ; fi ; fi
location1[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$1}') ; echo $
{location1[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location1[$numligne]=$
(cat $temp"jfp0") ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$2}') ; echo $
{location2[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location2[$numligne]=$
(cat $temp"jfp0") ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$3}') ; echo $
{location3[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location3[$numligne]=$
(cat $temp"jfp0") ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$4}') ; echo $
{location4[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location4[$numligne]=$
(cat $temp"jfp0") ; if [ "${location4[$numligne]}" = '' ] ; then
location4[$numligne]='none' ; fi
location5[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$5}') ; echo $
{location5[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location5[$numligne]=$
(cat $temp"jfp0") ; if [ "${location5[$numligne]}" = '' ] ; then
location5[$numligne]='none' ; fi
location6[$numligne]=$(cat $temp"adapter" | grep -i Location | awk
'{print$2}' | tr '%' ' ' | tr '-' ' ' | awk '{print$6}') ; echo $
{location6[$numligne]} | awk '{print$1}' > $temp"jfp0" ; location6[$numligne]=$
(cat $temp"jfp0") ; if [ "${location6[$numligne]}" = '' ] ; then
location6[$numligne]='none' ; fi
if [ "${location1[$numligne]}" = 'none' ]
then
location1[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$1}') ; if [ "${location1[$numligne]}" = '' ] ; then
location1[$numligne]='none' ; fi
location2[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$2}') ; if [ "${location2[$numligne]}" = '' ] ; then
location2[$numligne]='none' ; fi
location3[$numligne]=$(cat $temp"adapter" | grep -i $
{NomAdapter[$numligne]} | tr '%' ' ' | awk '{print$2}' | tr '-' ' ' | awk
'{print$3}') ; if [ "${location3[$numligne]}" = '' ] ; then
location3[$numligne]='none' ; fi
location4[$numligne]=$(cat $temp"adapte