Processes in Linux: Fun with Terminal

Warning: the content may increase your appetite for interest in Linux.
It’s a myth that “processes” are a complex concept. A process is an executing set of machine level instruction or code.
Whenever you are running an application, a process that belongs to this application is running. There are some processes which runs only in the background. They are called daemons in Linux. The process status, “ps” command shows the currently running processes.
Enough with the theory, now let’s get our hands dirty. Open a terminal session on your favorite Linux distribution.

The “ps” command has mainly two options

  • -e lists all running processes
  • -f shows full process status

At the terminal type “ps -ef

full_process_list_linux

  • UID – id of user who invoked terminal
  • PID – ID of that process
  • PPID – parent process ID of the running process
  • C – no. of child processes
  • STIME – start time
  • TTY – terminal executing the process, shows “?” when it is a daemon
  • CMD – name of the process

When the system boots only one process exists – the init process, which is invoked by kernel. Kernel is the core of an operating system on which all other drivers and applications exist and run. The first process on the list is thus always be init.

At the terminal type “ps -e

process_list_linux

How to initiate a background process?

Linux is a true multi-user, multitasking OS. You can run more than one process simultaneously. Type the program name followed by an ampersand(&) separated by a space

vlc &

vlc

The “&” allows to run vlc media player in the background of our parent shell.

  • [1] shows number of child process.
  • 3120 is the process ID(PID) of vlc.

 As a side note, try “ps” command on your Android phone or tablet. Fire up a terminal emulator and see what happens

android_processandroid_process_list

http://www.vipinonline.com/blog/2013/03/processes-in-linux-fun-with-terminal/

How to handle web traffic and spikes if your website has some static content

Today the main problem we all face in the world of the internet is that sometimes the response time of a website is high and sometime it do not respond at all may be due to the fact that it is getting chocked with the number of requests and not able to handle new requests.  As we know, Internet is network of networks and they communicate to each other based upon the business deal they have, not upon the performance. So the end user’s request might take longer path to reach out origin server or the server’s response might take longer path to reach end user. The other problem is that its really difficult to predict the incoming traffic always. There might be a sudden increase in traffic because of some campaigns or change in search engine result’s traffic and its practically not possible to scale up the server’s infrastructure for this short span of time and server may get crashed because of this sudden spike of traffic. So this article will explain you how to handle web traffic and how to handle spike of web traffic using  free cdn. After reading this article you will also know how to reduce load on server.

traffic spike

One of the best solution for such problems is that to use CDN [content deliver network]. Lets discuss what a CDN is.

What is CDN?

As per the wikipedia article the definition is

A content delivery network or content distribution network (CDN) is a system of computers containing copies of data placed at various nodes of a network.When properly designed and implemented, a CDN can improve access to the data it caches by increasing access bandwidth and redundancy and reducing access latency. Data content types often cached in CDNs include web objects (text, graphics, URLs and scripts), downloadable objects (media files, software, documents), applications, live streaming media, and database queries.

free cdn

So it means if you have some static content on your websites, like images, text files or some media files then you can “cache” them on CDN’s servers which are located near to the end user and deliver to them in faster and efficient manner. This way you can also minimize the hits to your server. All of the major sites today use some kind of CDN services. eg facebook uses the world’s largest CDN Akamai.

Which CDN to go for?

Well, if you are making good amount of money and you want the best performance then you can always go for big players like Akamai which will improve your website’s performance drastically [for dynamic contents as well]. But if your budget is small or you want the free service then you can use Cloudflare. They offer free plan to cache your static content and drastically reduce the load on your webserver. As i know Cloudflare is the only free CDN in the market. They will help you to reduce load on server and also they will help you to increase the website performance.

How they work?

Once you sign up for their service all you need to do is to change your nameservers to the one provided by them so that when the request comes, it gets mapped to their network first and if the requested object is found in their cache then it will be delivered from their itself. The request will only hit your server when requested object is not available in their server’s cache. In this way you can reduce the traffic hits to your server. And if the server’s load is reduced and there is a sudden increase in traffic, what we call spike, then also all hits will not come to your server directly. Instead they will go to their server. And hence there are greater chances of handling such traffic with existing infrastructure.

I hope this atricle will help the people, specially the one who wants to reduce the load on their server at low price or for free using free CDN. If you have any doubts then feel free to comment. Thank you.

Get Free Domain Name and Hosting at 1$ from netfirms

Get one free Domain Name and Hosting at 1$ for one year from netfirms. This is real and i personally checked and found it to be working absolutely fine. The tutorial was shared in facebook OUG group and since it might be useful for many people out here so i thought this to share with you. The tutorial is very simple and the offer is valid till 30th Nov only so you should get is before the offer expires.

Step 1:Use CCleaner .. Clear all cookies and cache after quitting the browsers.. (*Important)

Step 2:Register here – http://www.netfirms.com/affiliate/gettingstarted.bml

Use any domain while registering.. Keep the affiliate account logged in.

Step 3: go to http://goo.gl/9a0o0 and register for $1 Hosting + Domain

Step4: After registering for hosting, Ask the chat support (http://bit.ly/soK3QB) to add the domain credit. Then go to Domain Central in the hosting area and register the domain.

DOT Banned all major files sharing sites in India

DOT Banned all major filesharing sites in India including Rapidshare.com, mediafire.com, Megaupload.com, Mediafire.com, Megavideo.com, VideoBB.com, Novamov.com, Movshare.net, Putlocker.com, Hotfile.com, Fileserve.com, Filesonic.com, Filesonic.in, Depositfiles.com, Wupload.com.

This decision seem to be strange because still there are many porn sites are exploiting indian culture and they are not taken care of. This is major setback for these big hosting companies because India is one of the major source of web traffic to these sites. As per some officials this action was taken in order to prevent piracy.

DOT Banned all major files haring sites in India but it seems like none of the India netizens are supporting govt’s move of blocking the site. Slowly Indian govt is becoming more like Chinese govt but frankly telling you that govt is not capable of blocking these sites.

How to unblock the file sharing sites blocked in India

Unblocking these sites are not a big deal at all. All you need is some freeware tools that i discussed in some of my old posts where i told about using proxy, Using Tor, and other method of unblocking blocked sites. The simplest and best method is using ultrasurf.

I hope this post of mine have helped you. If you face any problem then feel free to comment.

The first step of SEO, Onsite SEO : Using Meta tags, Keywords and description

Till now we have discussed how to setup a website and I believe the basic steps that I have explained so far was helpful to you.

meta_tags

Once the site is up you need to make sure you make it suitable for search engines also so that when search engines’ crawler programs scans your website you site should clearly represent a clear picture what exactly your website is about and what exactly you are targeting.

How these meta tags looks like?

Well these tags should be included in the <head> </head>  section of your website.

<HEAD>
<TITLE>Write the keywords that describe your website</TITLE>
<META NAME=”DESCRIPTION” CONTENT=”Write the description, what your site is about”>
<META NAME=”KEYWORDS” CONTENT=”write your keywords separated by comma. You can write as many keywords you want but the optimum is around 7-10″>
</HEAD>

This is the most important and basic step of SEO [Search engine optimization]. This looks simple but it is mandatory. We will discuss more in detail in coming posts

The next step is to submit your website to search engines. That we will discuss in next post.

Creating the first webpage of your website

I believe till now you have read about or know selecting your domain name, Booking web hosting for your website and linking domain name and hosting space using nameservers. Now you are ready to make the first appearance of your website.

How to upload files to your server

Well, this can be done easily using any ftp client or directly from the control panel of your hosting account. Lets discuss how to upload using ftp.

There are many free ftp softwares and almost all of them does the same task of uploading/downloading file using ftp [file transfer protocol]. I personally use filezilla. Reason is very simple, its very easy to use and it is free and it is available for windows, mac and linux. Download from here. After installing them you might wonder how to use it but thanks to filezilla team that they have put such a simple tutorial on their website that you can very easily follow. You may read the filezilla tutorial here. Just upload the files to yout public_html or www directory and you are done. Please note that you should create an index file that will be loaded first on opening the website and recommended name is index.html or index.php depending upon the language you are using for creating your website.

There are tons of ready-made templates are available for free which you can customize and upload. If you want to create a dynamic site then its better to use some cms [content management system] softwares. The best of all is wordpress that i am currently using for this website. I will discuss wordpres installation process in my next post. Hope this post of mine helped you in some way. Please let me know your doubts in comments section.

How to get webhosting server to host your website

So far we have discussed the basics of creating a website, how to get domain name for your website and how to get domain name for free. Now in this post we will discuss about webhosting.

Once you have your website name ready you need a home for your website. This home is the webserver that host your website. You can host your website from your personal computer as well if you have static ip address and decent upload speed. But for that you need to have your computer 24/7 switched on and moreover if load increases on your website [increase in number of visitors] than the website performance will go down and it may get completely down. So to be on safe side its better to host your website files on those computers which are specifically meant for this purpose only.

How to chose the webhosting?

Well, this depends upon the type of website you are planning to create. There are some good free webhosting providers like freehostia, 000webhost, 100mb but to have a professional website its better to go for paid hosting.

There are three types of hosting

  • Shared hosting
  • VPS
  • Dedicated server

For beginners its always better to go for shared hosting. Shared hosting are the ones which host multiple user’s websites on the same webserver and on the same ip. Currently this website is also hosted on shared webhost. There are some very good service providers for hosting and i would list down a few of them. Please note that you may get very very cheap hosting providers but they may not be reliable. Based on my experience i am sharing a few good ones

  • hostgator
  • dreamhost
  • hostmonster
  • mellowhost

I am currently using mellow host and I have been using it from past 2 years and its service is really good so far. Hostgator is is also very good but they are a bit costly but you will get great quality service from them. Please make sure you use coupons readily available all across the web before booking your webhost so that you get the discounted price.

Once you start getting a decent traffic and load increase on server, your service provider will ask you to update the plan. This is the time for you to go for a vps. A vps is just like a dedicated server for you only difference is that they are using multiple vps on same server with the help of some virtualization engine.  If your server load increases further so that vps is unable to support then you will need a dedicated server. I will discuss all these things in details in future posts. I hope this post of mine was helpful to you. Please leave your comments if you want to share or ask anything.

Read what to do next