Created
September 9, 2016 06:25
-
-
Save pserrano/2aaae4e13d6c62f13e63d3ee70beb09d to your computer and use it in GitHub Desktop.
php_append.php auto_append_file fpm memory check process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Memory check process for fpm | |
<?php | |
$logline = sprintf(date("Y-m-d H:i:s") . "\t" . round(memory_get_peak_usage() / 1024 / 1024,2) . " MB\t" . $_SERVER["REQUEST_URI"] . "\n"); | |
file_put_contents("/var/log/nginx/fpm_memory.log", $logline, FILE_APPEND | LOCK_EX); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment