ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Monitor Queue Depth &/or Channel Status

Post new topic  Reply to topic
 Monitor Queue Depth &/or Channel Status « View previous topic :: View next topic » 
Author Message
Hassan
PostPosted: Thu Apr 29, 2004 7:10 am    Post subject: Monitor Queue Depth &/or Channel Status Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

Here's the scenario,

1. One QM on iSeries (AS/400) and one on WIN 2K, both @ MQ 5.3
2. Trigger monitors defined on both transmission queues to start the SDR
channels automatically.

Question :

If the SDR Channel is not in RUNNING status, possibly due to network problems, the transmission queues start building up. Can we define "another" monitor on the transmission queues to watch for, say a queue depth of 20. Is there any other way to monitor the status of a Channel automatically and in real time ?

TIA,
Hassan
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Apr 29, 2004 7:41 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

The problem here is, even if you had an option of finding out or monitoring the channel, if the channel has a problem that it cannot recover from by itself. Then a manual intervention becomes necessary anyways.

And the problem with depth is, supposing the channel is still running, but the network is slow or for any other reason the messages are not being transmitted as fast as you would expect them to. The messages would pile up on the xmitq and hit your target even under circumstances where you dont have any problems.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hassan
PostPosted: Thu Apr 29, 2004 7:50 am    Post subject: Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

Thanks Kumar but that does not answer my question. I do not have a problem manually starting or checking a channel status, once we know that a problem exists.
Also if the Xmit queue is getting filled due to network issues I would like to know of this possible problem as well.

My question actually is can we have more than one monitor defined on a queue, since we already have one to start the SDR channel automatically and if we cannot then can I somehow monitor the status of the channel automatically and in real time.

Thanks!
Hassan
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Apr 29, 2004 8:11 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

I am not sure why you want more than one trigger monitor, if thats NOT the cause of your problems. As for whether you can start more than onr or not, i dont know for sure. I havent tried it, since i did not think i needed more than one. But i guess it will work.

But remember, if there is some problem with channel not coming up for some reason, then in that case, even if you add 1 2 or more trigger monitors, it wont help. Because the root cause could be different.

Also check and verify that all the triggering attributes and conditions are met when you expect the trigger monitor to start the channel.

Look in the error logs and FD files to see what the probem is with the channel going into retry state. Thats your best bet. Starting more trigger monitors is going out of the way.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hassan
PostPosted: Thu Apr 29, 2004 8:29 am    Post subject: Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

You are getting confused. Two monitors would be for two different tasks, one for starting the channel automatically (this is what I have currently) and the other to check for Queue Depth. I do not think that it is possible to have more than one monitor on the same queue, but I could be wrong, hence the question here.

I would not even need the second monitor if I can find out how to monitor the status of a channel automatically and in real time .... simply monitor NOT manage.

Thanks!
Hassan
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Apr 29, 2004 8:33 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

"You are getting confused. Two monitors would be for two different tasks, one for starting the channel automatically (this is what I have currently) and the other to check for Queue Depth"
---Well, you have to get the terminology right then. :)... You talking about triggering channels and use monitor would mean Trigger monitor ONLY. If you want to convery monitoring a queue, then you should probably use application instead of monitor. :). In any case, i am confused for sure as to what you want to monitor. Because there seems to be so many monitors here. :)

Post the exact scenario with detailed explaination and with use of appropriate terminology.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hassan
PostPosted: Thu Apr 29, 2004 9:07 am    Post subject: Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

The scenario is there in my frist post. BTW have you considered a career in politics or Micro$oft Support. You have sent posts back & forth but have not addressed the actual question (Is there any other way to monitor the status of a Channel automatically and in real time ?) as yet.

Thanks anyways
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 29, 2004 9:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You aren't telling us what you're using to monitor.

Most professional monitoring tools out there will respond to the events that indicate a change in channel status. In addition, they will respond to queue depth threshold events on local queues (which include transmission queues).

Have you looked at the Event Monitoring manual?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Hassan
PostPosted: Thu Apr 29, 2004 9:32 am    Post subject: Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

Thanks Jeff, we are not using any monitoring tools as yet. Tivoli (IBM) and Patrol (BMC) are two options but both are quite expensive and maybe an overkill for us. I will look to the event monitoring manual for help.

Tx
Hassan
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Apr 29, 2004 10:20 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

:). funny...

Now lets see what we have here.

From your initial post.
---There seem to be 2 questions.
"If the SDR Channel is not in RUNNING status, possibly due to network problems, the transmission queues start building up. Can we define "another" monitor on the transmission queues to watch for, say a queue depth of 20. "
---This is what i was answersing. Not sure what you mean by monitor queues here. Since you never mentioned that you use any kind of 3rd party software. And neither did you mention you were using an Application(homegrown may be) to monitor these queues. So what would *anyone* assume here???

---2nd question was.
"Is there any other way to monitor the status of a Channel automatically and in real time ?"
---Which i havent answered since you never mentioned how you want to do this. Your scenario was not clear to again "assume" things and explain all possible permutation and combinations of scenarios here. :)


---q from 2nd post.
"My question actually is can we have more than one monitor defined on a queue, since we already have one to start the SDR channel automatically and if we cannot then can I somehow monitor the status of the channel automatically and in real time"
---What does all this mean. I have no clue what you mean by "monitor defined on a queue". Havent heard anything like that before and hence asked for clarifications as to what you are trying to achieve.

---q from 3rd post.
"Two monitors would be for two different tasks, one for starting the channel automatically (this is what I have currently) and the other to check for Queue Depth"
---What *MONITORS*. I hope its not screen monitors. Just kidding. :)

---q again from 3rd post.
" I do not think that it is possible to have more than one monitor on the same queue, but I could be wrong, hence the question here.
"
---Again, what monitor???

---q or rather a comment, :)...from your 4th post.
"The scenario is there in my frist post. BTW have you considered a career in politics or Micro$oft Support. You have sent posts back & forth but have not addressed the actual question (Is there any other way to monitor the status of a Channel automatically and in real time ?) as yet. "
---I guess we are talking here, arent we. :)... If your question was as simple as "Is there any other way to monitor the status of a Channel automatically and in real time", why did you complicate your problem scenarios using so many *monitors*. You could have very well asked "Is there any other way to monitor the status of a Channel automatically and in real time", instead, right.

Now, coming back to your question.

As jeff mentioned you could use event monitoring by enabling channel events and may be trigger an app that would take it from there. Or you could use 3rd party tools to *monitor* your queues and channels for you. Or may be you could have your own home-grown app do this for you.

Hope i made it clear now.

Guess that would mean i dont have to go back to microsoft(I used to work earlier... Dev and not support of course... :) ...)

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jhues789
PostPosted: Thu Apr 29, 2004 10:26 am    Post subject: Perl Script to monitor the queue depth on iSeries Reply with quote

Apprentice

Joined: 20 Jan 2004
Posts: 37
Location: Madison WI

I wrote a perl program that reports the queue depth. We have a network monitoring system called Webview. This perl script reports to it and operations monitors for errors.




sub version {
return "AS400_MQ_D version 0.000001";
}

sub test {
my $self = shift;

my ( $targethost, $targetdescription, $smtp );
my ( $success, @results, @errors, @messages, @lines,$attempts );
my ( $as400obj, $user, $password, $testresults, %parms, $max_valid_p );
my ( $cmd, $line, $verbose_results, $errors_found, $totalqueues,$errorcode, $errorstring, $extended_errorcode );

$targethost = $self->get('targethost');
$targetdescription = $self->get('targetdescription');
$user = $self->get('csuserid');
$password = $self->get('cspassword');


$self->trace("Testing for host ($targethost)");

# create code here to test the as400
# and assign the output to $result_of_test
# Here is where you would call the as400 and get some output and parse t
# hrough it.....

# the command you want to execute
$cmd = 'STRMQMMQSC SRCMBR(DISQLOCAL) SRCFILE(MQTOOLS/MQWEBVIEW)';
#$cmd = 'DSPLIBL';

# prepare to connect to the as400
# only pass user and password parameters if they are not blank
$parms{as400} = $targethost;
$parms{debug} = 1;
$parms{user} = $user if ( $user ne '' );
$parms{password} = $password if ( $password ne '' );

$self->trace( "User parm is currently " . $parms{user} . "\n" );

$as400obj = WebViewAS400->new( %parms );

# issue the command to the as400
@results = $as400obj->cmd( command => $cmd );

# initialize a global error counter
$errors_found = 0;
$totalqueues = 0;

# check for errors and if ok then parse through the results

if ( $as400obj->is_ok() ) {

$self->trace( "Checking the queue depths\n");
}
else {
$verbose_results = "There was an error executing the command\n\n";
# get the errorcode
$errorcode = $as400obj->errorcode();

# get a descriptive string that corresponds to the errorcode
$errorstring = $as400obj->errorstring();

# get an extended error code
$extended_errorcode = $as400obj->extended_errorcode();

# get the string text of errors or exceptions
@errors = $as400obj->errors();
$verbose_results .= join "", $as400obj->rawresults();
$self->set_testresults( $verbose_results );
return $self->protocol_error();
}

my ( $line, $success );
my ( $queuename, $maxdepth, $curdepth, $max_valid_percentage );
my ( $cur_percent, $verbose_results );

print "\n**********************************************\n\n";

$success = 0;
$max_valid_percentage = 0.85;
$verbose_results = "";

# check for errors and if ok then parse through the results

if ( $as400obj->is_ok() ) {

$self->trace( "Checking the queue depths\n");
}
else {
$verbose_results = "There was an error executing the command\n\n";

$verbose_results .= "Error code: $errorcode\n";
$verbose_results .= "Error String: $errorstring\n";
$verbose_results .= "Extended Error Code: $extended_errorcode\n";
$verbose_results .= "Number of attempts at executing command: $attempts\n";
foreach ( @errors ) {
$verbose_results .= "Error line: $_\n";
}
foreach ( @messages ) {
$verbose_results .= "AS400 Message line: $_\n";
}




$verbose_results .= join "", $as400obj->rawresults();
$self->set_testresults( $verbose_results );
return $self->protocol_error();
}
foreach $line ( @results ) {

if ( $line =~ /QUEUE\(([\w\.]+)\)/ ) {
$queuename = $1;

$success = 1;
$curdepth = 'unknown';
$maxdepth = 'unknown';
$totalqueues++;
}

if ( $line =~ /MAXDEPTH\((\d+)\)/ ) {
$maxdepth = $1;
}

if ( $line =~ /CURDEPTH\((\d+)\)/ ) {
$curdepth = $1;
print "Queue $queuename has maxdepth $maxdepth and curde
pth $curdepth\n";

# calculate whether $curdepth/$maxdepth > some_bad_perce
#ntage

$cur_percent = $curdepth / $maxdepth;

if ( $cur_percent > $max_valid_percentage ) {
print "\n\nQueue $queuename is in error up!!!\n";
print "$cur_percent is greater than $max_valid_p
ercentage\n\n";

$verbose_results .= "QUEUE: $queuename is too full (curdepth=$curdepth)(max_depth=$maxdepth)\n";

# increment the errors counter so we know that at least one queue is bad
$errors_found++;

}
}
}


$verbose_results = "There were $errors_found queues over " . $max_valid_percentage*100 . "% within $totalqueues message queues tested.\n\n" .
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Apr 29, 2004 10:36 am    Post subject: Re: Perl Script to monitor the queue depth on iSeries Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jhues789 wrote:
I wrote a perl program

Cool.

jhues789 wrote:
# prepare to connect to the as400


AS400 ... Yikes!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Apr 29, 2004 10:48 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
they will respond to queue depth threshold events on local queues

If you do decide to use the High/Low/Full Events for queues, then read the Events manual *very* carefully about how these work. They're not as obvious as you would expect.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Hassan
PostPosted: Mon May 03, 2004 5:22 am    Post subject: Reply with quote

Voyager

Joined: 01 Apr 2004
Posts: 81
Location: Toronto, Canada

Thank you guys for your help. I'll try out these options and let you know how things go.

Regards,
Hassan
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Mon May 03, 2004 6:56 am    Post subject: Re: Perl Script to monitor the queue depth on iSeries Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

jefflowrey wrote:
AS400 ... Yikes!

A little respect for baby dinosaur please!
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Monitor Queue Depth &/or Channel Status
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.