May 11, 2010

Mysql Queries in Linux

Linux General,

How to resolve mysql_connect() Error Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘username’@’localhost’ (using password: YES)

Read more
May 8, 2010

Does DNS use TCP or UDP or both?

Linux General,

TCP is a connection-oriented protocol and it requires data to be consistent at the destination and UDP is connection-less protocol and doesn’t require data to be consistent or don’t need a connection to be established with host for consistency of data.

Read more
May 7, 2010

Linux – Advanced Commands

Linux General,

Show status of ethernet interface eth0: ethtool eth0 List addresses for interfaces: ip addr show (OR) ip a Set default gateway: ip route add default via 1.2.3.254

Read more
May 7, 2010

Linux – Ethernet bonding

Linux General,

Linux bond or team multiple network interfaces (NIC) into single interface We have two Dell servers that need setup with Intel Dual Gig NIC. My idea is to improve performance by pumping out more data from both NIC without using any other method.

Read more
May 7, 2010

Linux – Tweaks

Linux General,

A. This is a bash function. It gets called recursively (recursive function). This is most horrible code for any Unix / Linux box. It is often used by sys admin to test user processes limitations (Linux process limits can be configured via /etc/security/limits.conf and PAM).

Read more
March 16, 2010

Extract the contents of an RPM

Linux General,

Using rpm2cpio command, the contents of an RPM package can be extracted without having to install the package. For source RPMs too this command can be used. This is illustrated with an example as follows, where we extract the contents of RPM, google-chrome-

Read more
March 13, 2010

Difference between Buffer and Cache

Linux General,

Buffers are allocated by various processes to use as input queues, etc. Most of the time, buffers are some processes’ output, and they are file buffers. A simplistic explanation of buffers is that they allow processes to temporarily store input in memory until the process can deal with it. Difference between Buffer and Cache Cache…

Read more
March 13, 2010

Memory Usage in Linux

Linux General,

Check the memory usage on a linux system with the command given below. The free command helps in getting the memory usage  in the system [rams@stopprepare-lx ~]$ free -m total       used       free     shared    buffers     cached Mem: 1002        985         17          0         93        380 -/+ buffers/cache: 512        490 Swap: 2055          0       2055 Total Memory in the system…

Read more
March 13, 2010

Disable the Error Beep in MySQL

Linux General,

To temporarily disable the beep, pass –no-beep along when logging into the server: %>mysql -u root -p –no-beep To permanently disable this annoyance, add no-beep to the [client] section of your .my.cnf file.

Read more
March 13, 2010

How FreeBSD identifies hard disks and drives

Linux General,

FreeBSD identifies various types of hard disks and drives with following naming convention ad ATAPI (IDE) disk da SCSI direct access disk acd ATAPI (IDE) CDROM cd SCSI CDROM fd Floppy disk To know the hardware detected by the kernel at boot time refer the file /var/run/dmesg.boot or use the command dmesg. The various hard…

Read more