SIGTERM, SIGKILL, SIGSTOP and SIGCONT

What is SIGTERM?

SIGTERM means SIGnal and TERMinate ,In UNIX-like systems the SIGTERM signal is used for terminating a program.

The SIGTERM can also be referred as soft kill because the process that receives the SIGTERM signal may choose to ignore it.

In other words, it’s the polite and safe way of killing a process.

By default, kill command sends the SIGTERM signal. You may explicitly mention it with -15 .

How to use SIGTERM command

kill <process_id>

or

kill -15 <process_id>

or

kill -SIGTERM <process_id>

What is SIGKILL?

The SIGKILL is used for immediate termination of a process. This signal cannot be ignored /blocked. …


What is Elasticsearch?

  • Elasticsearch is a distributed, open-source search and analytics engine for all types of data, including textual, numerical, geospatial, structured, and unstructured.
  • Built on Apache Lucene and developed in Java
  • It allows you to store, search, and analyze huge volumes of data quickly and in near real-time and give back answers in milliseconds. It’s able to achieve fast search responses because instead of searching the text directly, it searches the index.
  • It uses a structure based on documents instead of tables and schemas and comes with extensive REST APIs for storing and searching the data.
  • The data is stored in the…


One of the slightly tricky concepts to understand is hashing in the context of load balancing.

In order to understand this, please check out how hashing works at a conceptual level. The TL;DR is that hashing converts an input into a fixed-size value, often an integer value (the hash).

One of the key principles for a good hashing algorithm is that the function must be deterministic, which is a fancy way for saying that identical inputs will generate identical outputs when passed into the function. So, deterministic means — if I pass in the string “Hello” (case sensitive) and the…


before we check on Custom Lookups, let’s see the basics and understand what is a Lookup

So what’s a Lookup …

As per the Django docs

Field lookups are how you specify the meat of an SQL WHERE clause. They’re specified as keyword arguments to the QuerySet methods filter(), exclude() and get().

not very clear but an example would make it so much more easy

Entry.objects.filter(id__in=[1, 3, 4])

in the above example ‘in’ is what is called a Lookup and what the above query does is filters all the Entry data where their id’s belong to any of the values in the list [1, 3…


COALESCE(), Stored Procedure, SELECT INTO, CASE

COALESCE()

COALESCE takes any number of arguments and returns the first value that is not null.

COALESCE(x,y,z) = x if x is not NULL
COALESCE(x,y,z) = y if x is NULL and y is not NULL
COALESCE(x,y,z) = z if x and y are NULL but z is not NULL
COALESCE(x,y,z) = NULL if x and y and z are all NULL

COALESCE can be useful when you want to replace a NULL value with some other value. In this example you show the name of the party for each MSP that has a party…


yes you read it correct its 2 M’s

So what’s MMap ?

The extra M stands for ‘Memory’. Memory mapping is a process through which machine level constructs are used to map a file directly for use in a program from disk. It maps the entire file in the disk to a range of addresses within the computer program’s address space. The program can access the files on the disk in the same way it accesses data from random access memory.

The mmap function uses the concept of virtual memory to make it appear to the program that a large file has been loaded…


What is a Link in Linux ?

A link in Linux is pointers pointing to a file or a directory.

When do we use Links in linux ?

well there are a lot more examples which we will discuss further in this article but for now a few uses are to create a convenient path to a directory buried deep within the file hierarchy; other uses for links include:

  • Linking libraries
  • Making sure files are in constant locations (without having to move the original)
  • Keeping a “copy” of a single file in multiple locations

Wait a second so are they just as same as “Short -cuts” ?🧐

In a way, yes…but as Gandalf says

Let me explain. Say, for instance, you have an external drive, attached to your…

Nishanth G

Avg Software Engineer , can’t write any post that takes more than 5 mins

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store