#!/bin/ksh

# for sprint

cs_list="`cat /etc/opt/p7install/servers.conf`"
wst_list="`list_processors -w  | sort | grep -v m7wnmc1 |grep -v m7sstrw4 |grep -v m7acc7w2`"
rsp_list="`list_processors -s | sort | grep -v m010` "
dsp_list="`list_processors -d | sort` "

clear

function check_cs {
echo "CS"

print "95208  MP609  p7startd   Want: gf05_p7startd.sh Platform7_IQ00286801 Thu 18 Jan 2007  "
for f in $cs_list
do
     print -n "$f "
     remsh $f -n what   /opt/platform7/lbin/p7startd |grep gf05| /usr/bin/awk '{printf ("%s %s %s %s %s %s\n", $1,  $2, $3, $4, $5, $6) }'
done
echo

print "96262  MP609  m30.run   Want:  a7TrafMon_M609_C.04.11.00005 Thu 21 Sep 2006  "
for f in $cs_list
do
     print -n "$f "
     remsh $f -n what    /opt/a7trafmon/lbin/m30.run | grep 609 |/usr/bin/awk '{printf ("%s %s %s %s %s \n", $2, $3, $4, $5, $6) }'
done
echo

print "96555b  MP609 libETRDataModel_pa32-hpux.0   Want: Platform7_M609_C.08.11.00005 Thu 21 Sep 2006"
for f in $cs_list
do
     print -n "$f "
     remsh $f -n what /opt/platform7/lib/libETRDataModel_pa32-hpux.0 |grep 609 | /usr/bin/awk '{printf ("%s %s %s %s %s \n", $2, $3, $4, $5, $6) }'
done
echo


} #check_cs

function check_wst {
echo 
echo "WST"

print "96242c  MP609  decode_TIA-EIA.V1.ALI_pa32-hpux.sl  Want: decode_TIA-EIA.V1.ALI_pa32-hpux.sl Fri 16 Feb 2007 C.08.14.00005.IQ00287600.1 "
for f in $wst_list
do
     print -n "$f "
     remsh $f -n what /opt/a7protocols/MNLS_08.14/lib/userDecodes/decode_TIA-EIA.V1.ALI_pa32-hpux.sl |grep Protocol |/usr/bin/awk '{printf ("%s %s %s %s %s %s\n", $1,  $2, $3, $4, $5, $NF) }'
done
echo

print "96555a  MP609 libETRDataModel_pa32-hpux.0   Want: Platform7_M609_C.08.11.00005 Thu 21 Sep 2006"
for f in $wst_list
do
     print -n "$f "
     remsh $f -n what /opt/platform7/lib/libETRDataModel_pa32-hpux.0 |grep 609 | /usr/bin/awk '{printf ("%s %s %s %s %s \n", $2, $3, $4, $5, $6) }'
done
echo

print "91974   CT_printApplication   MP609   Want: 92453-07 linker linker crt0.o B.11.33 "
for f in $wst_list
do
     print -n "$f "
     remsh $f -n what /opt/a7trblshoot/lbin/printApplication/printApplication |grep linker  |awk '{print $2 " " $3 " "$4 " "$5" "$6" "}'
done
echo

print "91972  MP609  libgau_pa32-hpux.0  Want: Platform7_M609_IQ00283680_C.08.11.00001 Thu 19 Oct 2006 "
for f in $wst_list
do
     print -n "$f "
     remsh $f -n what  /opt/platform7/lib/libgau_pa32-hpux.0 |grep 609 | /usr/bin/awk '{printf ("%s %s %s %s %s %s\n", $1,  $2, $3, $4, $5, $6) }'
done
echo

print "94519  multiple_BPP_reboots  SA.run  MP609   Want: Platform7_C.08.10_M609_IQ00287143_hotfix Fri 02 Mar 2007"
for f in $wst_list
do
     print -n "$f "
     remsh $f -n what /opt/platform7/lbin/SA.run | grep 609  |awk '{print $2 " " $3 " "$4 " "$5" "$6" "}'
done
echo

##print "96242  MP609  libsdf_mt_pa32-hpux.0  Want: MT_DERIVED/libsdf_mt_pa32-hpux.0 Fri 16 Feb 2007   "
#for f in $wst_list
#do
#     print -n "$f "
#     remsh $f -n what  /opt/a7protocols/lib/libsdf_mt_pa32-hpux.0 | grep MT_DERIVED |/usr/bin/awk '{printf ("%s %s %s %s %s\n", $1,  $2, $3, $4, $5) }'
#done
#echo

#print "96242  MP609  libsdf_pa32-hpux.0  Want: DERIVED/libsdf_pa32-hpux.0 Fri 16 Feb 2007 C.08.19.00001.IQ00287600.1  "
#for f in $wst_list
#do
#     print -n "$f "
#     remsh $f -n what  /opt/a7protocols/lib/libsdf_pa32-hpux.0 |grep DERIV  |/usr/bin/awk '{printf ("%s %s %s %s %s %s\n", $1,  $2, $3, $4, $5, $NF) }'
#done
#echo
#
#
#print "96242  MP609  decode_TIA-EIA.V1.ALI_pa32-hpux.sl  Want: Fri 16 Feb 2007 MNLS Protocol Release C.08.14.00005.IQ00287600.1 "
#for f in $wst_list
#do
#     print -n "$f "
#     remsh $f -n what /opt/a7protocols/MNLS_08.14/lib/userDecodes/decode_TIA-EIA.V1.ALI_pa32-hpux.sl  | grep Protocol |/usr/bin/awk '{printf ("%s %s %s %s %s %s %s %s\n", $2, $3, $4, $5, $6, $7, $8, $9) }'
#done
#echo

} # check_wsts

function check_rsp {
echo "RSP"

print "93176  acqp_j6739a   Want: FWixp_A.01.10.00006 Wed Jan 24 16:50:14 GMT "
for f in $rsp_list
do
     print -n "$f "
     remsh $f -n what  /home/tftpdir/opt/platform7/lbin/acqp_j6739a | tail -1 | /usr/bin/awk '{printf ("%s %s %s %s %s %s\n", $1,  $2, $3, $4, $5, $6) }'
done
echo


} #check_rsps

#check_cs;
#check_wst;
check_rsp;
#check_dsp;

