openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 9d968304bdfb9f57ea8a34313981c6b75f70cb55
parent ee34fbb654460dbc2babb78c27e374c4b4c97f46
Author: Jan Dankert <develop@jandankert.de>
Date:   Sun,  7 Nov 2021 21:43:45 +0100

New: 2 new status pages: system, server.

Diffstat:
Mmodules/cms/status/Status.class.php | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/modules/cms/status/Status.class.php b/modules/cms/status/Status.class.php @@ -169,6 +169,22 @@ class Status $success = true; break; + case 'system': + $data = [ + 'interpreter' => PHP_VERSION, + 'os' => PHP_OS, + 'usage' => getrusage(), + 'memory' => [ + 'allocated' => memory_get_usage(true), + 'used' => memory_get_usage(), + 'peak_allocated' => memory_get_peak_usage(true), + 'peak_used' => memory_get_peak_usage(), + + ], + ]; + $success = true; + break; + case 'env': case 'environment': if ( version_compare(PHP_VERSION,'7.1','>=') ) @@ -176,6 +192,11 @@ class Status $success = true; break; + case 'server': + $data['server'] = $_SERVER; + $success = true; + break; + case 'extensions': $data['extensions'] = get_loaded_extensions(); $success = true;