File s390-tools-sles11sp2-mon_statd_stop_unused.patch of Package s390-tools
Description: mon_statd: fix stopping of unused records
Symptom: Unused monitor records of stopped processes are not stopped
correctly and continue to show up in the z/VM monitor stream.
Problem: Incomplete monitor record header for the stop record.
Solution: Specify complete header.
Problem-ID: 80469
---
mon_tools/mon_fsstatd.c | 2 ++
mon_tools/mon_procd.c | 3 +++
2 files changed, 5 insertions(+)
--- a/mon_tools/mon_fsstatd.c
+++ b/mon_tools/mon_fsstatd.c
@@ -111,6 +111,8 @@ static void stop_unused(int curr_max, in
mw_hdrp = (struct monwrite_hdr *)small_mon_record;
mw_hdrp->mon_function = MONWRITE_STOP_INTERVAL;
+ mw_hdrp->applid = FSSTATD_APPLID;
+ mw_hdrp->hdrlen = sizeof(struct monwrite_hdr);
mw_hdrp->datalen = 0;
for (i = 0; i < prev_max - curr_max; i += 2) {
mw_hdrp->mod_level = curr_max + i;
--- a/mon_tools/mon_procd.c
+++ b/mon_tools/mon_procd.c
@@ -129,6 +129,9 @@ static void stop_unused(int curr_max, in
int i;
mw_hdrp = (struct monwrite_hdr *)mon_record;
+ mw_hdrp->applid = PROCD_APPLID;
+ mw_hdrp->record_num = TASK_FLAG;
+ mw_hdrp->hdrlen = sizeof(struct monwrite_hdr);
mw_hdrp->mon_function = MONWRITE_STOP_INTERVAL;
mw_hdrp->datalen = 0;
for (i = 0; i < prev_max - curr_max; i += 2) {