Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Tuesday, November 2, 2010

How to Set up The Grinder 3 for Load Testing

Basic Requirement
  1. Download and install Jython
  2. Install Jython by running this command:
    java -jar jython_installer-2.5.1.jar

How to Start The Grinder

  1. Create a grinder.properties file. (You could simply copy from grinder/examples/grinder.properties.)
  2. Set CLASSPATH to include grinder.jar
  3. Start the Console:
        java net.grinder.Console
    
  4. For each test machine, do Steps 1 and 2, and then start the Agent process:
        java net.grinder.Grinder [grinder.properties]
    
If you are getting this warning message: "can't create package cache dir", make changes to grinder.properties to look like this:
    grinder.jvm.arguments: -Dpython.cachedir=/tmp

Use command line for developing

Edit grinder.properties with these settings:
    grinder.runs = 1
    grinder.useConsole = false

TCPProxy

To find out the default proxy settings in TCPProxy:
$ export CLASSPATH=/opt/grinder/lib/grinder.jar

$ java net.grinder.TCPProxy
12/7/10 2:02:58 PM (tcpproxy): Initialising as an HTTP/HTTPS proxy with the
parameters:
   Request filters:    EchoFilter
   Response filters:   EchoFilter
   Local address:      localhost:8001
12/7/10 2:02:58 PM (tcpproxy): Engine initialised, listening on port 8001

Now, set your browser to use proxy with the above port settings.

To start the TCPProxy Console:
$ java net.grinder.TCPProxy -console -http > grinder.py

Sunday, October 10, 2010

Analyse Disk Activities in Linux

To see disk activities, you can simply issue this command:
# e.g. on /dev/sda
$ cat /sys/block/sda/stat
626485464 806972148 28053848010 1557001361 853157995 3445307000 34392097768 2090234158        0 444939685 3653907428

Using iostat:
# Display every 5 seconds
$ iostat -xm -d 5

# Display on one disk
$ iostat -p /dev/sda -d 5

Tuesday, December 1, 2009

How to Remove GPT Protective Partition from a Drive in Windows

Warning: This procedure will erase all data on the disk. Please backup your data before proceed.

In Windows, you can use a program called DISKPART, which is a command line program, to remove a GPT Protective Partition from a disk. Here's how:
  1. Bring up your Command Prompt program
  2. Type DISKPART at the prompt
  3. Then type list disk in DISKPART's prompt to show all disks on the machine.
  4. Type select to set the specific partition: select disk 1
  5. Then type clean will remove the GPT Partition from the selected disk
Now, you can go to Disk Management Console and start formatting the 'unallocated' partition on this drive. Have fun!

Tuesday, January 20, 2009

Google Reader Shortcut Keys

Google Reader is an online RSS feed reader that is easy to use and the best way to organize your RSS feeds. If you want to be even more efficient in reading your feeds, learn these shortcut keys:
Move highlight up/down one item in Item (right) Pane    
p/n
Open to read an item in Items (right) pane
o/Enter
Page down/up
Space Bar/Shift Space Bar
Move highlight up/down one item and Open it
j/k
View original in new window
v
Move up/down in Subscription pane
Shift p/n
Open an item in Subscription pane
Shift-o
Expand/Collapse a folder in Subscription pane
Shift-x
Zoom in/out
=/-
Toggle Star in an item
s
Go to Home
g, h
Go to All items
g, a
Go to Star items
g, s
Go to Trends view
g, Shift-t
Refresh
r
Toggle
u
Search
/
Change to Expanded/List view
1/2
Add a subscription
a
Show keyboard shortcuts help
?

More Shortcut Keys

Open/Edit Tag for an item
t
Mark an item Read/Unread    
m
Mark all items as read
Shift-a
Email an item
e