示例#1
0
文件: poller.php 项目: MrWnn/cacti
function exec_background($filename, $args = '')
{
    global $config, $debug;
    if (read_config_option('log_verbosity') >= POLLER_VERBOSITY_DEBUG || $debug) {
        cacti_log("DEBUG: About to Spawn a Remote Process [CMD: {$filename}, ARGS: {$args}]", true, 'POLLER');
    }
    if (file_exists($filename)) {
        if ($config['cacti_server_os'] == 'win32') {
            pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, 'r'));
        } else {
            exec($filename . ' ' . $args . ' > /dev/null &');
        }
    } elseif (file_exists_2gb($filename)) {
        exec($filename . ' ' . $args . ' > /dev/null &');
    }
}
示例#2
0
文件: poller.php 项目: teddywen/cacti
function exec_background($filename, $args = "")
{
    global $config, $debug;
    if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_DEBUG || $debug) {
        cacti_log("DEBUG: About to Spawn a Remote Process [CMD: {$filename}, ARGS: {$args}]", true, "POLLER");
    }
    if (file_exists($filename)) {
        if ($config["cacti_server_os"] == "win32") {
            pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, "r"));
        } else {
            exec($filename . " " . $args . " > /dev/null &");
        }
    } elseif (file_exists_2gb($filename)) {
        exec($filename . " " . $args . " > /dev/null &");
    }
}
示例#3
0
文件: poller.php 项目: songchin/Cacti
function exec_background($filename, $args = "") {
	global $config;

	if (read_config_option("log_verbosity") == POLLER_VERBOSITY_DEBUG) {
		cacti_log("DEBUG: About to Spawn a Remote Process [CMD: $filename, ARGS: $args]", true, "POLLER");
	}

	if (file_exists($filename)) {
		if (CACTI_SERVER_OS == "win32") {
			pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, "r"));
		}else{
			exec($filename . " " . $args . " > /dev/null &");
		}
	}elseif (file_exists_2gb($filename)) {
		exec($filename . " " . $args . " > /dev/null &");
	}
}