本文整理匯總了PHP中sockets::GET_PERFS方法的典型用法代碼示例。如果您正苦於以下問題:PHP sockets::GET_PERFS方法的具體用法?PHP sockets::GET_PERFS怎麽用?PHP sockets::GET_PERFS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sockets
的用法示例。
在下文中一共展示了sockets::GET_PERFS方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
function init(){
$sock=new sockets();
$ArticaMaxLogsSize=$sock->GET_PERFS("ArticaMaxLogsSize");
if($ArticaMaxLogsSize<1){$ArticaMaxLogsSize=500;}
$ArticaMaxLogsSize=$ArticaMaxLogsSize*1000;
$GLOBALS["ArticaMaxLogsSize"]=$ArticaMaxLogsSize;
$GLOBALS["logs_cleaning"]=$sock->GET_NOTIFS("logs_cleaning");
$GLOBALS["MaxTempLogFilesDay"]=$sock->GET_INFO("MaxTempLogFilesDay");
if($GLOBALS["MaxTempLogFilesDay"]==null){$GLOBALS["MaxTempLogFilesDay"]=5;}
}
示例2: CleanMysqlDatabase
CleanMysqlDatabase(true);
die;
}
if ($argv[1] == "--squid") {
check_all_squid();
die;
}
if ($argv[1] == "--convert") {
die;
}
if ($argv[1] == "--test-nas") {
tests_nas(true);
die;
}
$sock = new sockets();
$ArticaMaxLogsSize = $sock->GET_PERFS("ArticaMaxLogsSize");
if ($ArticaMaxLogsSize < 1) {
$ArticaMaxLogsSize = 300;
}
$GLOBALS["ArticaMaxLogsSize"] = $ArticaMaxLogsSize;
$unix = new unix();
$logrotate = $unix->find_program("logrotate");
if (!is_file($logrotate)) {
echo "logrotate no such file\n";
}
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".pid";
$timefile = "/etc/artica-postfix/pids/logrotate.time";
$pid = file_get_contents("{$pidfile}");
if ($unix->process_exists($pid, basename(__FILE__))) {
$timeMin = $unix->PROCCESS_TIME_MIN($pid);
system_admin_events("Already executed PID {$pid} since {$timeMin} Minutes", __FUNCTION__, __FILE__, __LINE__, "logrotate");