Пример #1
0
    die;
}
if ($argv[1] == '--tables') {
    checks();
    die;
}
if ($argv[1] == '--imapsync') {
    rebuild_imapsync();
    die;
}
if ($argv[1] == '--rebuild-zarafa') {
    rebuild_zarafa();
    die;
}
if ($argv[1] == '--squid-events-purge') {
    squid_events_purge();
    die;
}
if ($argv[1] == '--mysqlcheck') {
    mysqlcheck($argv[2], $argv[3]);
    die;
}
$sock = new sockets();
$q = new mysqlserver();
$MysqlConfigLevel = $sock->GET_INFO("MysqlConfigLevel");
if (!is_numeric($MysqlConfigLevel)) {
    $MysqlConfigLevel = 0;
}
$EnableZarafaTuning = $sock->GET_INFO("EnableZarafaTuning");
if (!is_numeric($EnableZarafaTuning)) {
    $EnableZarafaTuning = 0;
Пример #2
0
if($argv[1]=='--rownum'){execute_rownum($argv[2],$argv[3]);die();}
if($argv[1]=='--GetAsSQLText'){GetAsSQLText($argv[2]);die();}
if($argv[1]=='--backup'){Backup($argv[2]);die();}
if($argv[1]=='--checks'){checks();die();}
if($argv[1]=='--maintenance'){maintenance();die();}


if(!Build_pid_func(__FILE__,"MAIN")){
	writelogs(basename(__FILE__).":Already executed.. aborting the process",basename(__FILE__),__FILE__,__LINE__);
	die();
}

if($argv[1]=='--tables'){$mysql=new mysql();$mysql->BuildTables();die();}
if($argv[1]=='--imapsync'){rebuild_imapsync();die();}
if($argv[1]=='--rebuild-zarafa'){rebuild_zarafa();die();}
if($argv[1]=='--squid-events-purge'){squid_events_purge();die();}
if($argv[1]=='--mysqlcheck'){mysqlcheck($argv[2],$argv[3]);die();}





$q=new mysqlserver();

$unix=new unix();
$mem=$unix->TOTAL_MEMORY_MB();
echo "\n";
echo "Starting......: Mysql my.cnf........: Total memory {$mem}MB\n";

if($mem<550){
	echo "Starting......:Mysql my.cnf........: SWITCH TO LOWER CONFIG.\n";