Archive for September, 2010

awk silliness

Wednesday, September 15th, 2010

This one-liner will print every other character in upper case. 1 2 3 oracle@emgrid01 ~ >echo "the quick brown fox jumped over the lazy dog" | awk -F "" '{for (i=1; i <= NF;i++) {if (i % 2 == 0) {printf ("%s",$i)} else {printf ("%s",toupper($i))}};print ""}' ThE QuIcK BrOwN FoX JuMpEd oVeR ThE LaZy... »

Posted in Linux, Operating Systems | No Comments »

instr() in awk

Wednesday, September 15th, 2010

If you have a long command line string, as you may find with java processes with a lot of properties, what is below will allow you to print those “columns” with a certain value as delimited by a space in awk. This is much easier to read than just grepping for the value in... »

Posted in Linux, Operating Systems | No Comments »

Who is the big load on my server?!

Monday, September 13th, 2010

What is below will show SQL statements for a given window (the last four days in the example below) that are tightly correlated with load average on a server. In general, a statistical correlation greater than 60 means there is an increasing degree of correlation between the two data sets. If one goes up,... »

Posted in Database, Linux, Operating Systems, Oracle | No Comments »