Dipesh Majumdar

Blog and Paintings

It's so difficult to change from inside

November 25, 2015

As I was walking down the road towards office today morning - I was tuned into a nice lecture on the v-moda m100 head phones and the crux of the message I remember now is - don't judge anyone - don't criticize anyone - remain calm and composed and remain someone who doesn't get rattled or disturbed so easily. The people who don't get rattled by external stimuli are more likely to rise in their lives because they have greater control on various situations life comes up with.

I reached my work place, switched off the lectre and very soon got busy in work. During lunch time we were having a discussion about the recent controversial Amir Khan statement in which he stresses about the rise of intolerance in India. It started with a discussion and we all took our own viewpoints - and soon I was being attacked by the remaining 3 guys who had different opinion than mine... I was losing control and struggling to convince them with my logical reasoning. It was increasing my stress level and things were becoming ugly. Somehow we finished off lunch, shook off the last bit of unpleasantness sticking to our bruised ego and then walked towards our respective desks...

Stains of the heated argument lingered on in my stormy mind as I tried to share my viewpoints once again with another like-minded person - this time it was quite satisfying because this guy had similar thoughts as mine.

The day is almost over now...

However as I sit down here and write this blog, I realise that the morning lecture had no effect in my behaviour and my actions were governed by my instincts and habits more than anything else - something ingrained very deeply within me.

It's so difficult to change from inside. True.


Fun at work!

November 10, 2015

Some useful Linux Commands - 4

November 4, 2015

Lets talk about performance - 

i/o waits - 

appuser@hostname:~> top

top - nn:nn:nn up nnn days,  n:nn,  n users,  load average: n.nn, n.nn, n.nn
Tasks: 131 total,   1 running, 130 sleeping,   0 stopped,   0 zombie
Cpu(s):  n.3%us,  0.n%sy,  n.0%ni, n7.3%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   nnnn624k total,  1829nnnk used,    1093nnnk free,    42nnnk buffers
Swap:  nnnnnnnk total,   nnnnn2k used,  nnnnn04k free,   55nnn8k cached

2nn39 appuser      20   0 nn12m 1.1g  15m S  2.3 58.6   4:59.61 java
    1     root      20      0 nnn28  552  nn4 S  0.0  0.0   0:04.42 xxxx
    2     root      20      0     0    0    0 S  0.0  0.0   0:00.04 kthxxxxx


sar -  gives a 10 minute interval report of %iowait


appuser@hostname:~> sar
Linux 2.n.32-358.xxn.x8n_6n (hostname)       11/04/2015      _xnn_nn_        (1 CPU)*

12:00:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
12:10:01 AM     all      1.25      0.00      0.49     20.33      0.00     77.93
12:20:01 AM     all      1.04      0.00      0.39      4.52      0.00     94.05

..............and so on and on................

*note: this is the same sar command with which you can also find how many cpu's present in a server. There is another way of finding same information - cat /proc/cpuinfo

CPU percent utilization -

The below yellow highligt cpu utilization is per CPU. Number of cpu's per server can be found by : cat /proc/cpuinfo

appuser@hostname:~> top

top - 16:nn:24 up 1nn days,  8:nn,  5 users,  load average: 0.07, 0.02, 0.01
Tasks: 131 total,   1 running, 130 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.4%us,  0.7%sy,  0.0%ni, 97.3%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   nnnnnn4k total,  nnnnn24k used,    nnnn200k free,    nnn48k buffers
Swap:  419nnn6k total,   nnnnnnk used,  nnnn304k free,   nnn908k cached 


Memory utilization - 

appuser@hostname:~> top
top - 10:38:14 up 75 days, 23:19,  1 user,  load average: 0.00, 0.05, 0.02
Tasks: 144 total,   1 running, 143 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.5%us,  0.2%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  nn603800k total, nn414980k used,   nn8820k free,   nn9508k buffers
Swap:  nnn4296k total,   nnn848k used,  nnn2448k free, nnn86396k cached

  PID USER      PR        NI  VIRT      RES       SHR S        %CPU      %MEM    TIME+       COMMAND
13694 appuser   20        0     23.8g      9.7g       7340 S        1.7            41.5         818:05.79     java

But if there is java application - you don't get any hint of how jvm memory is utilized, so in that case it's better to view the memory utilization using jvisualvm

In windows, mostly this is the location - C:\Program Files\Java\jdk1.7.0_67\bin

where you will find - jvisualvm.exe


Some useful Linux Commands - 3

October 22, 2015
  1. How to append a line to a text file?
    This is very easy:
    echo -e "Some Line which needs to be appended to a file\n" >> this_is_file.txt
  2. How to append aline to a text file? That means how to add a line in beggining of a file?
    (echo "Some Line to be added in beginning of file"; cat this_is_file.txt) > this_is_file_Temp.txt
    mv this_is_file_Temp.txt this_is_file.txt
  3. How to concatenate 3 files (file1,file2 and file3) - one after another - in one single file?
    There should be many ways - but this should work -
    ( cat file1.txt;cat file2.txt; cat file3.txt) >one_single_file.txt
  4. With xargs escape double quotes doesn't work. How to make it work? Hint:  Try using -0 with xargs
    app_user@hostname:~$ echo -e "{xyz:\"pqr\",y:"
    app_user@hostname:~$ echo -e "{xyz:\"pqr\",y:" |xargs echo
    app_user@hostname:~$ echo -e "{xyz:\"pqr\",y:" |xargs -0 echo

AEM, dispatcher, apache - Fundamental Questions and Answers - 4

October 22, 2015

All the AEM JVM Parameters that one can possibly think of - to tune your jvm in AEM Author/Publisher. This can be injected in the start parameter that comes with AEM installation (5.6.1 or below). These need to be tested properly and then set...

  1. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:NewRatio=n" (normally can be set to 1 - this alters the old generation space, new generation space. A value of 2 means old generation space is twice than new)
  2. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:+UseParallelGC"
  3. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:+UseParallelOldGC"
  4. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:ParallelGCThreads=n" (should be set equal to number of cores per server)
  5. CQ_JVM_OPTS="${CQ_JVM_OPTS} -Xmsng" (ng means n gigabytes - can be kept 1g normally - subjected to load tests and jvm usage reports)
  6. CQ_JVM_OPTS="${CQ_JVM_OPTS} -Xmxpg" (pg means p gigabytes - as a thumb rule it's better to keep p=n)
  7. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:PermSize=xyzM" (normally 256M/512M, again subjected to jvm usage report)
  8. CQ_JVM_OPTS="${CQ_JVM_OPTS} -XX:MaxPermSize=pqrM" (max perm size: normally pqr should be equal to xyz as a thumb rule)

Romir's first bicycle ride

October 11, 2015

Romir's first bicycle ride at the age of 4 years 2 months and 11 days - 

Romir's first experience of balancing a 2 wheeler

October 10, 2015

The best way to learn balancing is to start with the simplest of 2 wheelers -and that's when the kids scooter came to our mind...

When we first bought it , Romir was not willing to ride it all. He was more comfortable to ride the three wheeled scooter - which needed no balance... but then we urged him to take to the two wheelers... 

Finally he started trying his hand at the 2wheeled scooter - and after a few days of practice when we felt he was having a hang of balancing it actually - we took him outside to Biljmer arena. Large open space gave him the freedom to speed up in all directions - pretty soon, we were amazed to see him balancing it actually. A very pleasing sight indeed... 

The you tube video below shows his first experience of balancing a 2 wheeler...


Some useful Linux Commands - 2

September 25, 2015

New things learnt... these are the things i didn't know... Mostly we will cover a few network-related commands  

  1. suppose there are three files - aaa aaaa aaaaaa

    i didnt know : 

    ls aa?   would return only aaa

    i only knew aa* will return all three files


  2. ping -c4   would give you only 4 lines - didn't know that

  3. didnt know we had 2 types of listerners - tcp and udp 

    tcp is returned by - netstat -ntl 

    and udp by netstat -nul

    netstat -ntlp and netstat -nulp will give the tcp and upd listerners along with the programs

  4. netstat -r gives the routing table 

    and here you can see your default gateway - the flag for which should be UG

    netstat -nr can be used as well

    and since we get the default gateway - we know the ip now through which the server opens up to the world. You can also see the default gateway this way: cat /etc/sysconfig/network

  5. traceroute - will keep hopping - first entry will be the default gateway which is pretty interesting

    and in windows cmd prompt - one should use tracert in place of traceroute!!!!

My journey was comparatively easy

September 22, 2015

clouds gather and there is a downpour
i get wet, i still walk

i shiver in cold, but i still walk

for i have a lot of distance to cover
and there is not much strength left...

the distant road is obscure...
but my steps keep moving steadily

i can feel the road - i can feel 

the twists and the turns

so i still walk

i keep walking till i reach 
my home and then i sit 

i look out of the window
it's a heavy downpour again

the window glass is so hazy

i spot a distant man struggling 
to cut his way against 

gusts of wind so strong

he keeps walking


falls down... and gets up...

the storm is picking pace now

i want him to reach his his home soon

i feel lucky ... 

my journey was comparatively easy

I am still the same...

September 15, 2015

Once again i fell down-

felt  real bad.

thought of running and ....

vanishing into the center of the earth...


may be by digging an infinite hole.

but i am alright now...

a little while ago i was so low...

looking out the window...

into the green fields infinite...

soothing, pleasing and soft

that are selfless and white...

one day i will become LIKE THAT....

for sure... but not now........ 

i like them so much...

till then let me close my eyes

and relax a bit...

i am all alone

standing here... sitting here

none besides me

the hollowness only soothes me...

i close my eyes now

take a deep breath

its dark, somewhat cold

the music playing rather awkwardly against my ears

so need to change the song...

the new song! its not better!

Is it only my mind I hear?

now i am hungry


there has been no change whatsoever...


View older posts »