get_memory_threshold() * 100) . "%\n"; print "Wait Time: ". $Daemon->get_wait_time() . " seconds\n"; print "\n"; // Check that the action is valid and then execute it // Everything else is taken case of by the object :) $action = strtolower($action); if (method_exists($Daemon, $action)) { $Daemon->{$action}(); } else { die("ERROR: Unable to $action the daemon. This action is not recognized; instead try one of 'start', 'stop', 'restart', 'status' or 'log'.\n\n"); }