It shouldn't be that hard, take the above earlier example & direct it to a file.
Police it and then use a find/replace and append the "diag sys checkused firewall.address.name " to each line
e.g
echo -e "config vdom\n edit root\n show firewall address | grep edit " | ssh 11.1.1.6 | awk '{ print $2 }' > file
vi the file and add the diag sys checkused and the grep statement you want.
Now build a bulk script and run that back thru a ssh sesson
for A in ` cat file ` ;
do echo "diag sys checkused firewall.address.name $A ";
done
Your file would look like this ( example ) before we apply the pipe and grep strings
diag sys checkused firewall.address.name "10.11.1.22" diag sys checkused firewall.address.name "10.11.1.23" diag sys checkused firewall.address.name "10.11.1.24" diag sys checkused firewall.address.name "10.11.1.25" diag sys checkused firewall.address.name "10.11.1.26" diag sys checkused firewall.address.name "10.11.1.27" diag sys checkused firewall.address.name "10.11.1.28" diag sys checkused firewall.address.name "10.11.1.29" diag sys checkused firewall.address.name "10.11.1.30" diag sys checkused firewall.address.name "10.11.1.41" diag sys checkused firewall.address.name "10.11.1.42" diag sys checkused firewall.address.name "10.11.1.46" diag sys checkused firewall.address.name "10.11.1.47" diag sys checkused firewall.address.name "10.11.1.48" diag sys checkused firewall.address.name "10.11.1.49" diag sys checkused firewall.address.name "10.11.1.50" diag sys checkused firewall.address.name "10.11.1.51" diag sys checkused firewall.address.name "10.11.1.52" diag sys checkused firewall.address.name "10.11.1.53"
Now just run that and grep for "entry used by" or lack of and that would be the address object NOT IN USE. You could probably run a expect script or echo that file back into the firewall
So your final file would look like this;
config vdom edit root
diag sys checkused firewall.address.name "10.11.1.22" | grep used diag sys checkused firewall.address.name "10.11.1.23" | grep used diag sys checkused firewall.address.name "10.11.1.24" | grep used
and so on for all objects by name.
Now just run that named file and unix-cat it back in;
cat A | ssh kfelix@myfirewalllexample.com
And yes print table will provide you the max values ;
http://socpuppet.blogspot...s-print-tablesize.html
FWIW: if you have no multi-vdom than the above examples would be simpler. You could also do like you said match it to src/dstaddr but checkused on the "named" object will display where it's used at.
YMMV on what method you use & the script type, but just run it thru checkused. I would also run duplicate checks ( yes , the outfit I'm working in had engineer install the same OBJECT twice, three or more ). Than you can reduce any duplicates but that's a little bit to advance for me to explain how we find that ;)
GoodLuck
Ken