Tricky Things : 2

1. Create any size file

# dd if=/dev/zero of=video2MB.mp4 bs=2000000 count=1
1+0 records in
1+0 records out
2000000 bytes (2.0 MB) copied, 0.00441764 s, 453 MB/s

[root@origin rewrite]# ls -lrth

-rw-r--r--. 1 root root 9.6M May  2 11:19 video2MB.mp4



2. Detail information about any interface:


# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000003 (3)
        Link detected: no



3.  Incoming/outgoing traffice monitoring for an interface:

#[root@origin rewrite]# iftop -i eth4
interface: eth4
IP address is: 10.121.122.18
MAC address is: ac:16:2d:89:89:b8
                          12.5kb                    25.0kb                     37.5kb                    50.0kb               62.5kb
+-------------------------+-------------------------+--------------------------+-------------------------+--------------------------
10.121.122.18                                        => e788ae1db55c88.ericsson.se                            816b    893b   1.28kb
                                                     <=                                                       160b    160b    185b
10.121.122.18                                        => megatron.nala.lmc.ericsson.se                           0b      0b     67b
                                                     <=                                                         0b      0b    123b



------------------------------------------------------------------------------------------------------------------------------------
TX:             cum:   4.37kB   peak:   3.75kb                                                      rates:    816b    893b   1.35kb
RX:                     999B            1.87kb                                                                160b    160b    307b
TOTAL:                 5.35kB           5.62kb                                                                976b   1.03kb  1.65kb






3. Command to see the routing/IP rule set by the host to handle different functionality e.g. transparent proxy:

# ip rule
0:      from all lookup local
32765:  from all fwmark 0x1 lookup 100
32766:  from all lookup main
32767:  from all lookup default

































Comments

Popular Posts