---
name: "mmv_inc_value"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mmv_inc"
---

# mmv\_inc\_value(3)

update a value in a Memory Mapped Value file

Part of [mmv\_inc(3)](/mmv_inc/3.md).

## NAME

**mmv\_inc**, **mmv\_inc\_value**, **mmv\_inc\_atomvalue** - update a value in a Memory Mapped Value file

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**\
 **#include \<pcp/mmv\_stats.h\>**

**void mmv\_inc\_value(void \****addr***, pmAtomValue \****av***, double** *inc***);**\
 **void mmv\_inc\_atomvalue(void \****addr***,** **pmAtomValue \****av***,** **pmAtomValue \****inc***);**

**cc ... -lpcp\_mmv -lpcp**

## DESCRIPTION

**mmv\_inc\_value** and **mmv\_inc\_atomvalue** provide convenient ways of updating a metric *av* previously returned by the [**mmv\_lookup\_value\_desc**(3)](/mmv_lookup_value_desc/3.md) interface. *addr* is the address returned from [**mmv\_stats\_init**(3)](/mmv_stats_init/3.md).

These interfaces are most commonly used with counter type metrics. Refer to [**mmv\_set\_value**(3)](/mmv_set_value/3.md) for a mechanism suited to instantaneous and discrete metrics.

With **mmv\_inc\_atomvalue** the value provided via the *inc* pointer must match the type of the metric, and will be added to the previous value of the metric.

In the case of **mmv\_inc\_value** the value of *inc* is internally cast to match the type of the metric and then added to the previous value of the metric.

## SEE ALSO

[**mmv\_set\_value**(3)](/mmv_set_value/3.md), [**mmv\_stats\_init**(3)](/mmv_stats_init/3.md), [**mmv\_lookup\_value\_desc**(3)](/mmv_lookup_value_desc/3.md) and [**mmv**(5)](/mmv/5.md).
