#!/usr/bin/php . */ define('N',"\n"); define('SNAME',basename(__FILE__)); define('FNAME',preg_replace('/\.[^.]*$/','',SNAME)); define('CHILD','getinstinfo.php'); define('LIBDP','/../lib'); require __DIR__.LIBDP.'/ght.php'; require __DIR__.LIBDP.'/grace.php'; require __DIR__.LIBDP.'/parsetime.php'; use function mysqli_real_escape_string as myesc; declare(ticks=1); if (function_exists('pcntl_signal')) { function signalHandler($signal) { //echo(N); mexit('received signal «'.$signal.'», shutting down.'.N,0,true); } pcntl_signal(SIGTERM,'signalHandler');// Termination ('kill' was called) pcntl_signal(SIGHUP,'signalHandler');// Terminal log-out pcntl_signal(SIGINT,'signalHandler');// Interrupted (Ctrl-C is pressed) } $msglevs=['Debug', 'Info', 'Warning', 'Error', 'None']; $opts=[ 'gracetime'=>$gracetime, 'poolsize'=>10, 'peersfp'=>null, 'dontrestore'=>false, 'ignorelock'=>false, 'minmsgimplev'=>1 ]; $help='SYNOPSIS '.SNAME.' [options] DESCRIPTION This script coordinates the parallel execution of a definable number of '.CHILD.' processes “against” all the alive instances which are already present in mastostart’s database, plus optionally those listed in a specifiable file (typically the output file from a peerscrawl.php run). OPTIONS - Everything after a single dash will be passed to '.CHILD.' processes as is. -g, --gracetime