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 » General Discussion » Grep command in SunOS 5.8/SunOS 5.9

Post new topic  Reply to topic
 Grep command in SunOS 5.8/SunOS 5.9 « View previous topic :: View next topic » 
Author Message
nagabhb
PostPosted: Mon Dec 20, 2010 10:04 pm    Post subject: Grep command in SunOS 5.8/SunOS 5.9 Reply with quote

Apprentice

Joined: 20 Dec 2010
Posts: 42

My requirement is I have to display Queue name along with Intitaion queue in health chek script.
Fot this I'm using

echo "DISPLAY QLOCAL(*) WHERE(INITQ NE ' ') INITQ" | runmqsc $QMGR | grep -e INITQ -e QUEUE | grep -v 'DISPLAY QLOCAL' | grep -v SYSTEM.CHANNEL.INITQ

Here grep -e INITQ -e QUEUE lists out queue name and Init q in AIX but it's failing in Sun OS.I tried various options but could not succeeded.

Can any throw light on this.

Thanks In Advance !!!
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Dec 20, 2010 10:14 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

What do you mean by it's failing? What works? What doesn't?

What do you consider healthy for the SYSTEM.CHANNEL.INITQ?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Mon Dec 20, 2010 10:18 pm    Post subject: Re: Grep command in SunOS 5.8/SunOS 5.9 Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

nagabhb wrote:
My requirement is I have to display Queue name along with Intitaion queue in health chek script.
Fot this I'm using

echo "DISPLAY QLOCAL(*) WHERE(INITQ NE ' ') INITQ" | runmqsc $QMGR | grep -e INITQ -e QUEUE | grep -v 'DISPLAY QLOCAL' | grep -v SYSTEM.CHANNEL.INITQ

Here grep -e INITQ -e QUEUE lists out queue name and Init q in AIX but it's failing in Sun OS.I tried various options but could not succeeded.

Can any throw light on this.

Thanks In Advance !!!


Two solutions:

1. Only on Solaris:
Code:
echo "DISPLAY QLOCAL(*) WHERE(INITQ NE ' ') INITQ" | runmqsc $QMGR | /usr/xpg4/bin/grep -e INITQ -e QUEUE | grep -v 'DISPLAY QLOCAL' | grep -v SYSTEM.CHANNEL.INITQ


2. On AIX and Solaris:
Code:
echo "DISPLAY QLOCAL(*) WHERE(INITQ NE ' ') INITQ" | runmqsc $QMGR |  egrep 'INITQ|QUEUE' | grep -v 'DISPLAY QLOCAL' | grep -v SYSTEM.CHANNEL.INITQ


Solaris provides several different versions of most of the Unix tools.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
nagabhb
PostPosted: Mon Dec 20, 2010 11:02 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2010
Posts: 42

Thanks Hubert for the quick reply.Two commands you pasted are working fine.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Dec 24, 2010 9:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

A while ago, I added CheckUp tool to MQ Batch Toolkit.

The CheckUp tool will verify that attributes of MQ objects are valid and exists. CheckUp scans queues, channels, namelists, processes and queue manager attributes and uses over 20 rules to verify attributes of MQ objects.

One of the rules is to check for triggered queues and verify INITQ is present.

Rather than you thinking of all the possible "missing links" in MQ, you could try out MQ Batch Toolkit and see if it meets your needs.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Grep command in SunOS 5.8/SunOS 5.9
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.