Archives

Thu
11
Jan
Sarath Pillai's picture

How To Run Multiple Commands In Parallel on Linux

Parallal Execution of Commands in Linux

Traditionally computers can only do one single thing at a time. It generally does not do multitasking. Well, in most cases (with single core computers - meaning computers with one single CPU), the computer gives you an illusion that multiple things are happening simultaneously.  

 

You might be running multiple things at the same time on a computer, but the computer will always execute one single task from your list of tasks at a time. But it will quickly switch to the next task, and then the next task and then the next (so basically in a way you can say that multiple tasks are progressing one by one).

 

Mon
08
Jan
Sarath Pillai's picture

How to Increase the Size of Root Volume in Google Cloud Platform - GCP

Increase Root Volume

Google cloud platform is one of the popular public cloud providers out there. It has many features like Load Balancing, Container Engine (to run docker containers in google cloud), Virtual Private Networks, Interconnecting services (to connect your in house network to cloud), SQL Services, Object storage services and many more. In this article, we will be discussing one basic and very essential activity that we all need to perform when required.  

 

Wed
03
Jan
Sarath Pillai's picture

How Does Ansible Work ?

How Does Ansible Work

Imagine that you are a Linux System Administrator, working for a small financial services company. Your company being in the finance sector, is always worried, about security of the applications and servers.

Your company recently took a critical step of firing an engineer on the charges of leaking financial and business critical data to an outsider.

Let us assume that you are now assigned with a task to remove and disable the recently fired employee's user on all the servers in your critical environment. This being a very critical and security related stuff, you do not have much time at hand to plan this out. There are around 50 servers in your environment, which should be patched asap.

 

Mon
01
Jan
Sarath Pillai's picture

Terraform Tutorial: How to Install Terraform ?

How to Install Terraform on Mac and Linux

Cloud infrastructure is being leveraged by almost everyone these days. There are many configuration management tools to manage configuration state of the servers in the form of code. Tools like Puppet, Chef and Ansible are well suited for configuration management. Managing things with code is much more reliable compared to manual effort put by system administrators and operations engineers, it also brings in all the good things that software development methodologies offer(like versioning the configuration state, reverting to a previous state, and collaboration). 

Cloud Infrastructure can also be dealt in the form of code. Hence there are a number of tools that are generally called "Provisioning tools". We are going to see the method to install one such provisioning tool called Terraform on Linux & Mac.

Mon
01
Jan
Sarath Pillai's picture

Terraform Tutorial: What is Terraform ?

Terraform Tutorial: What is It?

I am sure about the fact that by now, most of us have used public cloud services like AWS, Azure, & Google Cloud. Well, if not all three, at least aws for sure(because aws is the biggest player in the public cloud service offering). Creating your infrastructure on top of these public cloud is pretty straightforward and easy, if done manually, by using their respective web console.  However, it is not that simple to automate the infrastructure building process in a reusable fashion. Please keep the fact in mind that we are talking about automating the “infrastructure” here and not about your applications and services running on your servers.
 

When I say infrastructure, I am referring to the below in the cloud..

Sun
24
Dec
Sarath Pillai's picture

What is if __name__ == "__main__" in Python

if __name__ == "__main__" in Python

Python is one of the growing high level languages out there. That claim is not without proof. In the recent list of language popularity published by GitHub, Python was in the top list. In fact it is the second most popular language (the first place is currently held by JavaScript). The syntax of python is quite straight forward and easy to understand, without the confusing curly braces all over the place. 

 

Another reason for Python's popularity is its use as a server side scripting language. System administrators can leverage Python to get their boring routine work automated.  With the availability of ready made modules for almost everything, its quite easy to implement something in Python these days.

 

Mon
20
Nov
Sarath Pillai's picture

Understanding Differentiated Services (TOS) field in Internet Protocol Header

ToS & DS in IPv4

IP is the main backbone protocol of the internet(also it is one of the main protocol inside the TCP/IP protocol suite). In other words, irrespective of whether you are using TCP, UDP, or ICMP, the actual data gets transmitted using IP protocol.  IP does not provide any guarantee about delivery, it is completely connectionless. Hence, it is the responsibility of the protocols above IP in the layer to provide proper error free delivery(ie: TCP).

 

Similar to other protocols, apart from the data it carries, IP also has some details and control information attached to each message(ie: each ip datagram). This information tells how the datagram should be interpreted and operated upon. This is generally referred to as protocol headers. The IP protocol header looks like the below.

Thu
09
Nov
Sarath Pillai's picture

Nohup Command Tutorial in Linux with Example Usage

Nohup Command in Linux

Any command that you execute in Linux will have a corresponding process associated with it. Even commands that are generally short lived (like grep, cat, ls, and so on..), will have a process associated with it. All these processes has three things in common.  I must actually say 4 things in common. The fourth thing is the parent process. The only process that does not have a parent is INIT process in Linux.  These four things are mentioned below.

  • Standard Input

  • Standard Output

  • Standard Error

  • Parent Process

Sun
22
Oct
Sarath Pillai's picture

How To Install And Configure AWS CLI on Ubuntu 16.04

Install AWS CLI Ubuntu 16.04

AWS(Amazon Web Services) is one of the first best public cloud service provider. It has grown to such an extent that now cloud is very much synonymous to aws. One of the reasons for its popularity is the easy to use web interface and the wide range of services offered.

 

Apart from the easy to use web interface, they also provide a command line based tool to access different services. This is a handy tool, that can be used to automate, trigger some events, and do things in aws cloud from a linux cli. Basically services like EC2 (create instances, stop instances etc), S3 (store and retrieve files), cloudwatch monitoring, elastic load balancing, autoscaling, and many more can all be accessed using this cli tool. It is called AWS CLI.

Mon
24
Jul
Sarath Pillai's picture

Expect Command Tutorial in Linux With Example Usage

Expect Command In Linux

Automating repetitive task is a norm in the life of a system administrator. Mostly administrators write scripts in different programming languages to take care of this repetitive tasks.
 

The default choice for most Linux system administrators is to leverage the “BASH shell” and its scripting capabilities. Unlike Python, Ruby and Perl, Bash is not a full fledged programming language.
 

But it does provide a lot of programming features to get the job done(For example conditional statements, case statements, and a lot of built in features to make decisions in a script). As its not a full fledged language, you have to use other small programs to get your job done. 
 

Pages

Subscribe to RSS - Archives