mmv_inc_value(3) — Linux manual page


MMV_INC_VALUE(3)        Library Functions Manual        MMV_INC_VALUE(3)

NAME         top

       mmv_inc, mmv_inc_value, mmv_inc_atomvalue - update a value in a
       Memory Mapped Value file

C SYNOPSIS         top

       #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

       cc ... -lpcp_mmv -lpcp

DESCRIPTION         top

       mmv_inc_value and mmv_inc_atomvalue provide convenient ways of
       updating a metric av previously returned by the
       mmv_lookup_value_desc(3) interface.  addr is the address returned
       from mmv_stats_init(3).

       These interfaces are most commonly used with counter type
       metrics.  Refer to mmv_set_value(3) 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         top

       mmv_set_value(3), mmv_stats_init(3), mmv_lookup_value_desc(3) and

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨⟩.  If you have a bug report for this manual
       page, send it to  This page was obtained from the
       project's upstream Git repository
       ⟨⟩ on 2023-12-22.
       (At that time, the date of the most recent commit that was found
       in the repository was 2023-12-16.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to

Performance Co-Pilot                                    MMV_INC_VALUE(3)

Pages that refer to this page: mmv_lookup_value_desc(3)mmv_set_value(3)mmv_stats_init(3)mmv_stats_registry(3)