Issuing a DISPLAY QSTATUS
command DOES NOT cause an update to LGETTIME
. Nor does doing a browse of a queue. Only a destructive get will cause an update to LGETTIME
.
Also, while MSGAGE
increases while there is no activity on a queue, QTIME
is only updated once a message is destructively removed from a queue, because only at that point can the queue manager calculate how long it stayed on the queue. So the fact that your QTIME
values are changing shows that at least one of your 36 applications, that have the queue open for input, is definitely getting messages, and that will be the application that is also resulting in the changes seen to the LGETTIME
.
You say that "messages are not being consumed" but I am not sure what metric you are using to determine this fact. Perhaps you can give us some more details on that?
I can see just by looking at the CURDEPTH
values that you have shown that messages clearly are getting consumed. To begin with the queue depth is increasing, but then about half-way through your example status, we can see that the depth starts to decrease. So it would appear that messages are being consumed but just simply not quite as fast as messages are being put onto the queue in the first half of your status output examples.
So, to answer your direct question, "how can I find the LGETTIME
the application reading these messages did a GET" - the answer is to view the LGETTIME
attribute just exactly as you are doing.
You might find it useful to look into the RESET QSTATS
command to see exactly how many messages go onto the queue, and come off of the queue in each interval between issuing one instance of the RESET
command and the next instance.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website:
https://www.mqgem.com------------------------------
Original Message:
Sent: Wed July 02, 2025 11:26 AM
From: Joao Ramires
Subject: Queue status LGETTIME ?
Hello all!
I've a script running in a loop doing a display qstatus for queue "QX" each minute. Messages are not being consumed, but I see the LGETIME being updated, and the update shows it each minute, the loop delay, so I guess a DISPLAY QSTATUS, counts for the LGETTIME. If this is correct how can I find the LGETTIME the application reading these messages did a GET?
Thanks!
This is a sample output, when CURDEPTH not 0
202507021604;QUEUE(QX);TYPE(QUEUE);CURDEPTH(4897);IPPROCS(36);LGETTIME(16.04.09);MSGAGE(536);QTIME(528303854,534995245);
202507021605;QUEUE(QX);TYPE(QUEUE);CURDEPTH(4949);IPPROCS(36);LGETTIME(16.05.00);MSGAGE(561);QTIME(539412826,550112888);
202507021606;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5130);IPPROCS(36);LGETTIME(16.06.08);MSGAGE(591);QTIME(581428340,588563298);
202507021607;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5263);IPPROCS(36);LGETTIME(16.07.10);MSGAGE(583);QTIME(578282501,582036260);
202507021608;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5395);IPPROCS(36);LGETTIME(16.08.10);MSGAGE(597);QTIME(586453032,582246318);
202507021609;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5562);IPPROCS(36);LGETTIME(16.09.09);MSGAGE(603);QTIME(596517880,601214980);
202507021610;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5700);IPPROCS(36);LGETTIME(16.10.09);MSGAGE(633);QTIME(624763472,628459100);
202507021611;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5854);IPPROCS(36);LGETTIME(16.11.09);MSGAGE(637);QTIME(631450408,635854548);
202507021612;QUEUE(QX);TYPE(QUEUE);CURDEPTH(6091);IPPROCS(36);LGETTIME(16.12.10);MSGAGE(668);QTIME(658423937,666925301);
202507021613;QUEUE(QX);TYPE(QUEUE);CURDEPTH(6223);IPPROCS(36);LGETTIME(16.13.10);MSGAGE(657);QTIME(658327044,656224997);
202507021614;QUEUE(QX);TYPE(QUEUE);CURDEPTH(6135);IPPROCS(36);LGETTIME(16.14.10);MSGAGE(682);QTIME(672834453,679248596);
202507021615;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5647);IPPROCS(36);LGETTIME(16.15.10);MSGAGE(665);QTIME(673735372,664562076);
202507021616;QUEUE(QX);TYPE(QUEUE);CURDEPTH(5262);IPPROCS(36);LGETTIME(16.16.10);MSGAGE(688);QTIME(683472233,686400242);
202507021617;QUEUE(QX);TYPE(QUEUE);CURDEPTH(4807);IPPROCS(36);LGETTIME(16.17.09);MSGAGE(693);QTIME(682311621,689324008);
202507021618;QUEUE(QX);TYPE(QUEUE);CURDEPTH(4420);IPPROCS(36);LGETTIME(16.18.10);MSGAGE(694);QTIME(688357808,692888760);
202507021619;QUEUE(QX);TYPE(QUEUE);CURDEPTH(3964);IPPROCS(36);LGETTIME(16.19.10);MSGAGE(727);QTIME(720857505,726626315);
when the queue is empty the LGETTIME shows the time last GET was, and when CURDEPTH = 0
202507021631;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360);
202507021631;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360);
202507021631;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360);
202507021631;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360);
202507021631;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360);
202507021632;QUEUE(QX);TYPE(QUEUE);CURDEPTH(0);IPPROCS(36);LGETTIME(16.28.14);MSGAGE(0);QTIME(834251469,586289360)
------------------------------
Joao Ramires
------------------------------