Friday, July 17, 2009

Make the lights of your NIC blink

If you work on a large network and you get sent to the server room to check out a certain network card, you might get lost in the multitude of network hardware. To find your certain NIC, SSH to the machine in question and do a

#sudo ethtool -o eth0

The lights of the network card should start blinking repeatedly

Flush DNS cache in Linux

If you happened to register a new domain name and you can’t access it, it may be your DNS cache that holds the problem. Here’s how to flush DNS cache in Linux:

#/etc/rc.d/init.d/nscd restart

Find out what RAM type you have in Linux

To check what RAM memory type yo have installed (and also see other useful information about your system), do a

#sudo dmidecode

Depending on the version of dmidecode you have installed and the hardware configuration you have, each hardware device will have a certain type number assigned t it. On my machine, the RAM has type 6. So to see what RAM type and speed you have, do a

#sudo dmidecode –type 6

and the output will be something like

dmidecode 2.9
SMBIOS 2.3 present.

Handle 0×0008, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: ROW-0
Bank Connections: 1 0
Current Speed: 800
Type: DIMM SDRAM
Installed Size: 256 MB (Double-bank Connection)
Enabled Size: 256 MB (Double-bank Connection)
Error Status: OK