Showing posts with label solaris. Show all posts
Showing posts with label solaris. Show all posts

Wednesday, April 27, 2011

Using XManager to setup a terminal connection to a solaris machine

Xmanager is an awesome piece of software. Here's how to set it up to connect to a solaris machine with Display variable automatically configured so you can use gedit etc.

  • Open up xbrowser 
  • create a new xstart session 
  • fill it as as follows (setting the execution command as xterm solaris):

Enjoy!

Sunday, May 24, 2009

BIRT Report Scheduler

I am considering writing a BIRT report scheduler for a recent project.

I already have a working system in place using what I learnt from the following:
http://digiassn.blogspot.com/2005/10/birt-report-server-pt-2.html

It works pretty neat. I did need to make a couple of modifications to make it work on solaris (needless to say). First wget is not in system path therefore I needed to do the following :

WGET="/usr/sfw/bin/wget"

And later on:

$WGET "$RUNURL=RegionDailyPeak.rptdesign&__format=doc&Region=Central" -O "$EXPORTDIR/CentralDailyPeak.doc" -q

I also hid the server birt viewer url into a variable as :
RUNURL="http:///ReportXViewer/run?__report"

and EXPORTDIR as the path where I want the download.

Also I wrote some code to send emails as well and used that as a script. Additionally I needed to used the zip command to zip large reports before mailing them :

e.g.:
zip $EXPORTDIR/TCHGPRSTraffic.zip $EXPORTDIR/TCHGPRSTraffic.xls

and then mailed the zip file. Its working fine . Any parameters needing any form of dynamic nature were put into the report using a method I posted previously.


I am thinking of encapsulating all these cool things into a web server application using flex?

Anyone interested in such an application?

The following is a list of the features:

  • A simple admin login screen
It is intended to be a single user application. One admin password
  • Server Settings
Lists:
  1. adminusername / adminpassword.
  2. BIRT report viewer url (the run url... to which only report and further parameters will be passed as shown above)
  3. The report folder url.
  4. Notification email address
  5. mailer settings:
servername, Username, password, from , port, ssl

  • A simple report schedules list screen.:
This will have a list of schedules setup into a data grid with two columns. Crontab scheduling string, and a schedule name. Click on any one and select edit (other options: delete, new, duplicate)

  • Options for scheduling:
  1. crontab string,
  2. Select report from a combo box
  3. outputfolder
  4. zip or not to zip
  5. notify of running by email
  6. format : valid formats : pdf, doc, ppt, xls..... but not html. A simple downloader that will download a single url will be used. (KISS)
  7. mail to. (comma seperated destination addresses)
  8. append a date string to ( low priority )
  9. A parameters table. Which lists parameter vs. value. Nothing dynamic about it. You need to know the paramter names yourself to be able to use it. (low priority .... make parameters list available once you select the report)
  • A reports management screen:
Lists the .rptdesign files in the reports directory. With options of upload, delete, download, rename, copy

Seems simple enough :) But requires dedicated time.... which I am short on right now.... I need motivation... anyone interested in giving me some?

Optimizing Birt Viewer for solaris in simple steps

I was working on BIRT in windows. The performance in windows was awesome but when I moved the code to our solaris server a report that would take round about 10 seconds on windows took over a minute!

Here is how I improved the performance: (Note that I prefer jetty to tomcat due to its lightweight nature ..... Actually I use hightide ... but that's another story)
  • Make the default memory allocation greater:
open your tide.sh in the bin directory (hightide.sh in my case). Find and modify the following:

# JAVA_OPTIONS

# Extra options to pass to the JVM

TO:

JAVA
_OPTIONS="-server -Xmx3800 -Xms3800"

this basically tells the JVM to run in server mode i.e. -server (slower startup time.... faster execution time :)) and to start of with a default of 4GB ram with a max of 4GB ram (Xmx and Xms) . Change this to how much RAM you want allocated to JVM by default

  • Update your BIRT runtime to the latest and greatest version
I am telling you.... don't take this as a joke! :)

  • Update your JDK to the latest version
Again ... no kidding. Solaris 10 comes with JDK 5 by default. JDK 6 is so much better. Just download the .sh file for jdk from the sun website and install it. It is a simple command line script. You do not even need root privledges to run it. All you need is access to a folder you can write to (your home dir ?) and thats it.

After installation it note the location of your installation dir
e.g. /home/bla/Desktop/1.6.13_10
or whatever.

again modify jetty.sh (or hightide.sh) changing:

# JAVA_HOME
# Home of Java installation.

to :

JAVA_HOME="/home/bla/Desktop/1.6.13_10"

Thats all. Now give BIRT a spin. My runtime went from 10 secs to 7 secs :)!!