Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Backup Largo

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

/system scheduler

add interval=4w3d name=ExportV2 on-event=ExportV2 policy=\


ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=aug/30/2011 start-time=21:10:00
add interval=4w2d name="Informe Zona" on-event="Inf Zona" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=apr/06/2013 start-time=20:30:00
/system script
add name=ExportV2 policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,api source="#~Script\
\_Exports.\r\
\n\r\
\n:global date [/system clock get date]\r\
\n:global mes [:pick \$date 0 3]\r\
\n:global dia [:pick \$date 4 6]\r\
\n:global year [:pick \$date 7 11]\r\
\n:global IPM [/ip ad get value-name=address ([/ip ro find dst-address=172.1\
6.1.0/24 active])]\r\
\n:global IP\r\
\n:global txt \".txt\"\r\
\n:for i from=( [:len \$IPM] - 1) to=0 do={ \r\
\n\t:if ( [:pick \$IPM \$i] = \"/\") do={ \r\
\n\t\t:set IP [:pick \$IPM 0 \$i]\r\
\n\t} \r\
\n}\r\
\n\r\
\n:global exportname ( \$dia . \"-\" . \$mes . \"-\". \$year .\" \". [/syst\
em identity get name] . \" \". \$IP)\r\
\n:global name (\$exportname . \$txt)\r\
\n/export file=\$exportname\r\
\n/tool fetch address=172.16.0.195 password=Reico-Ex user=MT-Export mode=ftp\
\_port=21 upload=yes dst-path=\"Nodos/GAM 2/San Rafael/\$name\" src-path=(\$\
exportname . \".rsc\")\r\
\n/file remove \$exportname\r\
\n"
add name="Inf Zona" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="\r\
\n##Export para Informe de Zona\r\
\n\r\
\n##Info General\r\
\n:global Nombre [sys ide get name]\r\
\n:global \"RN AP\" [int wire regis get 0 value-name=radio-name]\r\
\n:global \"MRB\" [sys reso get board-name]\t\t\t\r\
\n:global \"ROS Ver\" [sys reso get version]\r\
\n:global SN [sys ro get serial-number]\r\
\n:global Lic [sys li get nlevel]\r\
\n:global \"TX\" [int wire regis get 0 tx-signal-strength]\r\
\n:global \"RX_d\" [int wire regis get 0 signal-strength]\r\
\n:global \"RX\" [:pick \$\"RX_d\" 0 3]\r\
\n:global \"TX-RX\" ([\$TX] . \"/\" . [\$RX])\r\
\n\r\
\n##Info Conexion\r\
\n:global Monitor ([int wire monitor 0 file=Mon] \\ [file pr] \\ [file get M\
on contents])\r\
\ntostr \$Monitor \r\
\n\r\
\n##Extraccion banda\r\
\n:global \"PBand\" [:find \$Monitor band]\r\
\n:global \"PFreq\" [:find \$Monitor frequency]\r\
\n:global RBanda [:pick \$Monitor \$PBand \$PFreq]\r\
\ntostr \$RBanda \r\
\n:global PDBanda [:find \$RBanda \" \"]\r\
\n:tonum \$PDBanda\r\
\n:global TBanda [:len \$RBanda]\r\
\n:global FBanda [:pick \$RBanda (\$PDBanda + 1) \$TBanda]\r\
\n:global TBandaR [:find \$FBanda \" \"]\r\
\n:global Banda [:pick \$FBanda 0 (\$TBandaR-1)]\r\
\n\r\
\n\r\
\n##Extracion frecuencia\r\
\n:global \"PFreq\" [:find \$Monitor frequency]\r\
\n:global \"PWPro\" [:find \$Monitor wireless-protocol]\r\
\n:global RFreq [:pick \$Monitor \$PFreq \$PWPro]\r\
\ntostr \$RFreq \r\
\n:global PDFreq [:find \$RFreq \" \"]\r\
\n:tonum \$PDFreq\r\
\n:global TFreq [:len \$RFreq]\r\
\n:global FFreq [:pick \$RFreq (\$PDFreq + 1) \$TFreq]\r\
\n:global TFreqR [:find \$FFreq \" \"]\r\
\n:global Frequency [:pick \$FFreq 0 (\$TFreqR-1)]\r\
\n:set Monitor \" \"\r\
\n:global Reporte ( \"ID: \". \$Nombre . \" AP: \" . \$\"RN AP\" . \" RB: \"\
\_. \$MRB . \" OS: \" . \$\"ROS Ver\" .\" Sen: \" . \$\"TX-RX\" \\\r\
\n. \" Fq: \" . \$Frequency . \" Band: \" .\$Banda . \" Lic: \" . \$Lic . \"\
\_SN: \" . \$SN . \"\\n\")\r\
\n:log info \$Reporte\r\
\n/file remove Mon\r\
\n"

You might also like