Home ¦ Posts ¦ Books ¦ Articles ¦ Talks ¦ Notes > Author: Amit Saha

About

Hello, My name is Amit - I am interested in programming, software tools, systems and infrastructure. A lot of what I explore in software makes it to my blog posts, articles, books, talks and GitHub repositories. If you would like to get an email everytime I write something new, please subscribe to my newsletter. You can contact me via email, on Twitter and on LinkedIn.

Blog posts

My post recent posts are below. So far, I have written about C, Fedora, Golang, Infrastructure, Python and various others.

Your options for monitoring multi-process Python applications with Prometheus

In an earlier article, Monitoring Your Synchronous Python Web Applications Using Prometheus, I discussed a limitation of using the Python client for prometheus.

Limitation of native prometheus exporting

prometheus was built with single process multi-threaded applications in mind. I use the term multi-threaded here to also include coroutine based concurrent …


Linux System Mining with Python

In this article, we will explore the Python programming language as a tool to retrieve various information about a system running Linux. Let's get started.

Which Python?

When I refer to Python, I am referring to CPython 2 (2.7 to be exact). I will mention it explicitly when the …


Doing something before systemd shuts your supervisord down

If you are running your server applications via supervisord on a Linux distro running systemd, you may find this post useful.

Problem Scenario

An example scenario to help us establish the utility for this post is as follows:

  • systemd starts the shutdown process
  • systemd stops supervisord
  • supervisord stops your processes …

Setting up OpenVPN client with systemd template unit files

First, I installed openvpn:

$ sudo dnf  -y install openvpn

Then, I used the following systemd unit file from here to create a systemd service for creating a new VPN connection on Fedora 27:

$ cat /etc/systemd/system/openvpn@.service 

[Unit]
Description=OpenVPN service for %I
After=syslog.target network-online.target …

Tip: Terraform and AWS Security Group rules in EC2 classic

When using Terraform's aws_security_group_rule with EC2 classic, you may get an error saying that the source security group doesn't exist, even though it does. That's probably because you (like me and others) used the source security group ID and not the security group name, like so:

resource "aws_security_group_rule" "my_sg_rule" {
  type …

Compilation and Interpretation in C and CPython

It is common knowledge that programs written in high level languages have to be translated into a low level language using programs referred to as translators. This low level language is either in a native form, in the sense that it is understood by the operating system itself, or in …


Tip: MySQL - Too many connections

If you are getting the "Too many connections" error, couple of things worth checking on the MySQL server:

mysql> show processlist;
..

The above will show the currently open connections. The second is:

mysql> show variables like "max_connections";
..

The above will show the configured max_connections allowed. When you get this error …


Using Travis CI to publish to GitHub pages with custom domain

As of yesterday, this blog is automatically being published via Travis CI. When I push a new commit to my GitHub repository it triggers a new build in Travis CI. The build completes and the the git repository is then updated with the generated output (mostly HTML with some static …


Tip: Rotating video frames using iMovie

I had to rotate a few video frames using iMovie. The instructions for rotating the frames were working, but the rotation was being applied to "neighboring" frames as well. It turns out the trick is to use "split clip" to split a frame so that you can isolate the exact …


Getting started with gRPC and Python

My article on getting started with gRPC in Python is up on the codeship blog:

I build upon it in the next article:

The demos can be found in the python-grpc-demo repository.

© Amit Saha. Built using Pelican. Customised theme based on the one by Giulio Fidente on github.