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-beta_current_i386.rpm. $ rpm2cpio google-chrome-beta_current_i386.rpm | cpio -idv ./etc/cron.daily ./etc/cron.daily/google-chrome ./opt/google/chrome ./opt/google/chrome/chrome ./opt/google/chrome/chrome-sandbox ./opt/google/chrome/chrome.pak…
Read moreNagios Installation and Configuration
Linux General,Monitoring,Nagios Installation in Ubuntu Required Packages Install the following packages on Ubuntu before continuing. Apache 2 PHP GCC compiler and development libraries GD development libraries If not installed, using apt-get the above packages can be installed as follows sudo apt-get install apache2 sudo apt-get install libapache2-mod-php5 sudo apt-get install build-essential sudo apt-get install libgd2-xpm-dev Create…
Read moreNagios – An Introduction
Linux General,Monitoring,What is Nagios? Nagios is a framework for setting up monitoring of hosts, services, and networks . What are the components of Nagios? nagios – the main server software and web scripts nagios-plugins – the common set of check scripts used to query services nagios-nrpe – Nagios Remote Plugin Executor nagios-nsca – Nagios Service Check…
Read moreFirewall – Reject or Drop a packet
Linux/Windows Support,Firewall – Reject or Drop a packet While setting up firewall rules, the biggest question that arises while blocking a packet is, whether to reject or drop that packet. Reject a packet – Block the packet with an error response to the sender of the packet. Drop a packet – Block the packet without any…
Read moreHTTP Response Status Codes information
HTTP/WebServer,The HTTP status codes are divided into categories based on the first digit in the code Code Category Type Code Category Type 1nn Informational 2nn Success 3nn Redirection 4nn Client Error 5nn Server Error 1nn – Informational Codes 100 Continue 101 Switching Protocols 2nn - Success Codes 200 OK 201 Created 202 Accepted 203 Non-Authoritative…
Read moreDifference 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 moreMemory 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 moreRendering MySQL query results in vertical format
FreeBSD,Linux General,MySQL,Easily reviewing SELECT query results in a shell window can be particularly difficult when a table consists of numerous columns. Remedying this inconvenience is easily done by appending the \G switch to the query: mysql>SELECT * from users WHERE id=1\G Executing this query with the \G switch attached formats the output like so: mysql test>select…
Read moreDisable 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 moreHow 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