Monday, December 12, 2011

How to change Network Interface Speed in Linux?

Network interface speed can be changed using the ethtool command.

Display ethernet card settings:

[root@localhost ~]# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
  100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
        Link detected: yes

To Change the Network Speed to Duplex as below

# ethtool -s eth0 autoneg off speed 100 duplex full

Friday, December 2, 2011

How to fix Corrupt Yum Auth Cache?

How to fix the corrupted  pickle yum credentials error as below?

# yum update
Loading "rhnplugin" plugin
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
  File "/usr/share/yum-cli/", line 85, in main
  File "/usr/share/yum-cli/", line 163, in getOptionsConfig
  File "/usr/lib/python2.4/site-packages/yum/", line 183, in _getConfig'init')
  File "/usr/lib/python2.4/site-packages/yum/", line 169, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/", line 110, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/", line 211, in getLoginInfo
  File "/usr/share/rhn/up2date_client/", line 159, in login
    if readCachedLogin():
  File "/usr/share/rhn/up2date_client/", line 120, in readCachedLogin
    data = pickle.load(pcklAuth)
  File "/usr/lib64/python2.4/", line 1390, in load
    return Unpickler(file).load()
  File "/usr/lib64/python2.4/", line 872, in load
  File "/usr/lib64/python2.4/", line 894, in load_eof
    raise EOFError

It has been fixed by removing the loginAuth.pkl as below.

# rm /var/spool/up2date/loginAuth.pkl