mirror of
https://github.com/Telecominfraproject/wlan-ucentral-schema.git
synced 2026-01-27 02:23:33 +00:00
cmd_trace: limit maximum file size to 25% of free mem
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -27,10 +27,12 @@ if (!match(args.interface, /^[^\/]+$/) || (args.interface != "any" && !fs.stat("
|
||||
let duration = +args.duration || 0;
|
||||
let packets = +args.packets || 0;
|
||||
let filename = sprintf("/tmp/pcap-%s-%d", serial, time());
|
||||
let sys = ctx.call('system', 'info');
|
||||
|
||||
let command = [
|
||||
'tcpdump_timeout',
|
||||
duration,
|
||||
'-C', sys.memory.free / 4,
|
||||
'-W', '1',
|
||||
'-w', filename,
|
||||
'-i', args.interface
|
||||
|
||||
Reference in New Issue
Block a user