10-19-2013 05:30 AM
Here is a single command the dumps all active clients from a Linux Master Sever.
bppllist -L -allpolicies | egrep "^Policy Name:|^Active:" | paste - - | awk '$NF~yes { print $3 }' | xargs -i bpplclients {} -noheader 2> /dev/null | awk '{ print $3 }'
It does the following
-- OR --
Run this script for a little prettier output of the same thing:
Sample ::
##### DenverWebservers #####
bubbles
nerf
billybong
##### DenverDatbases #####
spaceman
nerf
kooliba
for POLICY in ` bppllist -L -allpolicies | egrep "^Policy Name:|^Active:" | paste - - | awk '$NF~yes { print $3 }'`; do
echo "#### $POLICY ###"
bpplclients $POLICY -noheader 2> /dev/null | awk '{ printf "%30s\n", $3 }'
echo " "
done
----
Solved! Go to Solution.
10-19-2013 05:32 AM
It's probably more useful if you sort the output:
bppllist -L -allpolicies | egrep "^Policy Name:|^Active:" | paste - - | awk '$NF~yes { print $3 }' | xargs -i bpplclients {} -noheader 2> /dev/null | awk '{ print $3 }' | sort -u
10-19-2013 05:32 AM
It's probably more useful if you sort the output:
bppllist -L -allpolicies | egrep "^Policy Name:|^Active:" | paste - - | awk '$NF~yes { print $3 }' | xargs -i bpplclients {} -noheader 2> /dev/null | awk '{ print $3 }' | sort -u
12-25-2018 01:19 AM
Its not giving any output