Description

This function provides information that will help you to determine whether your server can handle the workload if you enable PHP-FPM for all domains.

 

Examples




https://hostname.example.com:2087/cpsess##########/json-api/get_fpm_count_and_utilization?api.version=1




https://hostname.example.com:2087/cpsess##########/xml-api/get_fpm_count_and_utilization?api.version=1




whmapi1 get_fpm_count_and_utilization 



{  
   "data":{  
      "domains_to_be_enabled":3,
      "total_domains":3,
      "memory_needed":90000,
      "show_warning":1,
      "domains_using_fpm":0,
      "number_of_new_fpm_accounts_we_can_handle":-3
   },
   "metadata":{  
      "result":1,
      "command":"get_fpm_count_and_utilization",
      "version":1,
      "reason":"OK"
   }
}




<xml>
    <data>
        <domains_to_be_enabled>3</domains_to_be_enabled>
        <domains_using_fpm>0</domains_using_fpm>
        <memory_needed>90000</memory_needed>
        <number_of_new_fpm_accounts_we_can_handle>-3</number_of_new_fpm_accounts_we_can_handle>
        <show_warning>1</show_warning>
        <total_domains>3</total_domains>
    </data>
    <metadata>
        <command>get_fpm_count_and_utilization</command>
        <reason>OK</reason>
        <result>1</result>
        <version>1</version>
    </metadata>
</xml>



Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible ValuesExample

domains_to_be_enabled

integer

The number of domains that you will enable with PHP-FPM when you run the /scripts/php_fpm_config_convert script.

A valid value.

2

domains_using_fpm

integer

The number of domains with PHP-FPM enabled.

A valid value. 20

number_of_new_fpm_accounts_we_can_handle

integer 

The approximate number of domains on which you can enable PHP-FPM without a server overload.

A valid value.8

show_warning

Boolean 

Whether you may overload your server when you convert all domains to PHP-FPM.

  • 1High risk of server overload when you enable PHP-FPM.
  • 0Low risk of server overload when you enable PHP-FPM.
0

total_domains

integer 

The total number of domains on the server.

A valid value.22
memory_neededinteger

The approximate number of megabytes of memory that your system will require to convert the remaining domains to PHP-FPM.

A valid value.90000