Monday, July 26, 2010

Shell Script to monitor Virtual Bytes for Sawserver & NQSServer

Hi Friends,

I was troubleshooting gradual increase in physical memory consumption for Sawserver & NQSServer in our environment.

One requirement was to observe the gradual increase my logging the virtual bytes using a shell script every 5 minutes.

The command was simple: ps -ef -o vsz,pcpu,args | grep sawserver64

To automate it, i wrote a small shell script which will write the output of above command every 5minutes, until I kill the script execution:

If you go over the logic, i have wrote a never ending while loop which writes timestamp, virtual byte information for sawserver & nqsserver and included a sleep command to pause the execution for 5mins.

Customizable Sections:
1) You can add more processes to be monitored for Virtual Bytes.
2) Sleep time can be increase on decreased. It accepts input in seconds, i.e. 300=5mins

How to Invoke:
1)Make sure that the script has executable rights or do chmod 777
2)Invoke the script in background mode: bash-$./ &


Tested successfully on Sun Solaris 10 platform.
Hope this helps you for any other process as well :-)

OBIEE, Sawserver, Sawserver64, NQSServer, Shell Script, Unix, Solaris, OBIEE, etc

Tuesday, July 20, 2010

Rupee Symbol Font Download

Hi Friends,

We have the Rupee Symbol font 2.0 out by Foradian Technologies!
Download & start using immediately so that its adopted by everyone faster :-)

Blog Post:
Download Font: Rupee Font.ttf

The first font was created by Souymadip. Checkout his creation at: Rupee Font
Download Font by Souymadip: Rupee.ttf

Presently it is not incorporated in Unicode, so it will not be visible without the font.
Adopt & spread the word :-)

Rupee Symbol, Rupee Font Download, etc

Friday, July 09, 2010

Spool Date & Timestamp using PL/SQL

Hi Friends,

The other day i was trying to write an automated alert script to monitor the asynchronous requests in Siebel Server or in other words trying to monitor the S_SRM_REQUEST table for any failed async requests.

Well in order to achieve the same, i create a quick PL/SQL Script which spooled the necessary information i required as no out of box solution existed from Siebel.
But wait a minute, the timestamp was not getting captured in the spooled out :-(
It was only spooling the date instead of the entire date & time!

For e.g. if run the below SQL, it will only spool the date

Output was like below :-(:

Quick research on Google & it pointed me that we need to alter our session to set the NLS_DATE_FORMAT before the spool will actually capture the Date & Time...
So based on this recommendation, i revised my PL/SQL Block to:

The end result is,
07-JUL-2010 08:14:19

Yipee! :-D
I posted here, as i thought its a very useful info for everyone :-)
Happy Weekend!

Programming, Siebel Async Request, S_SRM_REQUEST, PL/SQL, NLS_DATE_FORMAT, SPOOL, Oracle, etc.

Friday, July 02, 2010


Hi Friends,

While experimenting with Oracle Enterprise Manager Grid Control alongside SOA Management Pack Plus, i was getting following Metric collection errors for BPEL Process Manager Partner Link Metrics.

The error description was:
"oracle.sysman.emSDK.emd.fetchlet.FetchletException: java.rmi.UnmarshalException: Error deserializing return-value: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = -916876369326528164, local class serialVersionUID = -9120448754896609940"

Well, if you carefully observe the error description tries to say, "local class incompatible"!
This generally means a JDK Version conflict. If you research further, you will easily see that this happens due to a JDK Version conflict between your Grid Control Agent & the BPEL Process JDK.

You can verify the JDK Version using: "java -version"

The only solution to this issue is to upgrade your BPEL Process Target JDK version. You cannot downgrade your Agent's JDK Version.
Please be careful while upgrading your BPEL Process Target JDK as it might destabilize your system.

Please ensure that the new JDK is compatible with your BPEL Process version and you know correct steps to upgrade the same.
After you upgrade the JDK, restart the Grid Control Agent and force an Metric Collection upload as follows:

prompt:/>emctl stop agent - Windows
bash-$ ./emctl stop agent - Unix/Linux

prompt:/>emctl start agent - Windows
bash-$ ./emctl start agent - Unix/Linux

prompt:/>emctl upload agent - Windows
bash-$ ./emctl upload agent - Unix/Linux

OEM, OMS, Enterprise Manager, Grid Control, Grid Control Agent, OMS Agent, OBIEE Management Pack, Siebel Management Pack, SOA Management Pack, AGENT_TZ_MISMATCH, Timezone,, PSU 3, JDK Mismatch, BPEL Process, etc

Thursday, July 01, 2010

Oracle Enterprise Manager - AGENT_TZ_MISMATCH

Hi Friends,

Last entire week i was busy playing with Oracle Enterprise Manager Grid Control alongside Siebel, OBIEE & SOA Management Packs.

Believe me, its not a piece of cake!
Though PSU 3 on top of provides great stability, still few nagging issues around Metric collections for different target types & other areas keep affecting us.

One of the most annoying issue that took me long time to figure out was my Grid Control Agent, simply failing to startup :-(

It was working perfectly fine earlier, but didn't know when it stopped working :-(
After much due diligence in the logs, the emagent.nohup had following dumps:
----- Wed Jun 23 11:32:51 2010::Agent Launched with PID 3852 at time Wed Jun 23 11:32:51 2010 -----
(pid=3852): starting emagent version
(pid=3852): emagent started successfully
OMS decided to shutdown the agent because of the following reason sent from OMS: AGENT_TZ_MISMATCH(pid=3852): emagent now exiting abnormally - initialization failure. Consult '.trc' and '.log' files.
----- Wed Jun 23 11:34:39 2010::Pid 3852 not found. reaped=3852, processStatus=14080 -----
----- Wed Jun 23 11:34:40 2010::Checking status of EMAgent : 3852 -----
----- Wed Jun 23 11:34:40 2010::EMAgent exited at Wed Jun 23 11:34:40 2010 with return value 55. -----
----- Wed Jun 23 11:34:40 2010::EMAgent has exited due to initialization failure. -----
----- Wed Jun 23 11:34:40 2010::Stopping other components. -----
----- Wed Jun 23 11:34:40 2010::Commiting Process death. -----
----- Wed Jun 23 11:34:40 2010::Exiting watchdog loop

I was scratching my head, what does AGENT_TZ_MISMATCH means?? Googled it around no luck! I was shocked & surprised that there was no results in Google!

Felt like i have hit some kind of jackpot ;-)
After much research, i came to know that such kind of issue might happen when your Agent's host has its Time Zone changed.

Now, first of all, i didnt accept it! What does Agent's Timezone has to do with its startup? It should automatically accept the new time...

But then, it was clear that Agent did startup correctly, but when it use to communicate with my OMS Server where the Agent's Timezone is recorded, the changed TimeZone hits a mismatch here!!!

Well, in order to resolve this, the solution is simple!
From a command prompt or terminal go to %Agent_Home%/bin directory.
Execute below command:

prompt:/>emctl resetTZ agent - Windows
bash-$./emctl resetTZ agent - Unix/Linux

This will update your Agent's with the changed TimeZone. But wait this does not complete the changes. You will need to execute a procedure on your Enterprise Manager Repository Database to reflect the changes in the timezone of the Agent.

So connect to your OMS Repository Database (generally 'emrep') using the repository owner (generally 'sysman')

SQL>exec mgmt_target.set_agent_tzrgn(<agent_name>, <new_tz_rgn>);

Well, the exact statement for this procedure is automatically generated at the end of 'emctl resetTZ agent' command :-)

Well, this completes your Agent's TimeZone change. Now to try to start the agent using below command:

prompt:/>emctl start agent - Windows
bash-$./emctl start agent - Unix/Linux

I am sure it will startup correctly! ;-)

OEM, OMS, Enterprise Manager, Grid Control, Grid Control Agent, OMS Agent, OBIEE Management Pack, Siebel Management Pack, SOA Management Pack, AGENT_TZ_MISMATCH, Timezone,, PSU 3, etc