forked from hummypkg/webif
improve system busy detection
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@424 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
9b2f138fd9
commit
9a72e40c03
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.7.1-3
|
||||
Version: 0.7.1-4
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.3),hmt(>=1.0.6),ssmtp
|
||||
|
@ -60,11 +60,12 @@ proc {system diskspace} {} {
|
||||
}
|
||||
|
||||
proc {system busy} {} {
|
||||
# Is humaxtv doing anything?
|
||||
# Is humaxtv doing anything important?
|
||||
set pid [exec /mod/bin/busybox/pgrep humaxtv]
|
||||
set c 0
|
||||
catch { set c [exec /mod/bin/lsof -p $pid | grep Video | fgrep .ts | wc -l] }
|
||||
|
||||
foreach line [split [exec /mod/bin/lsof -p $pid] "\n"] {
|
||||
if {[string match {*Video*.ts} $line]} { incr c }
|
||||
}
|
||||
if {$c > 0} { return 1 }
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user