Photo by Markus Winkler on Unsplash

The purpose of this document is to find what would be the optimal way to search for word in a folder containing multiple inner folders and containing large set of files.

Below experiment was done on a folder containing 8918 folders and 48170 files. Purpose of this experiment is to find out what are varies ways of searching a string in these folders and also trying to find performance of each.

Using grep with -r to recursively search in current directory and -i for ignore case and -n to display line numbers and -F to treat…

In your java application if you had seen below error in logs

SOURCE:java.lang.OutOfMemoryError: unable to create new native thread

This means that when java process wants to create a new thread and requested for new process to kernel, but kernel was not able to allocate new process because of the number of processes created by that user reached current limits on max user processes.

You can find the current limits of the user, by running below command

$ ulimit -acore file size          (blocks, -c) 0
data seg size…

The purpose of this article is to explain how a kernel can invoke (out-of-memory) oom killer to abruptly kill a process which might be a java or node process of your application and what steps we can take to resolve such type of issues.

When OOM Killer is invoked by kernel?

In Linux based systems, every process has a oom score, you can find oom score for a process like below.

-bash-4.1$ ps -ef | grep /bin/java | grep -v grep | awk '{print $2}' | xargs -i cat /proc/{}/oom_score881-bash-4.1$ ps -ef | grep 'splunkd pid' | grep…

The purpose of the article is to explain default configurations (which can cause bottleneck) at Node.js, Apache and OS level and how to change those configurations. Client request processing time can be effected by any configuration listed below in diagram.

In below example, Node.js server is running behind reverse proxy server like Apache. And Process Manager PM2 is also used to load balance Node.js applications.


Concurrent Requests

By default how many concurrent requests can a Node.js handle?

Since javascript execution in Node.js is single threaded, at a time one request will be executing but by doing asynchronous operations and using event loop…

When Neo realizes he is the one. [Matrix]

Below is one example of analyzing heap dump to know which objects are responsible for JVM out of memory.

How to get JVM Heap dump?

One way is to have java option option — XX:+HeapDumpOnOutOfMemoryError which trigger heap dump when JVM is out of memory

Another way is to use jmap (available from jdk 1.6 but can also be used on jvm with 1.4+). First find the java process id using jps

bash-4.1$ jps
24437 Jps
11036 WrapperSimpleApp

or you can also use ps -ef to get the java process id.

-bash-4.1$ ps -ef | grep java
app 11036 11034 3…

Tai Lung: *gasps* The Wuxi finger hold!
Po: Oh, you know this hold.
Tai Lung: You’re bluffing. You’re bluffing! Shifu didn’t teach you that!
Po: Nope. I figured it out. Skidoosh. — [Kung Fu Panda]

courtesy —

Bulk renaming files using end pattern (%)

If you want to rename all files with extension *.jpg to *.png.

for example below is the list of files in current directory

$ ls -ltrtotal 0
-rw-r--r-- 1 rchint1 Domain Users 0 Jul 18 20:02 test1.jpg
-rw-r--r-- 1 rchint1 Domain Users 0 Jul 18 20:02 test2.jpg
-rw-r--r-- 1 rchint1 Domain Users 0 Jul 18…

Below are some important shortcuts built-in in Bash (and also in Zsh) which enables user to quickly move around current command, edit it and also utilize previous commands.

Going through previous commands (history)

Typically if you are about execute a curl or some long command or some kubectl commands, it would be best to check command history to see if you already executed previously.

Ctrl-r # Search commands backwards in history
!! # Get previous command

AZ-5 switch at Chrenobyl nuclear power plant — the safety cut-off button employed in 1986 at Chernobyl.

Note: This article was originally published by me here —

Moving above article to medium and adding more details on top of it.

Often deployments will fail due to some reason and even if we use halt deployment, critical reset, cancel/resume button sometimes ATG fails to revert the project to previous state. And because of JVM crash or normal bounce of BCC instance, currently deploying projects will go to unknown state, follow below steps to correct such type of projects.


Rajashekar Chintalapati

Software Engineer, Learner, Developer, Prokopton

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