Posts

Showing posts from October, 2011

Tuning Up Squid

                  Specifying RAM Size   To improve performance, squid can actually store objects directly to Main Memory (RAM) to serve them to clients. And even though the ‘space available’ is far lower compared to Secondary Storage Devices (Hard Disk), the ‘fetch time’ is significantly higher. As a result, a significant change of performance can be seen. Step 1: Finding out the RAM usage root@firefly:~# free -m OR root@firefly:~# top Step 2: Allocating RAM Always make sure to back up the configuration file before editing root@firefly:~# vim /etc/squid/squid.conf     cache_mem 128 MB     maximum_object_size_in_memory 1 MB The first option specifies that 128 MB from RAM would be used by squid for storing 'hot' objects. The second option states that the maximum size of a stored 'hot' object would be 1 MB, implying that maximum of 128 objects may be stored in the RAM. NOTE: Please make sure that the allocated memory size is less than th

Cacti Ping Latency Graph Problem SOLVED

I was having difficulty with generating ping latency graph using Cacti in Debian 6. Being a novice in Cacti, I was not sure what was causing the "-nan" output in the ping latency graphs. It may be mentioned that I was getting bandwidth usage graph without any problem. Well, the solution is here. Before we start with the explanation, let's check something interesting. Debian 6 root@firefly:~# ping google.com 64 bytes from fra07s07-in-f147.1e100.net (209.85.148.147): icmp _ req =1 ttl=53 time=303 ms UBUNTU sarmed@sarmed-ubuntu:~$ ping google.com 64 bytes from hx-in-f99.1e100.net (74.125.71.99): icmp _ seq =1 ttl=47 time=302 ms Notice the difference in the output? Interesting, eh? Now, to the root cause of the problem. Cacti uses a perl script "ping.pl" for pinging a host. The graph is generated from the output of the script. root@firefly:~# cat /usr/share/cacti/site/scripts/ping.pl #!/usr/bin/perl # take care for tcp:hostname or TCP:ip@ $

RAID Parity (From Wikipedia)

Further information: Parity bit Many RAID levels employ an error protection scheme called "parity". Most use the simple XOR parity described in this section, but RAID 6 uses two separate parities based respectively on addition and multiplication in a particular Galois Field [7] or Reed-Solomon error correction . XOR parity calculation is a widely used method in information technology to provide fault tolerance in a given set of data. In Boolean logic , there is an operation called exclusive or (XOR), meaning "one or the other, but not neither and not both." For example: 0 XOR 0 = 0 0 XOR 1 = 1 1 XOR 0 = 1 1 XOR 1 = 0 The XOR operator is central to how parity data is created and used within an array. It is used both for the protection of data, as well as for the recovery of missing data. As an example, consider a simple RAID made up of 6 drives (4 for data, 1 for parity, and 1 for use as a hot spare), where each drive has only a single byte wort

The DHCP Server

The DHCP Server The Dynamic Host Configuration Protocol (DHCP) provides a method for hosts on a network to request, and be granted, configuration information including the addresses of routers and name servers. Usually, there is a single DHCP server per network segment, but in some cases there may be more than one. IP addresses assigned from a range of addresses i.e. pool by DHCP. The assignments are made for a configurable amount of time i.e. lease period and may be renewed by the client after lease expires. If desired, the server can be configured to accept requests from a specific set of MAC addresses. Typically, the server supplies information about the network’s subnet address and netmask, its default gateway, domain name and DNS server, time servers and location of kickstart configuration files as per required. In Red Hat Enterprise Linux, the DHCP service is performed by the dhcpd daemon. Service Profile: DHCP ·          Type: SystemV-managed service ·         

RPM Forge for CentOS

I'm using CentOS 5.5. I'll skip the intro and go straight to the commands- i386 wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm x86_64 wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm # rpm -ivh rpmforge-release-0.5.2-2.el5.rf.*.rpm # rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt And you're done!!! :D Try yum install package-name . Should work. OPENWEBMAIL Repository for Red Hat # lftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo # rpm -ivh openwebmail.repo # yum install openwebmail And that's it!!! :D

RHEL vs. CentOS

When it comes to small business to enterprise level servers, a lot of professionals choose Red Hat Enterprise Linux (RHEL). However, I prefer to deploy Community Enterprise Operating System (CentOS). I give my arguments - When it comes to OS architecture, both RHEL and CentOS are identical. Both RHEL and CentOS are capable taking really heavy load yet providing smooth, stable service. CentOS is actually a clone of RHEL. All the function and features that RHEL offers, CentOS has the same features and functions. But the MAJOR difference is that, RHEL is a COMMERCIAL product. Yes, surely you can download a copy of RHEL and nobody will ever sue you for that (as far as I know). But a free version of RHEL has some major limitations. Finding and synchronizing with an online software repository for RHEL is pretty tough. RHEL maintains it's own software and security repository, but it comes at a price. CentOS also maintains it's own software repository, but it doesn't

The YUM Server

The YUM Server The RPM Package Manager is used for distribution, installation, upgrading and removal of software on Red Hat Systems. Originally designed to be used in Red Hat Linux, the RPM is used by many GNU/Linux distributions. [1] The RPM system consists of a local database, the rpm executable, the rpm package files. The local RPM database is maintained in /var/lib/rpm. The database stores information about installed packages such as file attributes and package prerequisites. Software to be installed using rpm is distributed through rpm package files, which are essentially compressed archives of files and associated dependency information. Dependency Problems When installing software via rpm , one of the problems that users face is dependency errors. The primary drawback of RPM is that it not able to resolve dependencies i.e. additional RPMs that have to be preinstalled before a certain RPM can be installed. In worst cases, the pre-required rpm itself requires anothe

To Do List in Ubuntu

I have recently started using Ubuntu 10 in my office PC. So far, I have been enjoying the experience. It's fast, stable and gave me a break from Windows interface after 10 years. But like most people, I have been having a bit trouble with necessary software. I have manged to find alternate software, wine for windows based software, but there are still a couple of things that I could not manage. For example, I prefer the 'to do list' of google-gadgets when I work in Windows. But the google-gadget of Linux has no 'to do list' yet. After trying a couple of methods, Google finally pointed me to a solution. http://www.makeuseof.com/tag/5-excellent-todo-list-apps-for-linux-that-you-might-not-have-heard-of/ I have already installed 'tasque' with a simple apt-get command and I love this lightweight organizer software :D. Thank you google and thank you publisher. Linux Rocks!!!