Skip to content

Commit 638c8b4

Browse files
committed
EH: CS-675 Enhance monitoring so that it can observe more than 256 threads
1 parent 187cc09 commit 638c8b4

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

source/libs/uti/msg_utilib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
#define MSG_UTI_MONITOR_MEMERROREXT _MESSAGE(59133, _("not enough memory for monitor extension"))
155155
#define MSG_UTI_MONITOR_TETEXT_FF _MESSAGE(59134, _("pending: %.2f executed: %.2f/s"))
156156
#define MSG_UTI_MONITOR_EDTEXT_FFFFFFFF _MESSAGE(59135, _("clients: %.2f mod: %.2f/s ack: %.2f/s blocked: %.2f busy: %.2f | events: %.2f/s added: %.2f/s skipt: %.2f/s"))
157-
#define MSG_UTI_MONITOR_LISEXT_FFFF _MESSAGE(59136, _("in (g:%.2f a:%.2f e:%.2f r:%.2f)/s"))
157+
#define MSG_UTI_MONITOR_LISEXT_FFFFFFF _MESSAGE(59136, _("in (g:%.2f a:%.2f e:%.2f r:%.2f)/s GDI (g:%.2f,t:%.2f,p:%.2f)/s"))
158158
#define MSG_UTI_MONITOR_SCHEXT_UUUUUUUUUU _MESSAGE(59137, _("malloc: arena(" sge_U32CFormat ") |ordblks(" sge_U32CFormat ") | smblks(" sge_U32CFormat ") | hblksr(" sge_U32CFormat ") | hblhkd(" sge_U32CFormat ") usmblks(" sge_U32CFormat ") | fsmblks(" sge_U32CFormat ") | uordblks(" sge_U32CFormat ") | fordblks(" sge_U32CFormat ") | keepcost(" sge_U32CFormat ")"))
159159
#define MSG_UTI_DAEMONIZE_CANT_PIPE _MESSAGE(59140, _("can't create pipe"))
160160
#define MSG_UTI_DAEMONIZE_CANT_FCNTL_PIPE _MESSAGE(59141, _("can't set daemonize pipe to not blocking mode"))

source/libs/uti/sge_monitor.cc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -718,13 +718,17 @@ static void ext_gdi_output(dstring *message, void *monitoring_extension, double
718718
* MT-NOTE: ext_lis_output() is MT safe
719719
*******************************************************************************/
720720
static void ext_lis_output(dstring *message, void *monitoring_extension, double time) {
721-
auto *gdi_ext = (m_lis_t *) monitoring_extension;
722-
723-
sge_dstring_sprintf_append(message, MSG_UTI_MONITOR_LISEXT_FFFF,
724-
gdi_ext->inc_gdi / time,
725-
gdi_ext->inc_ack / time,
726-
gdi_ext->inc_ece / time,
727-
gdi_ext->inc_rep / time);
721+
auto *lis_ext = (m_lis_t *) monitoring_extension;
722+
723+
sge_dstring_sprintf_append(message, MSG_UTI_MONITOR_LISEXT_FFFFFFF,
724+
lis_ext->inc_gdi / time,
725+
lis_ext->inc_ack / time,
726+
lis_ext->inc_ece / time,
727+
lis_ext->inc_rep / time,
728+
lis_ext->gdi_get_count / time,
729+
lis_ext->gdi_trig_count / time,
730+
lis_ext->gdi_perm_count / time
731+
);
728732
}
729733

730734

source/libs/uti/sge_monitor.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,21 @@ typedef struct {
316316
u_long32 inc_ack; /* ack requests */
317317
u_long32 inc_ece; /* event client exits */
318318
u_long32 inc_rep; /* report request */
319+
320+
u_long32 gdi_get_count; /* counts the gdi get requests */
321+
u_long32 gdi_trig_count; /* counts the gdi trig requests */
322+
u_long32 gdi_perm_count; /* counts the gdi perm requests */
319323
} m_lis_t;
320324

321325
#define MONITOR_INC_GDI(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->inc_gdi++
322326
#define MONITOR_INC_ACK(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->inc_ack++
323327
#define MONITOR_INC_ECE(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->inc_ece++
324328
#define MONITOR_INC_REP(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->inc_rep++
325329

330+
#define MONITOR_LIS_GDI_GET(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->gdi_get_count++
331+
#define MONITOR_LIS_GDI_TRIG(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->gdi_trig_count++
332+
#define MONITOR_LIS_GDI_PERM(monitor) if ((monitor->monitor_time > 0) && (monitor->ext_type == LIS_EXT)) ((m_lis_t*)(monitor->ext_data))->gdi_perm_count++
333+
326334
/* event master thread extension */
327335

328336
typedef struct {

0 commit comments

Comments
 (0)