mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 08:29:36 +00:00
Caps du -s execution using a timeout to prevent long activities
This commit is contained in:
parent
23f08f31ed
commit
fee595eabf
5 changed files with 39 additions and 15 deletions
|
|
@ -370,9 +370,10 @@ function recording_utils.volumeInfo(path)
|
|||
end
|
||||
|
||||
--! @brief Read information about the storage, including storage size and available space
|
||||
--! @param ifid the interface identifier
|
||||
--! @param ifid the interface identifier
|
||||
--! @param timeout the maxium time to compute the size
|
||||
--! @return a table containing storage information (size is in bytes)
|
||||
function recording_utils.storageInfo(ifid)
|
||||
function recording_utils.storageInfo(ifid, timeout)
|
||||
local storage_info = recording_utils.volumeInfo(dirs.pcapdir)
|
||||
|
||||
-- Interface storage info
|
||||
|
|
@ -380,7 +381,7 @@ function recording_utils.storageInfo(ifid)
|
|||
|
||||
-- PCAP Extraction storage info
|
||||
local extraction_path = getPcapExtractionPath(ifid)
|
||||
storage_info.extraction_used = getFolderSize(extraction_path)
|
||||
storage_info.extraction_used = getFolderSize(extraction_path, timeout)
|
||||
|
||||
return storage_info
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue