File: ziomon_zfcpdd.h

package info (click to toggle)
s390-tools 2.15.1-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 8,216 kB
  • sloc: ansic: 130,144; sh: 9,397; cpp: 8,359; perl: 2,517; makefile: 1,960; asm: 1,016
file content (47 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * FCP adapter trace utility
 *
 * I/O monitor based on block queue trace data
 *
 * Copyright IBM Corp. 2008, 2017
 *
 * s390-tools is free software; you can redistribute it and/or modify
 * it under the terms of the MIT license. See LICENSE for details.
 */

#ifndef ZFCPIOMON_H_
#define ZFCPIOMON_H_

#include "ziomon_tools.h"

#define BLKIOMON_CHAN_LAT_BUCKETS 20
#define BLKIOMON_FABR_LAT_BUCKETS 25

struct zfcpdd_dstat {
	__u64 time;
	/* Channel latency histogram in n-secs.
	   Step-size is 1000, starting at 0. */
	__u32 chan_lat_hist[BLKIOMON_CHAN_LAT_BUCKETS];
	/* fabric latency histogram in u-secs.
	   Step-size is 8, starting at 0. */
	__u32 fabr_lat_hist[BLKIOMON_FABR_LAT_BUCKETS];
	struct abbrev_stat chan_lat;	/* channel latency in nano-seconds
					   NOTE: often rescaled to micro-seconds
						 later on! */
	struct abbrev_stat fabr_lat;	/* fabric latency in micro-seconds */
	struct abbrev_stat inb;	/* inbound fill size */
	__u64 count;	/* number of samples for abbrev_stats */
	__u32 device;	/* device identifier */
	__u16 outb_max;	/* max used slots in qdio outbound queue */
} __attribute__ ((packed));

void zfcpdd_print_stats(struct zfcpdd_dstat *stat);

void conv_dstat_to_BE(struct zfcpdd_dstat *stat);

void conv_dstat_from_BE(struct zfcpdd_dstat *stat);

void aggregate_dstat(struct zfcpdd_dstat *src,
		     struct zfcpdd_dstat *tgt);

#endif /*ZFCPIOMON_H_*/