Skip to content

Commit

Permalink
memory_get_usage(false)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Apr 28, 2022
1 parent e5f7d90 commit 1d8b3f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ protected static function writeStatisticsToStatusFile()
\reset(static::$_workers);
/** @var \Workerman\Worker $worker */
$worker = current(static::$_workers);
$worker_status_str = \posix_getpid() . "\t" . \str_pad(round(memory_get_usage(true) / (1024 * 1024), 2) . "M", 7)
$worker_status_str = \posix_getpid() . "\t" . \str_pad(round(memory_get_usage(false) / (1024 * 1024), 2) . "M", 7)
. " " . \str_pad($worker->getSocketName(), static::$_maxSocketNameLength) . " "
. \str_pad(($worker->name === $worker->getSocketName() ? 'none' : $worker->name), static::$_maxWorkerNameLength)
. " ";
Expand Down

0 comments on commit 1d8b3f7

Please sign in to comment.