Check out all the colors on you X window system.

2012-02-24 1 min read Fedora
If you ever wondered what combination of some colors would look like but did not really feel like setting them in your xterm just to check them out. Or if you wanted to know about all the colors on you X window system then you can install this utility called xcolorsel. [][1]xcolorsel You will need to setup the rpm-shere repo for this. Using this tool is very intuitive, just select the color and then press set as foreground/background to check how the color combination would look. Continue reading

BASH Script Performace

2012-01-06 2 min read bash Learning
Today we will look at some bash code snippests and the performance issues. Lets first look at the problem and the implemented solution: Problem: We needed to log the output of the ps command for all the process’s. This was required to be done on per minute basis and the output was required in comma separated files. So, here is what was implemented: pslog=`ps -e -opid,ppid,user,nlwp,pmem,vsz,rss,s,time,stime,pri,nice,pcp:u,args|grep -v PID|sort -r -k 13,13` OLD_IFS=$IFS IFS=$'\n' logarr=( $pslog ) for LOGLINE in ${logarr[@]} do LOGLINE=`echo $LOGLINE|awk '{OFS=" Continue reading

Rekursive Grep on Solaris or AIX Systems without GNU egrep -r funcionality

2011-12-16 1 min read Learning Solaris
If you work regularly on a Solaris or systems which do not have the “-r” (recursive grep) for grep, then you know what a lifesaver this command can be. Here is one from command line fu: find . -type f -exec awk '/linux/ { printf "%s %s: %s\n", FILENAME, NR, $0; }' {} \; The benefit of using awk here is that you can print the line number also 🙂 Continue reading

Add ssh key to remote host

2011-11-15 3 min read bash Learning Linux Solaris
Image via Wikipedia If you are working on recent versions of the *nix OS like Fedora or Ubuntu then you would know about the commad ssh-copy-id. But if you land up using one of the older versions like Solaris or something where the command is not present, then probably you need a simpler solution to this. One of the simplest solution is with a lot of assumtions, simply copy the id_rsa file to remote server and hope it works. Continue reading

Solaris dump analysis

2011-05-18 1 min read Solaris
I had to debug a solaris crash dump and had no ides. Google search wasn’t much useful until finally I found this article: http://cuddletech.com/blog/?p+AD0-448 have a look at this article, this suggests how to debug the core and find the offending process and root cause of the core in case of kernel panic. Related articles install all solaris software from http (amit-agarwal.co.in) Oracle puts out Solaris 11 compatibility tester (go. Continue reading

install all solaris software from http

2011-02-23 1 min read Solaris
If you are behind a firewall and install some software like top or wget then you can not use sunfreeware, and why because ftp is blocked. Now that is not the case any more, you can go the http mirror site of sunfreeware and here is the link for the same http://ftp.sunfreeware.com/ftp/pub/freeware/i386/5.10/ Note: you just need to change the words in bold for sparc or i386 and version of the solaris. Continue reading
Older posts