mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Global storage utilization in Runtime Status
This commit is contained in:
parent
0eea23bf5a
commit
a3d370ea7e
6 changed files with 145 additions and 40 deletions
|
|
@ -3411,14 +3411,16 @@ function getFolderSize(path)
|
|||
if ntop.isWindows() then
|
||||
-- TODO
|
||||
else
|
||||
local line = os_utils.execWithOutput("du -s "..path.." 2>/dev/null")
|
||||
local values = split(line, '\t')
|
||||
if #values >= 1 then
|
||||
local used = tonumber(values[1])
|
||||
if used ~= nil then
|
||||
size = used*1024
|
||||
end
|
||||
end
|
||||
if ntop.isdir(path) then
|
||||
local line = os_utils.execWithOutput("du -s "..path.." 2>/dev/null")
|
||||
local values = split(line, '\t')
|
||||
if #values >= 1 then
|
||||
local used = tonumber(values[1])
|
||||
if used ~= nil then
|
||||
size = used*1024
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue