| Author | 
		  Message
		 | 
		
		  | MQCONN | 
		  
		    
			  
				 Posted: Thu Dec 19, 2013 4:44 pm    Post subject: When page set is nearly full, identifying biggest queues | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 09 Oct 2013 Posts: 5
  
  | 
		  
		    
			  
				When you're administering MQ, and you've set up an alert to signal a page set is trending towards filling up, a good command to identify which set of queues are taking up the most space in the page set might be...
 
 
DISPLAY QUEUE(*) PSID(7) CURDEPTH
 
 
and sorting on current queue depth.
 
 
But suppose you want to know not just how deep the deepest queues are, but how much actual space in the page set these biggest queues are occupying.  A queue with 10,000 short messages could be much smaller than a queue with 5,000 long messages.
 
 
Didn't see any obvious answer to this question in either Infocenter or Google. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gs | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 3:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 31 May 2007 Posts: 254 Location: Sweden 
  | 
		  
		    
			  
				| I guess the easiest solution would be to look at the file system e.g. <MQ installation folder>/Qmgrs/<qmgr name>/queues | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elkinsc | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 4:55 am    Post subject: Oh dear | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 29 Dec 2004 Posts: 138 Location: Indy 
  | 
		  
		    
			  
				to gs - Pagesets are z/OS only.  
 
 
MQCONN, please look at he DISPLAY USAGE command. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 7:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				Moved to Mainframe forum. _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elkinsc | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 7:44 am    Post subject: Thank you Bruce! | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 29 Dec 2004 Posts: 138 Location: Indy 
  | 
		  
		    
			  
				| and a happy Festivus to all! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 8:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				
   
	| gs wrote: | 
   
  
	| I guess the easiest solution would be to look at the file system e.g. <MQ installation folder>/Qmgrs/<qmgr name>/queues | 
   
 
 
For UNIX/Windows, how exactly would you look at the filesystem?  What command(s) would you use?   Have you tried this?  What were the results? _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gs | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 9:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 31 May 2007 Posts: 254 Location: Sweden 
  | 
		  
		    
			  
				
   
	| bruce2359 wrote: | 
   
  
	
 
to gs - Pagesets are z/OS only. | 
   
 
 
 
My bad, missed the pageset info  
 
 
   
	| bruce2359 wrote: | 
   
  
	
   
	| gs wrote: | 
   
  
	| I guess the easiest solution would be to look at the file system e.g. <MQ installation folder>/Qmgrs/<qmgr name>/queues | 
   
 
 
For UNIX/Windows, how exactly would you look at the filesystem?  What command(s) would you use?   Have you tried this?  What were the results? | 
   
 
 
 
There may be better solutions  but wouldn't the file size of the queue file indicate the actual disk space the queue and its messages claims? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 9:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				
   
	| gs wrote: | 
   
  
	| ...but wouldn't the file size of the queue file indicate the actual disk space the queue and its messages claims? | 
   
 
 
For UNIX/Windows, how exactly would you look at the filesystem? What command(s) would you use? Have you tried this? What were the results? _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gs | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 9:38 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 31 May 2007 Posts: 254 Location: Sweden 
  | 
		  
		    
			  
				
   
	| bruce2359 wrote: | 
   
  
	
   
	| gs wrote: | 
   
  
	| ...but wouldn't the file size of the queue file indicate the actual disk space the queue and its messages claims? | 
   
 
 
For UNIX/Windows, how exactly would you look at the filesystem? What command(s) would you use? Have you tried this? What were the results? | 
   
 
 
 
Not sure if I'm missing your point here but to my understanding  OP didn't necessarily want to do this programmatically or through MQ tools. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 9:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				You recommended that the OP look into the filesystem (to see which queues had messages, and how much disk space they were using).  I'm suggesting that you try this exact procedure to verify that this procedure really works.
 
   
	| gs wrote: | 
   
  
	| ... but wouldn't the file size of the queue file indicate the actual disk space the queue and its messages claims? | 
   
 
 
This comment indicates to me that you haven't tested this procedure. _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gs | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 10:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 31 May 2007 Posts: 254 Location: Sweden 
  | 
		  
		    
			  
				
   
	| bruce2359 wrote: | 
   
  
	| You recommended that the OP look into the filesystem (to see which queues had messages).  I'm suggesting that you try this exact procedure to verify that this procedure really works. | 
   
 
 
 
I did that prior to answering but not enough. Queue file increased equivalent to messages being written. However, turns out I was wrong as file size doesn't decrease right away when removing messages. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | MQCONN | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 1:37 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 09 Oct 2013 Posts: 5
  
  | 
		  
		    
			  
				Thanks all for your interest in my question.
 
 
Sorry if I didn't make this clear at the outset, but yes, this is a question about mainframe MQ.
 
 
Looked at the DISPLAY USAGE command more closely, but didn't see any option that details space usage by specific queues.  Here's an example...
 
 
&MQXX DISPLAY USAGE PSID(7)                                           
 
 
CSQI010I &MQXX Page set usage ...                                     
 
  Page Buffer     Total    Unused  Persistent  NonPersist Expansion   
 
   set   pool     pages     pages  data pages  data pages        count
 
    3      3     278981    274782        2389        1810 USER       0
 
End of page set report 
 
 
It's in fact the DISPLAY USAGE command we're using to generate the initial alert.
 
 
What I'm looking for is something like this hypothetical...
 
 
&MQXX DISPLAY USAGE PSID(7) QDETAILS                                           
 
 
CSQI010I &MQXX Page set usage ...                                     
 
  Page Buffer     Total    Unused  Persistent  NonPersist Expansion   
 
   set   pool     pages     pages  data pages  data pages        count
 
    3      3     278981    274782        2389        1810 USER       0
 
 
   Queue Name                   Total pages
 
   MQXX.LOCAL.QUEUE1      0
 
   MQXX.LOCAL.QUEUE2      1
 
   MQXX.LOCAL.QUEUE3      0
 
   MQXX.LOCAL.QUEUE4      1
 
   MQXX.LOCAL.QUEUE5      4000
 
End of page set report 
 
 
Thanks again! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elkinsc | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 2:31 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 29 Dec 2004 Posts: 138 Location: Indy 
  | 
		  
		    
			  
				What you have asked for, pageset and bufferpool use by queue is not available.  What you can do, with some effort, is capture the SMF116 class 3 records, which will give you real queue usage (depth, message size, etc.).  You can then apply that queue use to the pageset.  
 
 
That is an awful lot of work, and is not realtime.  Is it 'good enough' to use display usage, and examine the pageset use with a knowledge of what queues are defined to use the pageset and bufferpool you are concerned about?  You can then do a display of the current depths of the queues to see which is contributing to the constraints?  There is also the option of using the RESET QSTATS comment to see the message count since the last time the command was issued.  A word of warning, this command does just what it says -   it resets the stats.  If you are also using a commercially available monitoring tool (like Omegamon) it is issuing that command regularly, so counts you receive from the command will always be inaccurate.  And the counts gathered by the monitoring tool will be impacted by other uses of the command.  
 
 
What I would urge you to do is to open an RFE for improvements you feel need to be made, or vote for ones that already exist.  For a number of years some folks have been asking for queue level statistics, which would allow tracking queue use without the expense of the SMF116 class 3 data collection.  This can then be mapped back to real bufferpool and pageset use more easily that the hoops we jump thru today.  
 
 
I know this is not an answer to your question, in part because there is no one command that will give you the information you want.  Monitoring MQ on any platform is a huge subject.  Monitoring the resources MQ is using under the covers (like bufferpools, pagesets and CF) can get even bigger, quickly.  And I can bore you to tears on ways I've seen it done (and not done) and the relative effectiveness.....
 
 
Happy winter solstice! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Dec 20, 2013 3:19 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Sun Dec 22, 2013 9:03 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Have you thought about using 
 
dis ql(*) curdepth where (pageset eq 7)?
 
 
Have fun   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |