New build of swingbench
23/06/09 21:29 Filed in: Swingbench
I’ve uploaded a new build of swingbench 422 to
the website, I’d recommend
upgrading to this build its pretty stable and
includes a lot of bug fixes. It includes some new
functionality relating to specifying window sizes
and positions for minibench and clusteroverview.
This means its now possible to maximise the real
estate used by swingbench without having to move
things around after you’ve started it up.
The following example illustrates what’s
possible.
This script start swingbench in graphical mode, sleeps to let it start, then starts 4 minibenches at different postions on the screen. The new “-cm” maximises minibench’s charts. The rest of the parameters describe what database they are connecting to and what load group they are in. The script then sleeps for 2 seconds before starting clusteroverview in a specific position. You end up with some thing that looks like this
Hope you find this useful. I intend to shortly publish a new webcast on how to set up and use clusteroverview.
./coordinator -g
&
sleep 2
./minibench -co localhost
-cm -pos 0,0 -dim
500,400 -min
300 -max 800 -a -cs //node1/rac1 -g
RAC1 &
./minibench -co localhost
-cm -pos 500,0 -dim
500,400 -min
300 -max 800 -a -cs //node2/rac2 -g
RAC2 &
./minibench -co localhost
-cm -pos 0,400 -dim
500,400 -min
300 -max 800 -a -cs //node3/rac3 -g
RAC3 &
./minibench -co localhost
-cm -pos 500,400 -dim
500,400 -min
300 -max 800 -a -cs //node4/rac4 -g
RAC4 &
sleep 2
./clusteroverview -pos
1000,0 -dim
400,800 This script start swingbench in graphical mode, sleeps to let it start, then starts 4 minibenches at different postions on the screen. The new “-cm” maximises minibench’s charts. The rest of the parameters describe what database they are connecting to and what load group they are in. The script then sleeps for 2 seconds before starting clusteroverview in a specific position. You end up with some thing that looks like this
Hope you find this useful. I intend to shortly publish a new webcast on how to set up and use clusteroverview.
|
New Datagenerator Screencast
29/05/09 16:23 Filed in: Swingbench
I’ve uploaded a datagenerator screen cast
here that
explains its functionality and provides a quick
walkthrough. Let me know if its useful.
New Swingbench Screencast
24/04/09 20:06 Filed in: Swingbench
I’ve just uploaded a new screen cast on
defining your own transactions, I get asked a lot
of questions about it. I’ve also updated the
website to enable me to do more of them quicker. I
enjoy doing them I hope they help you.
Why wont it work...
27/03/09 16:16 Filed in: Java
Ok... So if your not interested in Java ignore what
follows.
So the problem can be summarized as follows. I have a call out to the operating system from Java to obtain the value of “vmstat” which returns a value from every “x” seconds based on the refresh rate. To do This I use a command similar to this
I can then loop around capturing the output and parsing it. Simple.... This approach works on Linux, Mac OS, HP-UX, AIX and Solaris however it fails under Windows. It sits there and simply waits. Now this appears to be a common problem based on the number of postings on it. This article suggests a number of approaches to solve the problem. I’ve tried them all and the good news is that they appear to work for a single atomic call that returns all of its output then exits. However commands such as “vmstat/iostat/sar” etc. return output periodically based on their refresh rates and don’t seem to work at all.
There are plenty of hits in google but no one really seems to suggest a solution. Now Im sure this worked in the past and Im almost certain that I haven’t changed the code.
I’ve tried calling
Which returns the first line of the directory and then exits.
simply hangs.... whilst
Works fine.... So my believe its the combination of java and cygwin and the way io is redirected. If anyone has a chance to look at it.... I’ll be very grateful. Code for simple testcase below.
So the problem can be summarized as follows. I have a call out to the operating system from Java to obtain the value of “vmstat” which returns a value from every “x” seconds based on the refresh rate. To do This I use a command similar to this
Runtime rt =
Runtime.getRuntime();
String[] comm = new String[] {"vmstat","1"};
Process proc =
rt.exec(comm);
I can then loop around capturing the output and parsing it. Simple.... This approach works on Linux, Mac OS, HP-UX, AIX and Solaris however it fails under Windows. It sits there and simply waits. Now this appears to be a common problem based on the number of postings on it. This article suggests a number of approaches to solve the problem. I’ve tried them all and the good news is that they appear to work for a single atomic call that returns all of its output then exits. However commands such as “vmstat/iostat/sar” etc. return output periodically based on their refresh rates and don’t seem to work at all.
There are plenty of hits in google but no one really seems to suggest a solution. Now Im sure this worked in the past and Im almost certain that I haven’t changed the code.
I’ve tried calling
java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
Which returns the first line of the directory and then exits.
java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
simply hangs.... whilst
java myexec cmd /c dir
Works fine.... So my believe its the combination of java and cygwin and the way io is redirected. If anyone has a chance to look at it.... I’ll be very grateful. Code for simple testcase below.
1:
import
java.util.*;
2:
import
java.io.*;
3:
4:
5:
class StreamGobbler extends Thread {
6:
7:
InputStream is;
8:
String type;
9:
10: StreamGobbler(InputStream is, String type) {
11: this.is =
is;
12: this.type =
type;
13: }
14:
15: public void run()
{
16:
17: try {
18:
InputStreamReader isr =
new InputStreamReader(is);
19:
BufferedReader br =
new BufferedReader(isr);
20: String
line = null;
21:
while (true)
{
22:
if (is.available() ==
0) {
23:
try {
24:
Thread.sleep(10);
25:
} catch (InterruptedException ie) {
26:
}
27:
continue;
28:
}
29:
30:
line = br.readLine();
31:
if (line ==
null) {
32:
System.out.println("Error");
33:
} else {
34:
System.out.println(line);
35:
}
36:
37:
}
38: } catch (IOException ioe) {
39:
ioe.printStackTrace();
40: }
41:
42: }
43:
44:
}
45:
public
class myexec {
46:
47: public static void main(String[]
args) {
48:
49: try {
50: String
osName =
System.getProperty("os.name");
51:
System.out.println(osName);
52:
53: Runtime
rt = Runtime.getRuntime();
54: Process
proc = rt.exec(args);
55:
56:
// any error
message?
57:
StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
58:
59:
// any output?
60:
StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
61:
62:
// kick them off
63:
errorGobbler.start();
64:
outputGobbler.start();
65:
66:
// any error???
67:
int exitVal = proc.waitFor();
68:
System.out.println("ExitValue:
" +
exitVal);
69: } catch (Throwable t) {
70:
t.printStackTrace();
71: }
72: }
73:
}
Busy, Busy, Busy
27/03/09 14:16 Filed in: General
Back again..... Hoping to get things moving again.
Sadly I’ve been so busy at work (and at home)
that I’ve had little or no time to update code.
I’ve been answering a lot of questions lately so
the good news is that people are still using
swingbench, Thankyou.
I have come across one or two annoying features (read bugs if you wish
). The first of which appears to be
that CPU monitoring on Windows (and solaris but Im
fixing this) appears to be broken. Previously I
had this working in conjunction with Cygwin but even this is now broken.
Windows appears to process a piece of code (used
for calling out) differently than any other
platform. I’ll post some examples shortly so
the Java heads amongst you can figure it out and I
can get it working again. I can’t promise
anything other than my gratitude.
I’ve also started to twitter (very occasionally) but for those that want to follow me you can do it here...
For those on a Mac and are looking for an alternative iWeb... try out RapidWeaver. Its getting better every release. Also use the Stacks plugin... it rounds it off brilliantly.
Back shortly with that darn Java problem....
I have come across one or two annoying features (read bugs if you wish
I’ve also started to twitter (very occasionally) but for those that want to follow me you can do it here...
For those on a Mac and are looking for an alternative iWeb... try out RapidWeaver. Its getting better every release. Also use the Stacks plugin... it rounds it off brilliantly.
Back shortly with that darn Java problem....
New Comments Page
16/02/09 21:12 Filed in: General
I’ve updated the comments page to add a little
more security. I was being overrun by spam and so
took advantage of the RapdWeaver’s plugin
“FormLoom” to try and stop it. It also
allows me to support attachment uploads which is a
big improvement. Let me know what you think.
I’ll also be updating the website and adding some new screen casts.
I’ll also be updating the website and adding some new screen casts.
Happy New Year... and a fix to datagenerator
09/01/09 19:02 Filed in: Swingbench
Sorry for the delay... My DSL router has been bust for
the last week and so Im behind in everything.
So first things first.... Happy new year.
Second I’ve uploaded a new build of datagenerator it appears that I had a broken link in the last build. This new version fixes a few minor bugs with dates. You can find it in the usual place here
Thirdly stick with me over the coming months I’ve got a big workload (my proper job) on at present and Im going to have to squeeze everything else in when I can. So this means delays in bug fixes and doc. Sorry.
Dom
So first things first.... Happy new year.
Second I’ve uploaded a new build of datagenerator it appears that I had a broken link in the last build. This new version fixes a few minor bugs with dates. You can find it in the usual place here
Thirdly stick with me over the coming months I’ve got a big workload (my proper job) on at present and Im going to have to squeeze everything else in when I can. So this means delays in bug fixes and doc. Sorry.
Dom
Datagenerator Fix
19/12/08 11:20 Filed in: Swingbench
I’ve updated datagenerator to fix a few bugs,
improve the perfromance and give a little more feedback
when running from the commandline. You can find it in
the usual place.
Broken clusteroverview in later builds
17/10/08 17:43 Filed in: Swingbench
Flash version of the screencast now available
05/10/08 15:49 Filed in: Swingbench