Index: trunk/install/php/showplaylist.php =================================================================== --- trunk/install/php/showplaylist.php (リビジョン 17) +++ trunk/install/php/showplaylist.php (リビジョン 32) @@ -27,11 +27,14 @@ foltia:recorded file list "; - include("./foltialib.php"); $con = m_connect(); $now = date("YmdHi"); - ?> @@ -47,4 +50,5 @@ }else{ printdiskusage(); + printtrcnprocesses(); } ?> Index: trunk/install/php/foltialib.php =================================================================== --- trunk/install/php/foltialib.php (リビジョン 21) +++ trunk/install/php/foltialib.php (リビジョン 32) @@ -408,4 +408,16 @@ function printdiskusage(){//戻り値 なし +list (, $all, $use , $free, $usepercent) = getdiskusage(); + +print " +
$free +
$use/$all($usepercent)
+
+"; +//exec('ps ax | grep ffmpeg |grep MP4 ' ,$ffmpegprocesses); +}//end sub + + +function getdiskusage(){//戻り値 配列 [,全体容量, 使用容量 , 空き容量, 利用割合] global $recfolderpath,$recfolderpath; @@ -414,16 +426,12 @@ $freearea = preg_split ("/[\s,]+/", $hdfreearea[0]); -// exec ( "ps ax | grep ffmpeg", $encoding); -// exec ( "ps ax | grep faac", $processlock); - -print " -
$freearea[3] -
$freearea[2]/$freearea[1]($freearea[4])
-
-"; - -//exec('ps ax | grep ffmpeg |grep MP4 ' ,$ffmpegprocesses); + return $freearea; + +}//endsub + + +function printtrcnprocesses(){ + $ffmpegprocesses = `ps ax | grep ffmpeg | grep -v grep | wc -l `; - $uptime = exec('uptime'); @@ -433,28 +441,57 @@ print ""; -}//end sub - - - - - - - - - - - - - - - - - - - - - - - +}//endsub + + +function warndiskfreearea(){ + +if ($demomode){ +print ""; +}else{ + +global $recfolderpath,$recfolderpath; + + exec ( "df $recfolderpath | grep $recfolderpath", $hdfreearea); + $freearea = preg_split ("/[\s,]+/", $hdfreearea[0]); +$freebytes = $freearea[3]; +if ($freebytes == "" ){ +// +print ""; +}elseif($freebytes > 1024*1024*100 ){// 100GB以上あいてれば +//なにもしない +print ""; +}elseif($freebytes > 1024*1024*50 ){// 100GB以下 +print " +"; +}elseif($freebytes > 1024*1024*30 ){// 50GB以下 +print " +"; +}elseif($freebytes > 0 ){// 30GB以下 +print " +"; +}else{ +print ""; + + +}//endif freebytess + +}//endif demomode + +}//endsub Index: trunk/install/php/index.php =================================================================== --- trunk/install/php/index.php (リビジョン 1) +++ trunk/install/php/index.php (リビジョン 32) @@ -33,6 +33,8 @@ - -foltia:放映予定 + "; +//ディスク空き容量によって背景色表示変更 +warndiskfreearea(); +print "foltia:放映予定 ";