New server in Chicago for the east coast traffic

On this server the operating system is installed on the 8GB compact flash card. So that the 10 hard drives of 1 TB each can be dedicated just to store the data in Raid1 and LVM on top of it.

Some of the things we are doing to install the OS on the flash card:
1. /var will be on the hard disk.
2. noatime for each of the partitions mounted on the flash card.

This article helped us quite a lot in optimizing our OS installation for the flash card:

Tata Indicom port restriction of 512 Kbps on Cisco 2950

The ISP has a black cable that is the input to the box made by “Mc Mans tel”. Here is a picture showing the manufacturer of the box.


Here is the picture showing the cable flow in and out of the “Mc Mans tel” box


From this black box made by McManstel there are two yellow eth5 cables that come out and go inside the Cisco Catalyst 2950 switch.


Cisco 2950 is a 24 port switch and on the far left of the following picture you will see the two output wires green and grey coming out of the cisco switch and going to my linux servers.


The probpem is:

1. Each port on the cisco 2950 switch is restricted to 512 Kbps of upload. I can get 12 Mbps of upload speed but for that I will need to run 24 parallel connections. I am hoping to get that 12Mbps of upload with just one port of the cisco 2950 switch instead of having to use all the 24 ports.

Wondering what is the solution ?

A brief intro to SVN

SVN is acronym as Subversion, a version control system. It lets several developers work on the same project at once without worrying about overwriting each other’s changes, and keeps track of previous versions of files. It is used to maintain the revisions of files such as source code, web pages and documentation. It is commonly used in many open source projects. The version control system puts all versions of a file in a place called repository. Source control tools track all prior versions of all files, allowing developers to “time travel” backward and forward in their software to determine when and where bugs are introduced. If a mistake is made, files can be rolled back to previous version. Subversion was started in 2000 as an effort to write a free version control system.

Subversion is designed to replace the commonly used CVS (Concurrent Versions System). The biggest change between CVS and Subversion is that Subversion versions the entire repository, instead of individual files.

Subversion offers two types of repository storage — Berkeley DB and FSFS

Berkeley DB – It is a very reliable database system. SVN uses Berkeley DB logging facilities, which means that the database first writes to on-disk log files a description of any modifications it is about to make, and then makes the modification itself. This is to ensure that if anything goes wrong, the database system can back up to a previous checkpoint—a location in the log files known not to be corrupt—and replay transactions until the data is restored to a usable state. But it has some limitations. First, Berkeley DB environments are not portable. We cannot simply copy a Subversion repository that was created on a UNIX system onto a Windows system and expect it to work.

FSFS – In mid 2004 FSFS (Fast Secure File System) repository came into being. FSFS works faster on directories with a large number of files and takes less disk space. An FSFS repository stores a revision tree in a single file. This storage format is portable across different operating systems and isn’t sensitive to CPU architecture. Transactions are created in separate sub directories. When complete, a single transaction file is created and moved to the revisions directory.

Basic SVN commands are:-

svn help
This will make svn list all the available functions.

svn co/checkout <Source repository path> <Destination path>
This command is used to pull an SVN tree from the server. If the directory structure is changed then it may occasionally need to delete the local copy and re-check it out.

svn st/status
Checks the status of the working copy.

?‘ Item is not under version control.
A‘ Item is scheduled for Addition.
D‘ Item is scheduled for Deletion.
M‘ Item has been modified.
C‘ Item is in conflict with updates received from the repository.
I‘ Item is being ignored (e.g. with the svn:ignore property).
!‘ Item is missing (e.g. someone has moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).
L‘ Item is locked.
~‘ Item is versioned as a directory, but has been replaced by a file, or vice versa.

svn add <filename|folder>
Add files, directories to the working copy and schedule them for addition to the repository. They will be added to the repository on next commit.

svn diff <filename>
Shows the difference of all modifications to file.

svn revert <filename>
Reverts back to the previous version and discard all modifications made in file.

svn ci/commit <filename|folder> -m “Comment: Commit message here”
Commit the changes made in file to the repository with new version.

svn up/update <filename>
Bring the current up-to-date working copy to the repository.

svn delete <filename|folder>
Delete files, directories from working copy and schedule them for deletion to the repository. They will be deleted from repository on next commit.

svn cleanup
Cleanup subversion files resulting from escaped processes and crashed. Recursively clean up the working copy.

svn info <filename>
Display information about file or directory. (Date modified, author, revision, path in repository.)

svn mkdir <folder>
Create a new directory under version control.

svn mv/move <folder1> <folder2>
svn mv/move <file-old-name> <file-new-name>
Rename or move a file or directory. Moves/renames file/directory in repository and in local work area.


Zabbix configuration at CO office of Grmtech

Zabbix is a distributed monitoring solution to monitor servers and applications of an enterprise.

Following are the steps of configuration of Zabbix Server at Grmtech’s CO office monitoring server:-
1. Download zabbix source files.

cd /usr/src/
tar -xzf /usr/src/zabbix-1.6.2.tar.gz -C /gt/fsrvthis/

2. Create zabbix database and import the database structure, default templates and other database configurations provided with zabbix source.

mysql -u root -p
create database zabbix;
cd /gt/fsrvthis/zabbix-1.6.2/create/schema/
mysql -u root –force zabbix –password=passwd <mysql.sql
cd /gt/fsrvthis/zabbix-1.6.2/create/data
mysql -u root –force zabbix –password=passwd < data.sql
mysql -u root –force zabbix –password=passwd < images_mysql.sql

3. Compile and build zabbix source files.

cd /gt/fsrvthis/zabbix-1.6.2/
./configure –enable-server –enable-agent –with-mysql –with-net-snmp –with-libcurl
make install

4. Configure zabbix server and agent settings

mkdir /etc/zabbix
cp /gt/fsrvthis/zabbix-1.6.2/misc/conf/zabbix_server.conf
Set DBPassword=passwd in /etc/zabbix/zabbix_server.conf
cp /gt/fsrvthis/zabbix-1.6.2/misc/conf/zabbix_agentd.conf /etc/zabbix/

5. Create zabbix group and zabbix user. Set zabbix to run under zabbix user and zabbix group.

groupadd zabbix
useradd zabbix -g zabbix -s /sbin/nologin
passwd zabbix
chown zabbix:zabbix /usr/local/sbin/zabbix

6. Install Zabbix as a service

cp /gt/fsrvthis/zabbix-1.6.2/misc/init.d/redhat/8.0/zabbix* /etc/init.d/
chmod 755 /etc/init.d/zabbix*

In /etc/init.d/zabbix_agentd file set progdir=”/usr/local/sbin/”
In /etc/init.d/zabbix_server file set progdir=”/usr/local/sbin/”

7. Auto start the zabbix server and agent when server boots

chkconfig –-add zabbix_agentd
chkconfig –-add zabbix_server
chkconfig –-level 3 zabbix_server on
chkconfig –-level 3 zabbix_agentd on

8. Start and check zabbix server

service zabbix_server start
cat /tmp/zabbix_server.log

9. Do a simple test to see if the server is listening:

telnet localhost 10051

10. Start and check zabbix agentd

service zabbix_agentd start
cat /tmp/zabbix_agentd.log

11. Configure php.ini settings

max_execution_time = 300
memory_limit = 256M
date.timezone = America/Los_Angeles

12. Restart httpd server

service httpd restart

13. Install the web interface zabbix server

cp -r /gt/fsrvthis/zabbix-1.6.2/frontends/php/*    /var/www/html/

14. Open the url http://zabbix_server_ip_address/ in a browser and follow the steps installation
Edit and put the below given code in /var/www/html/conf/zabbix.conf.php

global $DB;
$DB[“SERVER”]= “localhost”;
$DB[“PORT”]= “0”;
$DB[“DATABASE”]= “zabbix”;
$DB[“USER”]= “root”;
$DB[“PASSWORD”]= “passwd”;
$ZBX_SERVER= “localhost”;
$ZBX_SERVER_PORT= “10051”;

15. Start zabbix server in distributed mode.

cd /usr/local/sbin
./zabbix_server -n 1

16. Login to zabbix web interface and manage the zabbix server.

Uid: Admin
Pwd: zabbix

Continue reading “Zabbix configuration at CO office of Grmtech”

New server c1b1 at our Fremont California data center

Due to heavy traffic our old database server is not able to handle the load so we have deployed a new server, its hardware configuration is :

New Door Access And Attendance Tracking Implementation