(Sed: Remove The Header Info Like Client & - ) Ex: Client - Audtnt02 Ausvmacnba07 Script: For Loop
(Sed: Remove The Header Info Like Client & - ) Ex: Client - Audtnt02 Ausvmacnba07 Script: For Loop
(Sed: Remove The Header Info Like Client & - ) Ex: Client - Audtnt02 Ausvmacnba07 Script: For Loop
------------------------------------------------------------------------------------------------------------
bppllist >/tmp/PaRaS
for i in `cat /tmp/PaRaS`
do
k=`bppllist $i -L | grep Active | awk '{ print $2 }'`
if [ "$k" == "yes" ]
then
echo "$i policy is Active " >>/tmp/PaRaS1
else
echo " $i policy is Deactive" >>/tmp/PaRaS2
fi
done
M=`cat /tmp/PaRaS1 | wc -l`
echo "below shows the $M active policies"
sleep 10
cat /tmp/PaRaS1
N=`cat /tmp/PaRaS2 | wc -l`
echo "below shows the $N deactive policies"
sleep 10
cat /tmp/PaRaS2
rm /tmp/PaRaS /tmp/PaRaS1 /tmp/PaRaS2
------------------------------------------------------------------------------------------------------------
cscmanaus003(root):# vi test
"test" 2 lines, 44 characters
bpplclients |awk '{print $3}' >/tmp/test1
sed '1,2d' /tmp/test1 >/tmp/test2
(sed : remove the header info like Client & -------)
Ex: Client
--------------
audtnt02
ausvmacnba07
------------------------------------------------------------------------------------------------------------
Script : for loop
cscmanaus003(root):# more test1
for i in `cat /tmp/test`
do
vmchange -p 4 -m $i
done
------------------------------------------------------------------------------------------------------------
duplicate|grep -v restore|awk -F\, '{print $NF}' |awk '{l = l + $3} {j = j + $5}{k = k + 1} END
{print "'"$i"'",l,j/k}'; done
motmas1 0 0
motmed1 13632577307 69697.2
motmed2 28468392731 34072.1
motmed3 19698648604 17457.4
motmed4 17427685858 22172.3
motmed5 15946925497 12048.7
motmed6 19037189022 14719.8
motmed7 17675250160 53308.5
It gives the media server name , Total amount of data backed up(in KB). Average speed of the
backup(in KB).
------------------------------------------------------------------------------------------------------------
/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -s info -d 06/27/07 –client
cscpapcbly401 |grep -v "(timed out connecting to client)" (it gives the out put
without printing the line “timed out….”)