Code: Select all
{
/tool sniffer stop
local 1 [pick [sys clock get date ] 0 3]
local 2 [pick [sys clock get date ] 4 6]
loca 3 [pick [sys clock get date ] 7 12]
local time [/system clock get time]
local date "$2$1$3"
local status [/tool sniffer get running]
if ($status = false ) do={ put $time; put $date; tool sniffer set file-name="usb1/$date, 4" ; / tool sniffer start}
}
This script start packet sniffer and add system date to the name of file. In my router SNMP Client didn't work because router is setting in bridge. That's why i need add random number to the filename. How to create it? Thanks...