/JunkMan

JunkMan is a toolkit for what it can trace the PHP GC logs by xdebug.distribute GC logs to the JunkManMonitor

Primary LanguagePHP

About JunkMan

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

1. build

composer require stream/junkman   

2. startup JunkManTransfer service

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/  

3. set your outpost

stream monitor (monitor code blocks)
JunkMan::stream()->start('stream watching');
#code
JunkMan::stream()->end();
flood monitor (for long time application process)
JunkMan::flood()->start('flood watching');

while(true){
  #code
  #if ... break
  #flush the message to monitor
  JunkMan::flood()->flush();
}

JunkMan::flood()->end();   
spot (monitor a variable)
$data = 'some message';
JunkMan::spot()->dot('spot watching',$data); 

4. Download JunkMonitor

JunkMonitor

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