From d411680b1b76331c81b068bd6dc0a69dcf2c1dff Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Sat, 2 Apr 2011 00:55:55 +0400 Subject: [PATCH] Parser pid renew --- php/index.php | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/php/index.php b/php/index.php index 9213062..863d228 100644 --- a/php/index.php +++ b/php/index.php @@ -3,35 +3,39 @@ require_once 'common.php'; $db = Db::getInstance(); - $rows = $db->getRows($db->q("SELECT status, count(*) as cnt FROM beathaven.queue GROUP BY status")); - $info = array_fill(0, 3, 0); - foreach ($rows as $row) { $info[$row['status']] = $row['cnt']; } - -$tmp = exec("ps aux | grep parse_queue"); +$pid = @file_get_contents('/www/parser_data/pid'); +$tmp = exec("ps ". $pid); $running = (strpos($tmp, '/opt/local/bin/php') !== false) ? 1 : 0; ?> - -BeatHaven - - - -
- / / - -
- + + BeatHaven + + + + + + + + +
+
 
+ + / / + +
+