mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Avoids checking disk size when performance is degraded
This commit is contained in:
parent
7083d97523
commit
85330a43f8
1 changed files with 2 additions and 1 deletions
|
|
@ -3362,7 +3362,8 @@ function getFolderSize(path, timeout)
|
|||
if size == nil then
|
||||
size = 0
|
||||
-- Read disk utilization
|
||||
if ntop.isdir(path) then
|
||||
local periodic_activities_utils = require "periodic_activities_utils"
|
||||
if ntop.isdir(path) and not periodic_activities_utils.have_degraded_performance() then
|
||||
local du_cmd = string.format("du -s %s 2>/dev/null", path)
|
||||
if has_timeout then
|
||||
du_cmd = string.format("timeout %u%s %s", MAX_TIMEOUT, "s", du_cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue