Skip to content

Commit d2f7e7a

Browse files
committed
Update for MQ 930 - include new QQST structure
1 parent 87b912a commit d2f7e7a

19 files changed

+174
-13
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
History (newest at top)
33
=======================
44

5+
Jul 2022 (v5.4)
6+
* Update for MQ V9.3.0
7+
* New QQST structure in the 115 records
8+
59
Nov 2021 (v5.3.3)
610
* Update for MQ V9.2.4 (no functional change)
711
* Visual Studio 2022 setup script

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

2.94 KB
Binary file not shown.

bin/linux/convH

568 Bytes
Binary file not shown.

bin/linux/mqsmfcsv

-3.34 KB
Binary file not shown.

bin/win/convH.exe

134 KB
Binary file not shown.

bin/win/mqsmfcsv.exe

1 KB
Binary file not shown.

src/M

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plat=`uname`
44

55
if [ -z "$VERS" ]
66
then
7-
VERS="924"
7+
VERS="930"
88
fi
99

1010
if [ "$plat" = "AIX" ]

src/Makefile.gcc.win

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CC=i686-w64-mingw32-gcc
33
# CFLAGS= -I. -m32 -fpack-struct=8 -DPLATFORM_WINDOWS
44
CFLAGS= -I. -m32 -DPLATFORM_WINDOWS
55
PLATFLAGS=
6-
VERS=924
6+
VERS=930
77
SRC = mqsmf.c \
88
smfDDL.c \
99
smfDate.c \
@@ -26,6 +26,7 @@ SRC = mqsmf.c \
2626
t115/printQLST.c \
2727
t115/printQMST.c \
2828
t115/printQPST.c \
29+
t115/printQQST.c \
2930
t115/printQSGM.c \
3031
t115/printQSPH.c \
3132
t115/printQSRS.c \

src/Makefile.unix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SRC = \
2424
t115/printQLST.c \
2525
t115/printQMST.c \
2626
t115/printQPST.c \
27+
t115/printQQST.c \
2728
t115/printQSGM.c \
2829
t115/printQSPH.c \
2930
t115/printQSRS.c \

src/Makefile.win

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J /O2 /DPLATFORM_WINDOWS
2-
VERS=924
2+
VERS=930
33
SRC = mqsmf.c \
44
smfDDL.c \
55
smfDate.c \
@@ -22,6 +22,7 @@ SRC = mqsmf.c \
2222
t115/printQLST.c \
2323
t115/printQMST.c \
2424
t115/printQPST.c \
25+
t115/printQQST.c \
2526
t115/printQSGM.c \
2627
t115/printQSPH.c \
2728
t115/printQSRS.c \

src/checkSize.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fprintf(fp,"%s : %d\n","qlst",(int)sizeof(qlst));
2626
fprintf(fp,"%s : %d\n","qmac",(int)sizeof(qmac));
2727
fprintf(fp,"%s : %d\n","qmst",(int)sizeof(qmst));
2828
fprintf(fp,"%s : %d\n","qpst",(int)sizeof(qpst));
29+
fprintf(fp,"%s : %d\n","qqst",(int)sizeof(qqst));
2930
fprintf(fp,"%s : %d\n","qsgm",(int)sizeof(qsgm));
3031
fprintf(fp,"%s : %d\n","qsph",(int)sizeof(qsph));
3132
fprintf(fp,"%s : %d\n","qsrs",(int)sizeof(qsrs));
@@ -46,6 +47,11 @@ fprintf(fp,"%s : %d\n","qwsx",(int)sizeof(qwsx));
4647
fprintf(fp,"%s : %d\n","qwas",(int)sizeof(qwas));
4748
fprintf(fp,"%s : %d\n","qwa0",(int)sizeof(qwa0));
4849
fprintf(fp,"%s : %d\n","wq ",(int)sizeof(wq));
50+
51+
/* Print a few structure offsets that reflect problematic areas */
4952
fprintf(fp,"wq->maxqdpth: %d\n",(int)offsetof(wq,maxqdpth));
5053
fprintf(fp,"wq->z__001 : %d\n",(int)offsetof(wq,z__001 ));
54+
55+
/* QQST is new during 930 development and initial version looked wrong. But it's now corrected. */
56+
fprintf(fp,"qqst->qqstdpth : %d\n",(int)offsetof(qqst,qqstdpth ));
5157
}

src/convH64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020 IBM Corporation and other Contributors.
2+
* Copyright (c) 2016, 2022 IBM Corporation and other Contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
@@ -372,7 +372,7 @@ void printHeader(char *version)
372372
printf(" * by the convH program (convH64.c) in the src directory\n");
373373
printf(" * Do not try to edit this header manually.\n");
374374
printf(" * \n");
375-
printf(" * (C) Copyright IBM Corp. 1993, 2021 All Rights Reserved.\n");
375+
printf(" * (C) Copyright IBM Corp. 1993, 2022 All Rights Reserved.\n");
376376
printf(" * \n");
377377
printf(" */\n");
378378
}

src/mqsmf.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,18 @@ int main( int argc, char *argv[] )
914914
}
915915
break;
916916

917+
#ifdef QQSTIDV
918+
/* Pageset statistics introduced in MQ V9.3 - only compile this block if using */
919+
/* a suitable header file. */
920+
case SMFSUBTYPE_MQ_STAT_QUEUES:
921+
for(i = 0; i < triplet[1].n; i++)
922+
{
923+
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
924+
printQQST((qqst *)p);
925+
}
926+
break;
927+
#endif
928+
917929
case SMFSUBTYPE_MQ_STAT_RESERVED_1:
918930
/* These are internal undocumented structures. There's not much we can do */
919931
/* except ignore them. We will see them show up in the overall subtype */

src/mqsmf.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ typedef unsigned int BOOL;
7575
#define SMFSUBTYPE_MQ_STAT_REGION (7)
7676
#define SMFSUBTYPE_MQ_STAT_PAGESET (201)
7777
#define SMFSUBTYPE_MQ_STAT_BUFFER (215)
78+
#define SMFSUBTYPE_MQ_STAT_QUEUES (216)
7879
#define SMFSUBTYPE_MQ_STAT_CHANNEL (231)
7980
#define SMFSUBTYPE_MQ_STAT_RESERVED_1 (240)
8081

@@ -191,6 +192,9 @@ extern void printQEST (qest *);
191192
#ifdef QIS1IDV
192193
extern void printQIS1 (qis1 *);
193194
#endif
195+
#ifdef QQSTIDV
196+
extern void printQQST (qqst *);
197+
#endif
194198
extern void printQIST (qist *);
195199
extern void printQJST (qjst *);
196200
extern void printQLST (qlst *);

src/mqsmfstrucU.h

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
* This file was generated from cqsdsmfc.h version 924
2+
* This file was generated from cqsdsmfc.h version 930
33
* by the convH program (convH64.c) in the src directory
44
* Do not try to edit this header manually.
55
*
6-
* (C) Copyright IBM Corp. 1993, 2021 All Rights Reserved.
6+
* (C) Copyright IBM Corp. 1993, 2022 All Rights Reserved.
77
*
88
*/
99
#pragma pack(1)
@@ -621,8 +621,7 @@ int32_t qpstsos;
621621
uint32_t qpstloc : 1;
622622
uint32_t qpstf4kb : 1;
623623
uint32_t : 30;
624-
uint32_t QPST_MSGP020_PUTIME;
625-
int32_t filler__001[6];
624+
int32_t filler__001[7];
626625
} qpst;
627626
#define QPSTIDV 0xD30F
628627
#define QPSTEYEV "QPST"
@@ -634,6 +633,29 @@ extern "C" {
634633
#endif
635634
typedef
636635
struct {
636+
uint16_t qqstid;
637+
uint16_t qqstll;
638+
char qqsteyec[4];
639+
char qqstqnam[48];
640+
uint32_t qqstflag;
641+
signed short int qqstpsid;
642+
signed short int qqstbpid;
643+
char qqstqsgn[4];
644+
char qqstcfst[12];
645+
int32_t qqstdpth;
646+
} qqst;
647+
#define QQSTIDV 0xD80F
648+
#define QQSTEYEV "QQST"
649+
#define QQSTDISP 0x80000000
650+
#define QQSTPART 0x40000000
651+
#if defined(__cplusplus)
652+
}
653+
#endif
654+
#if defined(__cplusplus)
655+
extern "C" {
656+
#endif
657+
typedef
658+
struct {
637659
uint16_t qsgmid;
638660
uint16_t qsgmll;
639661
char qsgmeyec[4];
@@ -1324,6 +1346,21 @@ extern "C" {
13241346
#endif
13251347
typedef
13261348
struct {
1349+
uint32_t qws30pso;
1350+
uint16_t qws30psl;
1351+
uint16_t qws30psn;
1352+
uint32_t qws30r1o;
1353+
uint16_t qws30r1l;
1354+
uint16_t qws30r1n;
1355+
} qws3;
1356+
#if defined(__cplusplus)
1357+
}
1358+
#endif
1359+
#if defined(__cplusplus)
1360+
extern "C" {
1361+
#endif
1362+
typedef
1363+
struct {
13271364
uint32_t qws50pso;
13281365
uint16_t qws50psl;
13291366
uint16_t qws50psn;

src/mqsmfstrucW.h

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
* This file was generated from cqsdsmfc.h version 924
2+
* This file was generated from cqsdsmfc.h version 930
33
* by the convH program (convH64.c) in the src directory
44
* Do not try to edit this header manually.
55
*
6-
* (C) Copyright IBM Corp. 1993, 2021 All Rights Reserved.
6+
* (C) Copyright IBM Corp. 1993, 2022 All Rights Reserved.
77
*
88
*/
99
#pragma pack(1)
@@ -621,8 +621,7 @@ int32_t qpstsos;
621621
uint32_t qpstloc : 1;
622622
uint32_t qpstf4kb : 1;
623623
uint32_t : 30;
624-
uint32_t QPST_MSGP020_PUTIME;
625-
int32_t filler__001[6];
624+
int32_t filler__001[7];
626625
} qpst;
627626
#define QPSTIDV 0xD30F
628627
#define QPSTEYEV "QPST"
@@ -634,6 +633,29 @@ extern "C" {
634633
#endif
635634
typedef
636635
struct {
636+
uint16_t qqstid;
637+
uint16_t qqstll;
638+
char qqsteyec[4];
639+
char qqstqnam[48];
640+
uint32_t qqstflag;
641+
signed short int qqstpsid;
642+
signed short int qqstbpid;
643+
char qqstqsgn[4];
644+
char qqstcfst[12];
645+
int32_t qqstdpth;
646+
} qqst;
647+
#define QQSTIDV 0xD80F
648+
#define QQSTEYEV "QQST"
649+
#define QQSTDISP 0x80000000
650+
#define QQSTPART 0x40000000
651+
#if defined(__cplusplus)
652+
}
653+
#endif
654+
#if defined(__cplusplus)
655+
extern "C" {
656+
#endif
657+
typedef
658+
struct {
637659
uint16_t qsgmid;
638660
uint16_t qsgmll;
639661
char qsgmeyec[4];
@@ -1325,6 +1347,21 @@ extern "C" {
13251347
#endif
13261348
typedef
13271349
struct {
1350+
uint32_t qws30pso;
1351+
uint16_t qws30psl;
1352+
uint16_t qws30psn;
1353+
uint32_t qws30r1o;
1354+
uint16_t qws30r1l;
1355+
uint16_t qws30r1n;
1356+
} qws3;
1357+
#if defined(__cplusplus)
1358+
}
1359+
#endif
1360+
#if defined(__cplusplus)
1361+
extern "C" {
1362+
#endif
1363+
typedef
1364+
struct {
13281365
uint32_t qws50pso;
13291366
uint16_t qws50psl;
13301367
uint16_t qws50psn;

src/sizes.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ qlst : 32
1414
qmac : 48
1515
qmst : 104
1616
qpst : 104
17+
qqst : 84
1718
qsgm : 48
1819
qsph : 88
1920
qsrs : 232
@@ -36,3 +37,4 @@ qwa0 : 56
3637
wq : 2788
3738
wq->maxqdpth: 588
3839
wq->z__001 : 594
40+
qqst->qqstdpth : 80

src/t115/printQQST.c

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright (c) 2016,2022 IBM Corporation and other Contributors.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Mark Taylor - Initial Contribution
11+
*/
12+
13+
14+
#include <stdio.h>
15+
#include "mqsmf.h"
16+
17+
SMFPRINTGLOB;
18+
19+
/* Queue statistics */
20+
void printQQST(qqst *p)
21+
{
22+
char *c;
23+
unsigned int *u;
24+
uint32_t flags;
25+
26+
SMFPRINTSTART("QQST", p, conv16(p->qqstll));
27+
28+
ADDSTRENS("Queue", p->qqstqnam);
29+
30+
flags = conv32(p->qqstflag);
31+
if ((flags & QQSTDISP) == QQSTDISP) {
32+
c = "SHARED";
33+
} else {
34+
c = "PRIVATE";
35+
}
36+
ADDSTR("Queue_Disp", c,7); /* 7 = max length of SHARED/PRIVATE */
37+
38+
/* When the record is partial the depth will be shown as 0 but might be incorrect */
39+
if ((flags & QQSTPART) == QQSTPART) {
40+
c = "PARTIAL";
41+
} else {
42+
c = "FULL";
43+
}
44+
ADDSTR("Record", c,7); /* 7 = max length of PARTIAL/FULL */
45+
46+
ADDSTRENS("QSG_Name", p->qqstqsgn);
47+
ADDSTRENS("Structure",p->qqstcfst);
48+
49+
ADDS16("Pageset" , p->qqstpsid); /* Pageset/Bufferpool will be -1 for shared queues */
50+
ADDS16("BufferPool", p->qqstbpid); /* and for unallocated private queues */
51+
ADDS32("Current_Depth",p->qqstdpth);
52+
53+
SMFPRINTSTOP;
54+
55+
return;
56+
}

0 commit comments

Comments
 (0)