10/02/08

English (US)   pkill - a powerful command  -  Categories: Linux  -  @ 03:11:46 am

pkill command in Linux could save you lot of time.

pkill -9 -U john

The above command kills all the processes the matches the user “john”

pkill -9 -f oracle

the above would kill all the processes that matches the string “oracle”

WARNING: The above commands are a severe dose.Use at your own risk.


English (US)   Selenium error  -  Categories: Software testing  -  @ 03:00:48 am

Frequently while executing Selenium test cases, the following error may be encountered.

java.lang.UnsupportedOperationException: Catch body broken: IOException from cmd

Cause: Selenium server may not be running.

08/14/08

English (US)   Perl to covert IP address -> hostname and vice-versa  -  Categories: Perl  -  @ 06:15:39 am

In a network, given a HOSTNAME or IP ADDRESS, the following Perl code will convert it into the either form.
For example, if you run this perl file as,

perl filename.pl 172.34.56.70

it will output the HOSTNAME of the above IP ADDRESS.
OR, you can also run this perl file as,

perl filename.pl lakepc.yourdomain.com

it will output the IP ADDRESS of the above HOSTNAME.
Here is the perl code:

#=============================================
# Assume you save the following perl into a file called filename.pl
# USAGE: perl filename.pl <Supply an IP address/hostname here>
#=============================================
use Socket;
use strict;
my $host_name = hostname($ARGV[0]);
print “$ARGV[0] resolves to $host_name\n";
sub hostname
{
my (@bytes, @octets,$packedaddr,$raw_addr,$host_name,$ip);
if($_[0] =~ /[a-zA-Z]/g)
{
$raw_addr = (gethostbyname($_[0]))[4];
@octets = unpack("C4″, $raw_addr);
$host_name = join(".", @octets);
}
else
{
@bytes = split(/\./, $_[0]);
$packedaddr = pack("C4″,@bytes);
$host_name = (gethostbyaddr($packedaddr, 2))[0];
}
return($host_name);
}




08/08/08

English (US)   Decompile Java class files into source code using JAD tool  -  Categories: Java  -  @ 03:41:35 am

There may be many situations where we need to decode the Java class files into the source code which is readable. The small utility “Jad” serves this purpose.
Download it from here,
JAD tool

If you extract the zip file, you will get an executable named “jad.exe” for Windows systems or “jad” for *nix systems.This is all you need to decompile Java classes.
For example, you have a file named Hello.class in C:\work directory.All you need to do is execute the following at the command prompt.

cd C:\work
jad.exe Hello.class

The above would create a file name “Hello.jad” which the readable Java code.
Or, if you have numerous class files under a particular directory, just execute

jad.exe -o -r -sjava -dsrc Dirname/**/*.class

The above would create a new directory named “src” and outputs all the readable source code there.

There are certain GUIs too if you like to do this through an GUI instead of doing it at the command prompt.Check out the following link,
JAD GUIs


08/06/08

English (US)   Google's new launch - Insights for Search  -  Categories: Information  -  @ 01:22:42 pm

Like Google Trends, there is one more service available “Google Insights for Search". This would help the advertisers to have a deep insight about the search patterns based on geographical locations and time.
You can try your hand at,
http://www.google.co.in/insights/search

Did a sample search “iphone launch in India” for the past 30 days in India as following


and, it gave a detailed graph as,



The search can be more advanced like, you can select subregions like, “Kansas in U.S” or “Karnataka in India” , etc., Down the page, it also lists the “related search terms” and also it gives the map of the region you selected with subregions.


08/05/08

English (US)   Google news in Tamil language  -  Categories: Information  -  @ 10:57:48 am
tamil-google-news
Google news in Tamil

Google has introduced a regional news service for Tamil language.
http://www.google.com/news?ned=ta_in
With this, Google has now two such regional offerings for India, one in Hindi and the other in Tamil.This service is a news aggregator which would get latest and high ranked tamil news from various Tamil news websites like dailythanthi.com,tamil.yahoo.co.in,tamil.sify.com, etc.,
Tamil is the 19th language to get this news aggregator service from Google.


07/11/08

English (US)   Apache benchmarking tool "ab" - Load testing  -  Categories: Software testing  -  @ 12:25:40 am

The tool “ab” is the Apache benchmarking tool and it helps to perform load test on your Apache server. You can test your Apache server’s ability to handle stuff like simultaneous connections requesting the service.
The tool comes with Apache installation.

[mappukut@my-host ~]$ ab -c 5 -n 100 http://server.com/lint/index.shtml

the above command makes 100 requests to the server with concurrency level “5″. This means 5 requests will be sent to the server simultaneously and like this a total of 100 requests will be made.

The output will be a report like,

This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $>apache-2.0
Copyright © 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright © 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking devtools (be patient)…..done

Server Software: Apache/1.3.6
Server Hostname: devtools
Server Port: 80
Document Path: /olint/index.shtml Document Length: 26910 bytes

Concurrency Level: 5
Time taken for tests: 9.335693 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2706900 bytes
HTML transferred: 2691000 bytes
Requests per second: 10.71 [#/sec] (mean)
Time per request: 466.785 [ms] (mean)
Time per request: 93.357 [ms] (mean, across all concurrent requests)
Transfer rate: 283.11 [Kbytes/sec] received

Connection Times (ms)
                min mean[+/-sd] median max
Connect   : 75 75 0.0 75 75
Processing: 386 388 10.0 386 453
Waiting    : 81 92 42.8 82 300
Total       : 461 463 10.0 461 528

Percentage of the requests served within a certain time (ms)
50% 461
66% 461
75% 462
80% 462
90% 465
95% 487
98% 513
99% 528
100% 528 (longest request)

powered by b2evolution free blog software

Contact the admin - Credits: blog software | LAMP hosting | ads