# Finding a pool in an Irule

**URL:** <https://community.f5.com/t/finding-a-pool-in-an-irule/62157>\
**Category:** Technical Forums\
**Tags:** irules, big-ip, devops\
**Created:** [January 10, 2022, 8:54pm UTC](https://community.f5.com/t/finding-a-pool-in-an-irule/62157 "2022-01-10T20:54:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlbriscoe](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tlbriscoe](https://community.f5.com/u/tlbriscoe)\
**Post date:** [January 10, 2022, 8:54pm UTC](https://community.f5.com/t/finding-a-pool-in-an-irule/62157/1 "2022-01-10T20:54:20Z")

</div>

I have numerous empty pools on my LTM and trying to remove them. When I attempt to delete them I get an error stating they are referenced by an Irule. But I also have many irules and the message does not show which Irule is using the pool. Is there an easier way other than searching through a text output of the config to determine which Irule is using the now empty pool? Maybe a script ?

---

<div class="post-metadata">

**Author:** ![CA\_Valli](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@CA\_Valli](https://community.f5.com/u/CA_Valli)\
**Post date:** [January 11, 2022, 1:40pm UTC](https://community.f5.com/t/finding-a-pool-in-an-irule/62157/2 "2022-01-11T13:40:08Z")

</div>

Hello, all LTM configuration is saved as text-config in bigip.conf file.

My suggestion would be logging into the bash command line interface and issue the following command:

cat -n /config/bigip.conf | grep pool\_name

the -n option will number the config line(s).

EDIT -- this command will also show you LTM pool object configuration as “ltm pool /Common/pool\_name” , ignore this line and focus on iRule/TCL statements.

You should then look for the first “ltm rule \<name\>” statement in previous configuration lines.

The following command might do it .. I’m filtering the 100 config lines before your match and then displaying only “ltm rule” or “pool\_name” statements.

cat -n /config/bigip.conf | grep pool\_name -B 100 | egrep ‘pool\_name|ltm rule’

Of course this might show other irule names (look for the matches immediately before pool\_name statements) , or no irule at all if pool statement is set after 100+ irule lines

---

<div class="post-metadata">

**Author:** ![CA\_Valli](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@CA\_Valli](https://community.f5.com/u/CA_Valli)\
**Post date:** [January 11, 2022, 1:41pm UTC](https://community.f5.com/t/finding-a-pool-in-an-irule/62157/3 "2022-01-11T13:41:08Z")

</div>

Hello again - I’m adding a bit.

If this configuration is in a specific partition, you will also need to check /config/partitions/partition\_name/bigip.conf file
