Skip to content

Instantly share code, notes, and snippets.

#define _GNU_SOURCE 1
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
enum test_type {
IOC_VERSION = 1,
IOC_FLAGS,
#!/bin/bash
# Variable settings
Digit_2=0.005
Digit_1=0.05
atexit() {
[[ -n ${tmpfile-} ]] && rm -f "${tmpfile}"
}

Device Mapper Statistics for PCP

Abstract

Performance Co-Pilot (PCP) is a system performance and analysis framework. It has an agent-based architecture, which has many kinds of agents called PMDAs, Performance Metric Domain Agents are responsible for collecting performance metrics. Each agent reports the collected metrics to a daemon, called the PMCD, Performance Metric Collection Daemon. We can see the collect values with PCP's set of client tools, pmval, pminfo, pmrep, etc.
Device-Mapper is the Linux kernel framework for mapping physical block devices onto higher-level virtual block devices. It realizes software RAIDS, IO multipath, cache volumes, thin provisioning and snapshots.
To investigate Device-Mapper devices behavior, we sometimes need more flexible statistics data than traditional iostat data. To make life easier for users who would like to use the PCP tools for their performance measurements and monitoring, We will create a new PCP PMDA that pr