Monday, 28 July 2014

Easiest way to force interface to full duplex on linux

sudo ethtool -s eth0 autoneg off speed 100 duplex full

this can be verified with

sudo ethtool eth0

and should report something like:

Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Advertised link modes:  Not reported
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Speed: 100Mb/s
    Duplex: Full

    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: off
    MDI-X: Unknown
    Current message level: 0x000060e4 (24804)
                   link ifup rx_err tx_err hw wol
    Link detected: yes

Thursday, 17 July 2014

How to determine if filesystem or drive is mounted Read Only in linux

The easiest way is via the command line with:
grep "\sro[\s,]" /proc/mounts

And a further command line to see the mount points:
mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1  "\n Mountpoint: "  $3}'