本文整理汇总了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");