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

# pmaSameInDom(3)

check if two observations of an instance domain are the same\`

## NAME

**pmaSameInDom** - check if two observations of an instance domain are the same\`

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**\
 **#include \<pcp/libpcp.h\>**\
 **#include \<pcp/archive.h\>**

**int pmaSameInDom(\_\_pmLogInDom \****old***, \_\_pmLogInDom \****new***);**

**cc ... -lpcp\_archive -lpcp**

## CAVEAT

This documentation is intended for internal Performance Co-Pilot (PCP) developer use.

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics at some point in the future.

## DESCRIPTION

Checks two observations of the same instance domain are identical. The code assumes (a) *old*-\>*indom* == *new*-\>*indom* and (b) both the instance domains are sorted in ascending internal instance identifier sequence; see [**pmaSortInDom**(3)](/pmaSortInDom/3.md) to see how to make the second condition true.

**pmaSameInDom** returns 1 if they are the same, returns 0 otherwise.

The instance domains are considered different if any of the following hold:

- 1\.

  *old*-\>*numinst* != *new*-\>*numinst*

- 2\.

  For some i, *old*-\>*instlist*\[*i*\] *!=* new*-\>*instlist*\[*i*\]*

- 3\.

  For some i, the strings pointed to by *old*-\>*namelist*\[*i*\] and *new*-\>*instlist*\[*i*\] are not identical

For Version 3 archives with "delta indom" support, it is more likely that [**pmaDeltaInDom**(3)](/pmaDeltaInDom/3.md) is more useful than **pmaSameInDom**, as the former combines the check for two observations of an instance domain being the same with the optional creation of the "delta indom" format if that is the most efficient encoding.

## SEE ALSO

[**pmaDeltaInDom**(3)](/pmaDeltaInDom/3.md), [**PMAPI**(3)](/PMAPI/3.md) and [**pmaSortInDom**(3)](/pmaSortInDom/3.md).
