+ Responder ao Tópico



  1. existe algum meio do comando print retorna algumas colunas de dados, exemplo na imagem abaixo gostaria apenas do dados NAME e L2MTU das interfaces ....

    http://img38.imageshack.us/img38/9039/printjv.jpg

  2. Para ele exibir *não há meios vindo do print. Pode-se criar um script para pegar o valor do l2mtu e o nome dá um print para um file ou mesmo para o log.



  3. print

    The print command shows all information that's accessible from particular command level. Thus, /system clock print shows system date and time, /ip route print shows all routes etc. If there's a list of items in this level and they are not read-only, i.e. you can change/remove them (example of read-only item list is /system history, which shows history of executed actions), then print command also assigns numbers that are used by all commands that operate on items in this list.
    If there's list of items then print usually can have a from argument. The from argument accepts space separated list of item numbers, names (if items have them), and internal numbers. The action (printing) is performed on all items in this list in the same order in which they're given.
    Output can be formatted either as a table, with one item per line or as a list with property=value pairs for each item. By default print uses one of these forms, but it can be set explicitly with brief and detail arguments. In brief (table) form, column argument can be set to a list of property names that should be shown in the table:
    [admin@MikroTik] interface ethernet> print
    Flags: X - disabled, R - running
    # NAME MTU MAC-ADDRESS ARP
    0 R ether1 1460 00:50:08:00:00:F5 enabled
    1 R ether2 1460 00:50:08:00:00:F6 enabled
    [admin@MikroTik] interface ethernet> print brief
    Flags: X - disabled, R - running
    # NAME MTU MAC-ADDRESS ARP
    0 R ether1 1460 00:50:08:00:00:F5 enabled
    1 R ether2 1460 00:50:08:00:00:F6 enabled
    [admin@MikroTik] interface ethernet> print detail
    Flags: X - disabled, R - running
    0 R name="ether1" mtu=1460 mac-address=00:50:08:00:00:F5 arp=enabled
    disable-running-check=yes

    1 R name="ether2" mtu=1460 mac-address=00:50:08:00:00:F6 arp=enabled
    disable-running-check=yes


    [admin@MikroTik] interface ethernet> print brief column=mtu,arp
    Flags: X - disabled, R - running
    # MTU ARP
    0 R 1460 enabled
    1 R 1460 enabled
    [admin@MikroTik] interface ethernet> print
    Rules that do some accounting (for example, ip firewall or queue rules) may have two additional views of packets and of bytes matched these rules:
    [admin@MikroTik] ip firewall rule forward> print packets
    Flags: X - disabled, I - invalid
    # SRC-ADDRESS DST-ADDRESS PACKETS
    0 0.0.0.0/0:0-65535 0.0.0.0/0:0-65535 0
    [admin@MikroTik] ip firewall rule forward> print bytes
    Flags: X - disabled, I - invalid
    # SRC-ADDRESS DST-ADDRESS BYTES
    0 0.0.0.0/0:0-65535 0.0.0.0/0:0-65535 0
    [admin@MikroTik] ip firewall rule forward>
    To reset these counters reset-counters command is used. Some items might have statistics other than matched bytes and packets. You can see it by using print stats command:
    [admin@MikroTik] ip ipsec> policy print stats
    Flags: X - disabled, I - invalid
    0 src-address=10.0.0.205/32:any dst-address=10.0.0.201/32:any
    protocol=icmp ph2-state=no-phase2 in-accepted=0 in-dropped=0
    out-accepted=0 out-dropped=0 encrypted=0 not-encrypted=0 decrypted=0
    not-decrypted=0


    [admin@MikroTik] ip ipsec>
    There migtht also be print status command: [admin@MikroTik] routing bgp peer> print status
    # REMOTE-ADDRESS REMOTE-AS STATE ROUTES-RECEIVED
    0 159.148.42.158 2588 connected 1
    [admin@MikroTik] routing bgp>
    Normally, the print command pauses after the screen is full and asks whether to continue or not. Press any key other from [Q] or [q] to continue printing. The without-paging argument suppresses prompting after each screen of output.
    You can specify interval for repeating the command until [Ctrl]+[C] is pressed. Thus, you do not need to repeatedly press the [Up-Arrow] and [Enter] buttons to see repeated printouts of a changing list you want to monitor. Instead, you use the argument interval=2s for print.
    The other useful parameter is count-only, that shows the total number of items in the table.
    [admin@MikroTik] interface> print
    Flags: X - disabled, D - dynamic, R - running
    # NAME TYPE MTU
    0 R ether1 ether 1460
    1 R ether2 ether 1460
    2 R ether3 ether 1460
    3 R ether4 ether 1500
    [admin@MikroTik] interface> print count-only
    4
    [admin@MikroTik] interface>






Tópicos Similares

  1. Filtrar resultado vindo de um comando print no Mikrotik
    Por fsoaress76 no fórum Linguagens de Programação
    Respostas: 0
    Último Post: 12-10-2010, 14:38
  2. ajuda com comando print
    Por ederjohann no fórum Redes
    Respostas: 0
    Último Post: 13-01-2009, 10:33
  3. redirecionamento dando erro no comando
    Por wrochal no fórum Servidores de Rede
    Respostas: 4
    Último Post: 21-11-2002, 10:28
  4. Email Por Linha de Comando
    Por Mexicano no fórum Servidores de Rede
    Respostas: 1
    Último Post: 01-10-2002, 17:02
  5. Comandos
    Por serrato no fórum Servidores de Rede
    Respostas: 3
    Último Post: 03-06-2002, 11:33

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L