JunkMan is a toolkit for what it can trace the PHP GC by xdebug. And distribute its to the JunkMonitor. so that you could monitor the applicaton working GC logs in time.
JunkMan | PHP | xdebug |
---|---|---|
v1.0 | >=7.0 | >=2.1 |
composer require stream/junkman
windows
start /B (YOUR_PATH)vendor/stream/junkman/src/JunkManTransfer.exe
linux
(YOUR_PATH)vendor/stream/junkman/src/JunkManTransfer &
tips: chmod -R 0777 (YOUR_PATH)vendor/stream/junkman/
JunkMan::stream()->start('stream watching');
#code
JunkMan::stream()->end();
JunkMan::flood()->start('flood watching');
while(true){
#code
#if ... break
#flush the message to monitor
JunkMan::flood()->flush();
}
JunkMan::flood()->end();
$data = 'some message';
JunkMan::spot()->dot('spot watching',$data);
tips:
the remote server should open firewall to enable port of 9303,
that you could connect the server by JunkMonitor
command:
firewall-cmd --zone=public --add-port=9303/tcp --permanent
firewall-cmd --reload