Archive for the ‘Uncategorized’ Category

Building a robust Linux Server

Monday, January 5th, 2009

Building a robust Linux Server

Linux is known to be robust but here are few things that you can do to enhance this feature.

  1. RAID
  2. LVM

RAID (Redundant Array of Independent Disks)

RAID is use to achieve greater levels of performance, availability and reliability. It works on the concept of storing duplicating data or information about data (Meta date) to rebuild or regenerate it again in case if a failure. There are 5 level of RAID each enhancing data reliability with each increased levels.

LVM (logical volume management)

With RAID we have achieved data reliability now with LVM we add flexibility to it. The flexibility is to have n number to different physical drives grouped as one and later can be divided into disks of different sizes not warring about the actual individual physical disks size.

Advantages of LVM are:-

  1. It’s a method of allocating space on mass storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that can be resized or moved, possibly while it is being used.
  2. And most important feature is Snapshot; Snapshots can be useful for backing up self-consistent versions of volatile data like table files from a busy database, or for rolling back large changes in one swoop, such as an operating system upgrade.

Here is an example how I have put both these technologies to use making my server robust.

I have two hard drives and system is detected it as sda and sdb

    • sda1 + sdb1 = 100MB as md0 file system of ext3
    • sda2 + sdb2 = 20 GB as md1 file system of ext3
    • sda3 + sdb3 = 2 GB as md2 file system of swap
    • sda4 + sdb4 = as extended partition
    • sda5 + sdb5 = rest of the space as md3 file system of LVM so we can take snapshots

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config.html

http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager

GRMTECH Infrastructure at ‘ao’ office

Friday, January 2nd, 2009
Our server room Our conference room
   
Sys admin’s room Our workstations

Video monitoring system at ao.grmtech

Wednesday, December 17th, 2008

Video monitoring  system at ao.grmtech

Grmtech is equipped with the latest Video Monitoring Sytem that can record activities and sound in real time. Our infrastructure enables us to make use of remote online surveillance for raising the performance of the company and make the best use of it’s resources.

cam1cam2cam3cam4

Our noc.ao.grmtech Datacenter

Tuesday, December 2nd, 2008

We have a world class datacenter build on latest hardware and software technologies. Some of the latest technologies that we use in our datacenter are IP-KVM, IP Camera, Smooth Wall Firewall.

Our datacenter is already equipped with:-

  1. HVAC
  2. Fire Detection and Fire Suppression

Servers

Labeling_Cabling


IP KVM and USB KVM

SWITCHES

modem

Power Management

Are you wondering how we manage all these servers ?

We use a single display station connected to the IPKVM which is in turn connected to the USB KVM. Here are some pictures explaining how this all works.

sq1asq1

sq2sq3

sq4

We use a single display station connected to the IPKVM which is in turn connected to the USB KVM. Given below is a graphical representation of how it works with explanation.

The connectivity of bus wires starts from A and follows this path-

A -> B -> C -> D -> E -> F -> H & G -> I

A. One end of the VGA Cable is connected to multiple CPUs.
B. Other end of VGA cable is connected with a USB KVM.
C. A USB KVM (Keyboard, Video, Mouse) switch may be referred to as a hardware device that permits a user to control many computers with the help of a single KVM (Keyboard, video and mouse).
D. One end of USB KVM is connected with IP KVM using VGA cable.
E. IP KVM make use of dedicated micro controller as well as video capture hardware which is potentially specialized.This arrangement mainly serves as a means to capture keyboard, video and mouse signals.They are compressed and converted into packets and sent over an Ethernet link to remote console application thereby unpacking and reconstituting dynamic graphical images.

F. One end of VGA cable is connected with an IP KVM which is directly connected to monitor, mouse and a keyboard.

H. Monitor displays the output. With the help of mouse and keyboard we can control the server.
G. It is a network cable (LAN and WAN) connected with switch.
I. Output gets displayed on the VNC using IP access.

Are you wondering how we manage all these cables ?

We use different color network cables to recognize the task that they do. Here are some pictures with the explanation.

wire

We use 5 different colors to distinguish the cables according to their uses.

Red: The Red cable is used to connect WAN i.e. the connection between modem and Internet Sharing Server (ISS).

Green: The Green cable is used to connect LAN i.e. the connection between Internet Sharing Server (ISS) and network switch.

Yellow: The Yellow cable is used to connect the Gateway Computer to network switch.

White: The White cable is used to connect the network switch and the local physical server which runs important virtual server like Samba, Alpha, T2-backup, etc.


Blue: The Blue cable is used to connect the VOIP phone and the Network I/O or network switch.

Entry to the NOC Room is restricted.

rules
Some improvements in the pipeline for the data center are:

Radio Frequency Indentification

Are you aware of rel=”nofollow” links

Monday, November 24th, 2008

rel is a  link attribute and setting its value to no follow tells search engines that certain links on your webpage should not be followed or more importantly should not pass your web page’s hard earned reputation.

<a href=”www.test.com” rel=”nofollow”>test</a>

This can generally be very useful when you have a blog or other areas where you have user generated content like forums, guest books etc.

Suppose you have a blog with public commenting turned on, now links within those comment may pass some your pages reputation to other pages that you may not be willing to endorse. Specially blog commenting is very susceptible to such kind of spammy links. And linking to sites that google considers spammy can affect your website big time. However you can keep a check on such kind of links by CAPTCHA and turning on comment moderation.

Another advantage adding no follow links is suppose you are writing a content and want to add some kind of reference to a particular website but at the same time do not want to pass on your pages reputation you can use this property. For Example: Suppose you are writing a blog post of spammers and want to refer to his website and warn fellow bloggers by putting his links on your post, but you certainly don’t want to share your page’s value. So just by adding rel=”nofolow” to the links will solve your problem.

Also if you want that none of the links on your webpage should be followed you can add that in your robots meta tag in the head section of your website.

<meta name=”robots” content=”nofollow”>

This will nofollow all the link on that webpage

Note: some of the points written above are taken from Google’s Search Engine Optimization Guide

Want to make your website faster?

Saturday, November 8th, 2008

Do you like to wait for a website to load? No and neither do your visitor like it. Here are some tips that will help you make your website faster

Use Divs instead of Tables for your website layout

  • If you have a table based layout, then nothing will appear in the browser until the entire table is downloaded and rendered. An this may be very frustrating for the users.
  • Generally browsers read the through the tables twice. Once for the table structure and another time to fetch its content.
  • Table layout stored in each HTML page has to be downloaded each time a fresh page loads, but if you have a div based layout. You can store all the designing code in an external stylesheet. Which the browser can put in its cache.
  • CSS probably requires less code that complex table structure.

Write smart HTML code

The un-smart way is:

<p class=”para”>This is a paragraph</p>
<p class=”para”>This is a paragraph</p>
<p class=”para”>This is a paragraph</p>

But smart will write it as:
<div class=”para”>
<p>This is a paragraph</p>
<p>This is a paragraph</p>
<p>This is a paragraph</p>
</div>

The point is there is no sense in repeating the same style class individually for each and every paragraph. This may not look that significant. But believe me by doing this you can easily wipe off 15% – 20% of unnecessary code.

Use shorthand CSS properties

Use CSS shorthand properties like

Use margin: 10px 3px 15px 5px (top, right, bottom, left)

Instead of

margin-top: 10px
margin-right: 3px
margin-bottom: 15px
margin-left: 5px

Remove unnecessary white space

Many may not know that every single white consumes one bite. This may not sound like a much of a concern, but it all adds up. You may be able to save 10% of the total size.

You can do some server side scripting to wipe off all the white space from your html documents.

Put JS and CSS in external files

Always try and put JS and CSS into an external file.

Any external file is just called once by the browser and they cache it. Next even if the user navigates to another page, browser will fetch it from its own cache, making it very fast.

To place CSS in an external document use:

<link type=”text/css” rel=”stylesheet” href=”stylesheet.css” />

To place JavaScript in an external document use:

<script language=”JavaScript” src=”script.js” type=”text/javascript”></script>

Desktop configuration at Grmtech

Thursday, November 6th, 2008

The configuration of the software image:
OS: Win XP Pro with SP3

Organization of the Start->All Programs menu

1. Accessories -> Windows Standard accessories

2. Start up -> Use run->msconfig->startup to make sure that ONLY the following two softwares are getting loaded during start up:
a. spark
b. Norton Anti Virus 2009

3. Communication ->
1. Browsers a. Firefox version 3.0.6 b. IE (7.0) c. Chrome d. Opera(9.63)
2. Text Instant Messenger a. Spark (version 2.5.8) b. Google talk
3. Video and Voice chat a. Skype Version 4.0.0.206
4. Access Remote desktop a. VNC viewer(1.0.5.3) b. Windows Remote desktop connection client
5. Share screen a. Camtasia Studio (version 6.0.0)
7. Windows live sync

4. Utilities ->
1. PDF management a. Foxit PDF reader (version3.0.1301) b. PDF 995 c. Foxit PDF editor
2. ZIP file management a. Alzip (Version 7.0 beta 1)
3. Document management a. Paperport (Version 11)
4. Fax management a. efax messenger (Version 4.4.0.514)
5. Security management : Norton Anti virus 2009
6. Download Accelerator Plus (version 9.0.0.7)
7. WordWeb (Version 5.52)

5. Multimedia -> 1. VLC media player Version 0.9.8a 2. Windows Media Player

6. Microsoft Office -> 1. Word  2. Excel 3. Powerpoint (version office 2003)
The proofing tool should be installed from shared component.

7. Development -> 1. NuSphere PhpED (Version 5.2) 2. Putty 3. WinSCP (Version 4.1.8) 4. Webdrive (Version 8.22.2090) 5. ImgBurn (Version 2.4.2.0) 6. Dreamweaver (version 8 ) (We are not installing CS4, because it’s a very heavy application & the lighter version 8 is fulfilling the requirements.) 7. Daemon tools lite (Version 4.30.3)

user accounts
administrator / ******

Workgroup
grmtech

Size of image:
40 GB

Application specific Config
Firefox
1. Downloads go to dekstop/browser-downloads. This is configured using tools -> options -> main
2. Reducing the memory used by firefox. Follow the steps listed on: http://blog.codefront.net/2008/09/10/optimize-firefoxs-memory-usage-by-tweaking-session-preferences/

browser.sessionhistory.max_entries = 1
browser.sessionhistory.max_total_viewers = 1
browser.sessionstore.max_tabs_undo = 1
browser.sessionstore.interval = 1000000 milliseconds. = 1000 seconds.

network.http.max-connections = 48
network.http.max-connections-per-server = 24
network.http.max-persistent-connections-per-proxy = 12
network.http.max-persistent-connections-per-server = 6
network.http.pipelining = “true”
network.http.pipelining.maxrequests = 32
browser.cache.disk.capacity = 8192
network.http.pipelining.ssl = “true”
network.http.proxy.pipelining = “true”
nglayout.initialpaint.delay = 0
(If it does not exit, this entry has to be created by rightclicking anywhere and selecting new>Integer)
network.dns.disableIPv6 = “true”
image.animation_mode = “once”
network.prefetch-next = “false

3. Disable “Google update” firefox plugin (Tools>Add-ons>Plugins>Google Update>Disable).
4. Disable java from tools>option>content.

Icons on the Desktop
1. Recycle bin 2. browser-downloads

UltraVNC
UltraVNC server should be running in all computers. UltraVNC will be used to access remote desktop utilizing port-forwarding through our 1 Mbps internet connection (dedicated for external access). The workstations will be accessible with the port forwarding as 100+n (’n’ being the ws no.).

Putty
Has two saved session the names are:
root@www.grmtech.com:99
root@1.iss.ao.grmtech.com:99

Spark
1. Set to auto login and remember password

Windows OS
A. take the steps listed in http://www.grmtech.com/blog/boot-up-windows-xp-faster-than-ever/
B. The desktop background will be “Grmtech wallpaper”
C. Control panel -> Power options -> Grmtech power scheme
Grmtech power scheme is defined as:
Turn off monitor: After 2 minutes
Turn off hard disk: After 5 minutes
System standby: After 10 minutes
D. In security center make sure that the firewall is turned on.
Also in the exception list only the following applications should be allowed:
1. skype
2. Symantec service framework

Camtasia Studio
1. Launch on startup -> is checked off.

Windows and Other software’s Auto Update Policy
Make sure windows and all other software’s are set to non auto update. All updates will be rolled out when the new disk image of the OS is rolled out.

Options in the quick launch bar:
1. Show desktop
2. Windows explorer
3. Firefox
4. Putty

Taskbar properties
1. Right click on it and choose lock the taskbar.

Mozilla addons
1. Colorzilla
2. Firebug
3. Googlebar lite
4. Live HTTP Headers
5. MeasureIt
6. Scrapbook
7. Web Developer
*All add-ons are disabled by default

Mozilla plugins
1. Flash

Other steps we are taking to improve performance:
1. use msconfig to disable as much start up services and applications of windows. (Startup disabled:googletalk,  Skype & google update. BOOT.INI: set check /NOGUIBOOT checkbox)
2. Google update must be uninstalled.

Two applications in continuous used by Grmtech employees are:
1. Spark
2. Firefox.

4 tabs which are opened in firefox and used by Grmtech employees are:
1. gmail
2. crm
3. couple of google spreadsheets with lots of sub sheets and data in them.
4. browsing

We need to make sure that when the above two applications are running the system remains responsive.

IM : Do we use Spark or Exodus?

Advantages of Exodus: It’s hierarchical architecture makes it very easy to find any specific person/contact, as the menu is pretty organized just like multilevel tree. Multilevel structure is better for a group having more members.
Tweak:
Exodus can be customized by modifying it’s supporting file Exodus.xml (<OS_Drive>:Documents and Settings<user_account_name>Application DataExodusExodus.xml)
Problem statement
: Exodus must support web chat.