119 lines
4.0 KiB
Diff
119 lines
4.0 KiB
Diff
|
From 65f317c463de53abf7a8bba3285a077dbaf42486 Mon Sep 17 00:00:00 2001
|
||
|
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||
|
Date: Mon, 22 Jun 2009 12:53:22 +0200
|
||
|
Subject: [PATCH] s390-tools-1.8.1-ziomon-new-blkiomon
|
||
|
|
||
|
ziomon: Adjust to use blkiomon V0.3
|
||
|
|
||
|
Update the blkiomon header to the version packaged in RHEL 5.4, update
|
||
|
the version check appropriately and use the version number for .log files
|
||
|
to match what the proper, forthcoming version will use.
|
||
|
---
|
||
|
ziomon/blkiomon.h | 4 ++--
|
||
|
ziomon/ziomon | 2 +-
|
||
|
ziomon/ziomon_dacc.c | 12 ++++++------
|
||
|
ziomon/ziomon_dacc.h | 2 +-
|
||
|
4 files changed, 10 insertions(+), 10 deletions(-)
|
||
|
|
||
|
diff --git a/ziomon/blkiomon.h b/ziomon/blkiomon.h
|
||
|
index da27d00..42b6b46 100644
|
||
|
--- a/ziomon/blkiomon.h
|
||
|
+++ b/ziomon/blkiomon.h
|
||
|
@@ -25,6 +25,7 @@ struct blkiomon_stat {
|
||
|
/* Histogram of dispatch to completion request times in u-secs.
|
||
|
Step-size is 8, starting at 0. */
|
||
|
__u32 d2c_hist[BLKIOMON_D2C_BUCKETS];
|
||
|
+ __u32 device; /* device identifier */
|
||
|
struct minmax size_r; /* stats of read request sizes in Bytes */
|
||
|
struct minmax size_w; /* stats of write request sizes in Bytes */
|
||
|
struct minmax d2c_r; /* stats of read request durations in u-secs */
|
||
|
@@ -33,8 +34,7 @@ struct blkiomon_stat {
|
||
|
struct minmax thrput_w; /* stats of write throughput in Kbytes per micro-sec */
|
||
|
__u64 bidir; /* number of bi-directional requests, is set exclusive
|
||
|
(ie. not implicitly adding 1 to rd and wrt as well) */
|
||
|
- __u32 device; /* device identifier */
|
||
|
-} __attribute__ ((packed));
|
||
|
+};
|
||
|
|
||
|
static struct histlog2 size_hist = {0, 1024, BLKIOMON_SIZE_BUCKETS};
|
||
|
|
||
|
diff --git a/ziomon/ziomon b/ziomon/ziomon
|
||
|
index fe4d8ec..297651c 100755
|
||
|
--- a/ziomon/ziomon
|
||
|
+++ b/ziomon/ziomon
|
||
|
@@ -414,7 +414,7 @@ function check_vmalloc_space() {
|
||
|
function check_blkiomon() {
|
||
|
# check blkiomon version
|
||
|
ver=`blkiomon -V | awk '{print $3}'`;
|
||
|
- if [ "$ver" != "0.2" ]; then
|
||
|
+ if [ "$ver" != "0.3" ]; then
|
||
|
echo "$WRP_TOOLNAME: Unsupported blkiomon version $ver detected, aborting";
|
||
|
exit 1;
|
||
|
fi
|
||
|
diff --git a/ziomon/ziomon_dacc.c b/ziomon/ziomon_dacc.c
|
||
|
index f2c34ac..0a17d9e 100644
|
||
|
--- a/ziomon/ziomon_dacc.c
|
||
|
+++ b/ziomon/ziomon_dacc.c
|
||
|
@@ -426,7 +426,7 @@ int add_msg(FILE *fp, struct message *msg, struct file_header *f_hdr,
|
||
|
int init_file(FILE *fp, struct file_header *f_hdr)
|
||
|
{
|
||
|
f_hdr->magic = DATA_MGR_MAGIC;
|
||
|
- f_hdr->version = DATA_MGR_V2;
|
||
|
+ f_hdr->version = DATA_MGR_V3;
|
||
|
f_hdr->first_msg_offset = 0;
|
||
|
f_hdr->end_time = 0;
|
||
|
f_hdr->begin_time = 0;
|
||
|
@@ -452,11 +452,11 @@ static int get_header(FILE *fp, struct file_header *hdr)
|
||
|
toolname);
|
||
|
return -2;
|
||
|
}
|
||
|
- if (hdr->version != DATA_MGR_V2) {
|
||
|
+ if (hdr->version != DATA_MGR_V3) {
|
||
|
fprintf(stderr, "%s: Wrong version: .log data is in version %u"
|
||
|
" format, while this tool only supports version %u."
|
||
|
" Get the matching tool version and try again.\n",
|
||
|
- toolname, hdr->version, DATA_MGR_V2);
|
||
|
+ toolname, hdr->version, DATA_MGR_V3);
|
||
|
return -2;
|
||
|
}
|
||
|
hdr->begin_time = 0;
|
||
|
@@ -557,11 +557,11 @@ static int read_aggr_file(FILE *fp, struct aggr_data *data)
|
||
|
toolname);
|
||
|
return -1;
|
||
|
}
|
||
|
- if (data->version != DATA_MGR_V2) {
|
||
|
+ if (data->version != DATA_MGR_V3) {
|
||
|
fprintf(stderr, "%s: Wrong version: .agg data is in version %u"
|
||
|
" format, while this tool only supports version %u."
|
||
|
" Get the matching tool version and try again.\n",
|
||
|
- toolname, data->version, DATA_MGR_V2);
|
||
|
+ toolname, data->version, DATA_MGR_V3);
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
@@ -805,7 +805,7 @@ int write_aggr_file(FILE *fp, struct aggr_data *data)
|
||
|
void init_aggr_data_struct(struct aggr_data *data)
|
||
|
{
|
||
|
data->magic = DATA_MGR_MAGIC_AGGR;
|
||
|
- data->version = DATA_MGR_V2;
|
||
|
+ data->version = DATA_MGR_V3;
|
||
|
data->num_zfcpdd = 0;
|
||
|
data->num_blkiomon = 0;
|
||
|
data->end_time = 0;
|
||
|
diff --git a/ziomon/ziomon_dacc.h b/ziomon/ziomon_dacc.h
|
||
|
index f280c9b..8f301f4 100644
|
||
|
--- a/ziomon/ziomon_dacc.h
|
||
|
+++ b/ziomon/ziomon_dacc.h
|
||
|
@@ -17,7 +17,7 @@
|
||
|
|
||
|
#define DATA_MGR_MAGIC 0x64616d67
|
||
|
#define DATA_MGR_MAGIC_AGGR 0x61676772
|
||
|
-#define DATA_MGR_V2 2u
|
||
|
+#define DATA_MGR_V3 3u
|
||
|
|
||
|
|
||
|
/**
|
||
|
--
|
||
|
1.6.0.6
|
||
|
|