Sunday, June 30, 2013

When to leave the job(company)

Ref: http://java.dzone.com/articles/when-leave-your-programming

Technologists often rely on the more common and obvious signs to leave their employer (company product failures, layoffs, or reductions in pay/benefits) as primary motivators for making an exit. One could argue that experience at a failing company can be infinitely more valuable than time spent at a highly successful shop.  Waiting for those alarms to sound, which could be false alarms, is a mistake for your career.
When should you think about leaving your job?
  • You are clearly the ‘best’ programmer at the company and/or have no teacher or mentor available – Many people may get this wrong due to overconfidence, so you need to assess your skills honestly.  Even if you acknowledge you are not the best, do you have access to others that you can learn from that are both able and willing to share their knowledge with you?  Your company may have hired loads of great talent, but if these individuals are too busy to help or not interested in dialogue you are no better off than working alone.
  • The technologies employed are static and make your skills unmarketable – The extended use of dated, proprietary, or very specific technologies can kill your marketability.  If the firm is still using very early releases of popular languages or frameworks this could be a good indicator.  Multiple years in a stagnant tech environment is much worse than the same tenure in a shop that consistently improves their tools.
  • You have accomplished nothing – This is often not your fault.  Perhaps your company is consistently delaying releases and never seems to deliver on time, where the problem could lie in the development process or management decisions and not on tech talent.  If you look back on your stay with the company and can not point to any significant accomplishments (given a reasonable amount of time), consider the reasons why.
  • You are underpaid with no upside – There are at least a handful of justifications to accepting compensation below market rate.  The ability to work with great people is probably the #1 reason, with learning a valuable skill a close (and related) second.  If you took less money with the expectation of a future positive that just hasn’t panned out, it’s time to look at your options.
  • You are consistently passed over for interesting projects or promotion, and your ideas are not considered - If you are rarely given the plum assignments and not even a candidate for higher responsibility roles, the company simply doesn’t value your service.  The firm feels you are doing enough to keep your job, but they do not see you as a true long-term asset.  Keep track of how often you volunteer for a new venture and the company response.
  • You are no better off today than you were when you joined the company - The phrase ‘better off’ can take on a few meanings.  Traditionally one might use better off to refer to improved financial standing (raises), but you should add more qualified as well.  If your skills, marketability, and compensation have not improved after a reasonable amount of time, you need to question why you are still there.
  • You see little change in what you do – A consistent and small set of responsibilities for long durations tends to be a career killer.  Working on one small part of a very large project/product is usually the culprit.
  • You have no inspiration – Many domains in software development might not be all that interesting to you personally.  In those situations, the technical challenge at hand or the opportunity to do something truly innovative may trump the lack of industry interest.  Building a website for an insurance company might not be a dream, but scaling for millions of users could make it fulfilling.  If you are finding no value in the work you do and lack any inspiration, there is probably something out there that will get you excited.


Thursday, June 6, 2013

Linux RAM usage of process by name

Ref: http://abdussamad.com/archives/488-Memory-usage-of-a-process-under-Linux.html

To find the RAM usage of process by name, one can use command like below

---------------


ps -C  -O rss

--------------

For example to find memory usage of google chrome, use command like below.


ps -C httpd -O rss
Sample output would be like below...
PID   RSS S TTY          TIME COMMAND
3299 149484 S ?       00:01:57 /opt/google/chrome/chrome       
3310  7984 S ?        00:00:01 /opt/google/chrome/chrome       
3315 14564 S ?        00:00:00 /opt/google/chrome/chrome --type=zygote
3320 11112 S ?        00:00:00 /opt/google/chrome/chrome --type=zygote
3393 41984 S ?        00:00:00 /opt/google/chrome/chrome --type=renderer 

But to find cumulative/sum of RAM usage of all those process, we can have small shell script which do the job for you.


#!/bin/bash
ps -C $1 -O rss | gawk '{ count ++; sum += $2 }; END {count --; print "Number of processes =",count; print "Memory usage per process =",sum/1024/count, "MB"; print "Total memory usage =", sum/1024, "MB" ;};'
Save it as psmem.sh and run it like this:
[admin@serve3 ~]$ psmem httpd
Number of processes = 3
Memory usage per process = 9.83464 MB
Total memory usage = 29.5039 MB

Monday, June 3, 2013

Linux boot in Command Line Mode

To start fedora in command line mode we have to edit the /etc/inittab file as root.

-------------BEFORE CHANGE CONTENT-------
id:5:initdefault:
----------------------------------------------------------------



-------------AFTER CHANGE CONTENT---------

id:3:initdefault:
----------------------------------------------------------------


As guessed modifying the value back to 5 would boot in graphical mode.