Display Active Conf in php-fpm pool

Php-fpm pool configuration contains 400+ lines (for example in Ubuntu 16.04). In reality, we may use only about 20 lines or less than 5% of the file. The original configuration file contains lines that explains what each config does. It is good practice to have inline documentation.

In certain cases, we may want to know what lines are actually active. To find that please use the following command…

grep -v '^;\|^$' /path/to/fpm/pool.d/www.conf

What it does:

The ‘-v’ modifier excludes the pattern that immediately follows it.

The quoted string has two parts.

  1. ‘^;’ excludes any lines that do not start with a semi-colon.
  2. ‘^$’ excludes the empty lines

‘|’ modifier combines the above two parts. Finally, ‘\’ modifier is the escape character.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s