|
31 | 31 | #include "zend_virtual_cwd.h"
|
32 | 32 | #include "ext/standard/info.h"
|
33 | 33 | #include "ext/standard/php_filestat.h"
|
| 34 | +#include "ext/date/php_date.h" |
34 | 35 | #include "opcache_arginfo.h"
|
35 | 36 |
|
36 | 37 | #if HAVE_JIT
|
@@ -481,6 +482,9 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
|
481 | 482 | php_info_print_table_row(2, "Startup Failed", zps_api_failure_reason);
|
482 | 483 | } else {
|
483 | 484 | char buf[32];
|
| 485 | + zend_string *start_time, *restart_time, *force_restart_time; |
| 486 | + zval *date_ISO8601 = zend_get_constant_str("DATE_ISO8601", sizeof("DATE_ISO8601")-1); |
| 487 | + |
484 | 488 | php_info_print_table_row(2, "Startup", "OK");
|
485 | 489 | php_info_print_table_row(2, "Shared memory model", zend_accel_get_shared_model());
|
486 | 490 | snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(hits));
|
@@ -511,6 +515,26 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
|
511 | 515 | php_info_print_table_row(2, "Hash keys restarts", buf);
|
512 | 516 | snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(manual_restarts));
|
513 | 517 | php_info_print_table_row(2, "Manual restarts", buf);
|
| 518 | + |
| 519 | + start_time = php_format_date(Z_STRVAL_P(date_ISO8601), Z_STRLEN_P(date_ISO8601), ZCSG(start_time), 1); |
| 520 | + php_info_print_table_row(2, "Start time", ZSTR_VAL(start_time)); |
| 521 | + zend_string_release(start_time); |
| 522 | + |
| 523 | + if (ZCSG(last_restart_time)) { |
| 524 | + restart_time = php_format_date(Z_STRVAL_P(date_ISO8601), Z_STRLEN_P(date_ISO8601), ZCSG(last_restart_time), 1); |
| 525 | + php_info_print_table_row(2, "Last restart time", ZSTR_VAL(restart_time)); |
| 526 | + zend_string_release(restart_time); |
| 527 | + } else { |
| 528 | + php_info_print_table_row(2, "Last restart time", "none"); |
| 529 | + } |
| 530 | + |
| 531 | + if (ZCSG(force_restart_time)) { |
| 532 | + force_restart_time = php_format_date(Z_STRVAL_P(date_ISO8601), Z_STRLEN_P(date_ISO8601), ZCSG(force_restart_time), 1); |
| 533 | + php_info_print_table_row(2, "Last force restart time", ZSTR_VAL(force_restart_time)); |
| 534 | + zend_string_release(force_restart_time); |
| 535 | + } else { |
| 536 | + php_info_print_table_row(2, "Last force restart time", "none"); |
| 537 | + } |
514 | 538 | }
|
515 | 539 | }
|
516 | 540 |
|
|
0 commit comments