Forum Discussion
smp_86112
Sep 04, 2012Cirrostratus
How many LTM objects do you have to manage?
I am curious to find out how large our LTM environment is compared to others. We have six LTM pairs, and several of them have what I suspect is an outrageously-large number of objects. Our configurat...
Sep 05, 2012
Env VIPs Pools
1 8 12
2 49 33
2 135 83
2 19 44
2 125 125
2 82 99
And here's a script to get the information.
Initialize iControlSnapin
if ( (Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn"}) -eq $null ){
Add-PSSnapIn iControlSnapIn
}
Setup Credentials
$user = "user"
$pass = "password"
$bigipdict = @{"10.0.0.1" = "Myfirstloadbalancer"; "10.10.10.10" = "Mysecondloadbalancer"}
function main(){
$bigipdict.keys | ForEach-Object {
runQueries -bigipip $_ -bigipname $bigipdict.Get_Item($_)
}
}
function runQueries(){
Param(
$bigipip,
$bigipname
)
$virtualservers = 0
$pools = 0
$success = Initialize-F5.iControl -HostName $bigipip -Username $user -Password $pass;
$f5 = Get-F5.iControl
$f5partitions = $f5.ManagementPartition
$f5partitions.get_partition_list() | foreach-object {
$partition = $_.partition_name
$f5partitions.set_active_partition($partition)
$virtualservers += $f5.LocalLBVirtualServer.get_list().Count
$pools += ($f5.LocalLBPool.get_list()).Count
}
"$bigipname`t$virtualservers`t$pools"
}
main
And here's a script to get the information:
Initialize iControlSnapin
if ( (Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn"}) -eq $null ){
Add-PSSnapIn iControlSnapIn
}
Setup Credentials
$user = "user"
$pass = "password"
$bigipdict = @{"10.0.0.1" = "Myfirstloadbalancer"; "10.10.10.10" = "Mysecondloadbalancer"}
$Global:sumvar = ""
function main(){
$bigipdict.keys | ForEach-Object {
runQueries -bigipip $_ -bigipname $bigipdict.Get_Item($_)
}
}
function runQueries(){
Param(
$bigipip,
$bigipname
)
$virtualservers = 0
$pools = 0
$success = Initialize-F5.iControl -HostName $bigipip -Username $user -Password $pass;
$f5 = Get-F5.iControl
$f5partitions = $f5.ManagementPartition
$f5partitions.get_partition_list() | foreach-object {
$partition = $_.partition_name
$f5partitions.set_active_partition($partition)
$virtualservers += $f5.LocalLBVirtualServer.get_list().Count
$pools += ($f5.LocalLBPool.get_list()).Count
}
"$bigipname`t$virtualservers`t$pools"
}
main
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects