Showing posts with label IT Industry. Show all posts
Showing posts with label IT Industry. Show all posts

Saturday, April 10, 2010

Google DNS server

Now-a-days my airtel DSL connection's DNS servers fail to resolve some DNS addresses. I dont have an idea about what the problem is, but frequently I see many domains unable to be resolved and sometimes pretty slow too. So I decided to move to using the Google Open DNS Server. The IP is also a beautifully easy to remember - 8.8.8.8 . 8.8.4.4 is another DNS server of google which can be used as an alternate.

To keep this IP from being overwritten on my Fedora 12 Box, I figured out that the best way to do it would be to write a new file in /etc/NetworkManager/dispatcher.d/ which I names as 25-setdns with the following contents

#!/bin/sh
if [ "$2" = "up" ]; then
cp -f /etc/resolv.conf /etc/resolv.conf.BAK
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
fi

This will ensure that the Google DNS will always be used to resolve my domain names.

Do note that I took a very crude, but simple approach here since I dont use any VPNs. If you do use VPN software, then you should make sure that the google DNS is the next entry. since your VPN's local DNS will resolve your VPN internal domains, which are unknown to outside world!

For the paranoid, this is yet more information you are pushing to google! :D

Tuesday, March 16, 2010

32 bit build environment on 64 bit Linux machines

Generally we come across many application which were designed only for 32 bit operation. Although any 32 bit program can be compiled in a 64 bit environment, sometimes the makefile design makes this a huge pain to do. So sooner than later, we end up with a program which just would not compile in a 64 bit environment.

For those extreme cases, you can create a 32 bit chroot environment on your 64 bit box. To do this, first decide on which environment you would like based on the .cfg files in /etc/mock/. Then create a softlink to the particular config to default.cfg . Then just run mock init.

ln -s /etc/mock/fedora-12-i386.cfg /etc/mock/default.cfg
mock init

mock init will use yum to download the required environment. After it completes, then you can run

mock shell

to enter the 32 bit environement. To install any additional packages use the command

mock --install package-name

Note, this can be used simulate build environments other than x86 too, and is used for testing packages on various environments without the cost of physical machines or the pain of virtual machines.

Monday, May 11, 2009

Processor Name Confusions

It used to be confusing a lot when people talk about i386, x86, AMD64, opterons etc. However there are some minor (and some major) differences in these terms. I try to explain some of the differences in this post. Consider this a very brief history lesson too :)

BTW, I oversimplified some product lines, so that clarity is maintained.

8088:An 8 bit processor from Intel, one of the first ones. You wont find this anywhere on PCs [EDIT: This is actually a 16 bit processor with an 8-Bit external bus]

8086:A 16 bit processor from Intel. Code written for this processor will STILL execute on even the latest Xeon multi-core processors! Such is the level of backwards compatibility provided

80x86:This is used to indicate the processors after 8086 like 80186, 80286, 80386 etc. This has been shortened to "x86".

x86:See 80x86

286:This processor had some basic support for segmentation etc

386:This was the first 32 bit processor in the Intel line and had a fully supported protected mode (along with an MMU), paging etc, which enabled development of complicated operating systems like Windows, Linux etc which provide features like Virtual Memory, protection between user processes & kernel etc.

486, 586, 686:Subsequently improved versions of 386

Pentium:For All processors mentioned before, other companies like AMD etc could make similar clones, AND use the same name, essentially denying branding of Intel's products. Intel's efforts to trademark 386 were denied by the US Govt on the grounds that a number cannot be trademarked. So Intel released the Pentium Line of processors to overcome these trademark issues. It was now able to prevent other companies from using the same names as itself.

Athlon:After Intel trademarked Pentium name, AMD was forced to use a new name for its processor line. It chose Athlon.

Itanium:Itanium was a 64 bit processor from Intel which was NOT backwards compatible with the x86 line. It was also fundamentally different at the ISA level using a VLIW architecture instead of the standard CISC of the x86 line. This was a major disaster for Intel, since AMD undercut it by releasing a x86-backwards compatible 64 bit processor. Barring a few HP machines, this did not sell much.

Athlon64:After Itanium, which required special OS and application development was faltering in the market, AMD released the AMD64 ISA which was backwards compatible. The corresponding 64 bit processor was Athlon64.

Opteron:Opteron is the AMD's Server class processor

Xeon:Xeon was a newer x86 64 bit Server-Class processor which was compatible with the AMD64 ISA. (Intel actually chose to call it EM64t instead of AMD64) (The 64 bit desktop processor was simply Pentium IV with EM64t)

IA32:This is the processor Instruction Set Architecture (ISA) of the i386 and above, 32 bit processors. Although this used to be called the x86 ISA, it was retroactively named as IA32 by Intel after the release of the IA64 line

IA64:See Itanium

AMD64/EM64T:See Xeon. Linux takes a neutral approach and calls it x86_64 architecture.

Xeon with HyperThreading: Hyperthreading (from Intel) is the poor silbling of Multi-Cores. Basically using just one processor core (and cache etc) they try to execute multiple threads. Some applications actually faced decrease in performance with this enabled. AMD never bothered to implement this.

DualCore: Intel failed horribly while trying to push processor speeds to more than 10GHz. It conceptualized a new Processor Architecture called NetBurst, which was supposed to do this, but it was overheating at sub-5Ghz levels itself. So Intel cleverly shifted focus away from processor speeds to Processor Cores per Package. Now even 8 cores in a single package are also being developed.

I chose not cover the Mobile class of processors like Pentium M, Atom etc and the latest GPGPU offerings from NVidia etc as this post was getting too big!

Tuesday, October 28, 2008

Overcomming blurred images in firefox

While using firefox, I recently noticed that most of the images are blurred and/or having artifacts all over. Initially I could not understand why this was happening even with new tabs. But it looks like when you zoom in, in firefox (using Ctrl +/- or the mouse wheel), it zooms images too. Also firefox "remembers" the zoom settings in some way, so that it applies for new tabs too. This is counter productive for me, since the main reason I zoom in is to read the text better, not for images.

So for those of you who want to disable this image zooming feature of firefox, go to View -> Zoom -> Zoom Text Only.

Its a trivial tip, but it changed my browsing experience for the better!

Wednesday, October 22, 2008

Irritating defaults in Linux Applications

If there is one thing that Linux/Unix applications are famous for, other than being open source - it is the irritating defaults they set. And just when you figured out how to disable the most irritating ones, you upgrade to a newer version, and they flood you with even more irritating defaults.

Vim takes the prize in this behavior. Every time I upgrade my Fedora, I get a new version of vim, and while I stopped finding any actual improvements between the vim I used 7 years ago and now, the new set of irritating defaults gets me. After upgrading to Fedora 9, with Vim 7.1, this struck me again.

While writing a piece of C code, the program keeps highlighting matching braces, whenever my cursor passes over them. This is mightly irritating, and I could not think of one good reason for making this the default behavior. I am a hardcore programmer and I know where the F*** match for that brace is!!! And the worst part was figuring out what the offending setting was. I tried googling for it, but it was difficult, since the normal terms like "brace", "bracket", "highlight", "show brace", "show match" did not turn up any results about the offending behavior.

Then it struck me that I was searching with the wrong terms, and put in "vim irritating brace" into google and presto! there were tons of forums where people like me were bitching about that behavior. The answer to turn off the feature is to add this to your .vimrc file

let loaded_matchparen=1

Long way to go... before ppl stop messing around with defaults.. Linux is no longer just a programmer's system, but an end-user system. Not every one would like to spend hours trying to figure out why something has changed since their last upgrade... the sooner the linux developers realize this, the better.

Friday, September 19, 2008

Republican VP Sarah Palin's Yahoo! mail hacked

Two days ago, the email account of Ms. Sarah Palin, the current Governor of Alaska, as well as the Republican Vice Presidential Candidate's Yahoo! Email account - gov.sarah@yahoo.com was hacked. The nature of the hack is the well known "forgotten password" of Yahoo! link, which asks for some personal information before generating a new password. For a public figure like Palin, most of this information is not really private... which means the existing security measures need to be looked at in a different light. Even for normal ppl, the information is not too difficult to get, except that there are easier ways like keyboard logging, social engineering etc.

Most services on the web try to escape this predicament, by giving the option of mailing your new password to your email address. But alas this cannot work email accounts itself. It is important that this issue be addressed by Yahoo! and other webmail providers, since there are many people who lose information through such loopholes.

On your end, to reduce the possibility of such attacks, you should give fake information for such email accounts to prevent public information on the website. And you don't have to give the real name of your pet either! And for the love of God, remember that information, since if you forget that, no one is helping you out.

The complete log of emails and information used to hack the account is available at the Wikileaks website.

Tuesday, September 2, 2008

Google Chrome - A New Era


Recently I heard about this new browser from Google called Google Chrome, which will be available in (Surprise! Surprise!) Beta version. The Google guys, true to the innovative streak, made a comic, justifying yet another entry into the world of browsers, already filled up with heavy weights like IE, firefox etc. However after going through the feature list, I was realized that this was not just another browser. It's design was more closer technically to an Operating System, than to a browser.

There is a fundamental paradigm shift happening here. The browser is the new Operating System. We have already seen a ton of web applications, like Spreadsheet, presentation apps etc, most of which were thought to be almost impossible to run in a browser.

Microsoft with its Windows, is entrenched in the Desktop OS market. I do not see any operating system which can challenge its dominance there. But Google has, instead of taking it head-on, is completely circumventing the Operating System, making it as just another commodity. More than 20 years ago, IBM thought that hardware was the key and the operating system did not matter too much. Microsoft came and commoditized the underlying hardware, and things were never the same again.

I see the same thing happening now, with Google commoditizing the Operating System market. Beyond a point, people will stop caring about what OS their machine is running anymore than people now care about what BIOS their machine is running. (Just to complete the analogy, IBM made the mistake of not doing an exclusive license of DOS, which sealed its fate. Microsoft's mistake happened almost 9 years ago with the introduction of the XMLHttpRequest)

A New Era has begun. If Google can pull off this browser thing decently, then history will definitely repeat itself.