Scripts p2
Scripts p2
Scripts p2
: /system script job
name(-; ) -
owner() -
source( ; ) -
: /system script edit
RouterOS
.
Delete -
Ctrl+h, bakspase -
Tab -
Ctrl+b,LeftArrow
Ctrl+f, RightArrow -
Ctrl+n, DownArrow -
Ctrl+p, UpArrow -
Ctrl+a, Home -
Ctrl+e, End -
Ctrl+y -
Ctrl+k -
Ctrl+u - 8
Ctrl+o -
Ctrl+x -
edit() - name -
.
"hello"
"kuku".
: system
: Level1
: system sheduler
:
:
interval(; 0)- ,
interval ,
, .
name() -
run-count( ; ) - ,
.
start-date() -
start-time() -
run-count .
(),
.
.
move.
,
.
Flags: X - disabled
# NAME ON-EVENT START-DATE START-TIME INTERVAL RUN-COUNT
0 run-1h log-test mar/30/2004 06:11:35 1h 0
[admin@MikroTik] system scheduler>
"Cust0". 9
64 Kb/s 5 128 Kb/s.
, .
e-mail.
'x' .
: advanced-tools
: Level1
: /tool netwatch
: none
:
.
ICMP .
IP , .
.
down-script() -
unknown up down
host(IP ; : 0.0.0.0) - IP .
interval(; 1s) - ICMP .
,
.
since( : ) - ,
.
status( : up | down| unknown) - .
up - ()
down - ( )
unknown -
/
timeout(; : 1s) - .
, (down)
up-script() -
unknown down up
gw_1 gw_2
:
,
.
, ,
.
? . "gw_2"
up
:
[admin@MikroTik] > /ip route set [/ip route find dst 0.0.0.0] gateway 10.0.0.217
[admin@MikroTik] > /ip route set [/ip route find dst 0.0.0.0] gateway 10.0.0.1
10.0.0.217 .
, e -mail
10.0.0.25 .
: advanced-tools
: Level1
: /tool-traffic monitor
C :
:
.
(
),
,
.
C
interface() -
name() -
on-event() - . /system script
threshold(; :0) -
traffic( | ; : transmitted()) -
transmitted -
received -
triger( | | ; : ) -
above - ,
below - ,
ether2,
15kbs ether1 12kbs
ether1.
Sigwatch( )
: advanced-tools
: Level1
: /tools sigwatch
:
:
Sigwatch
count( : ) - .
log( | ; no) - -of-sigwatch-item:
[ high | low] System-info sigwatch
name() - sigwatch
on-condition(on | off | change; : on) -
on - high
off - low
- .
,
port() -
script() -
signal(dtr | rts | cts | dcd | ri | dsr; : rts) - (
)
dtr - ( 4)
rts - ( 7)
cts - ( 8)
dcd - ( 1)
ri - ( 9)
dsr - ( 6)
state( ; ) -
/system script
.
sigwatch
serial1 cts .
port
.
1 name="serial1" line-state=dtr,rts
[admin@MikroTik] port>
1 name="serial1" line-state=dtr,rts,cts
[admin@MikroTik] port>
dtr,rts cts
oncondition
off
:
.
. .
.