Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pmiPutLabel    ( 3 )

добавить метки в выходной архив (add labels to the output archive)

   Дубль

(статьи: pmiputlabel - добавить метки в выходной архив )

Имя (Name)

pmiPutLabel - add labels to the output archive


Синопсис C (C Synopsis)

#include <pcp/pmapi.h> #include <pcp/import.h>

int pmiPutLabel(unsigned int type, unsigned int id, unsigned int instance, const char *name, const char *value)

cc ... -lpcp_import -lpcp


Синопсис PERL (PERL synopsis)

use PCP::LogImport;

pmiPutLabel($type, $id, $instance, $name, $value);


Описание (Description)

As part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)), pmiPutLabel adds a label for the global context or for a given domain, cluster, item, instance domain or instance.

The type must be one of PM_LABEL_CONTEXT, PM_LABEL_DOMAIN, PM_LABEL_CLUSTER, PM_LABEL_ITEM, PM_LABEL_INDOM, or PM_LABEL_INSTANCES.

If type is PM_LABEL_CONTEXT, then id and instance are ignored. Otherwise, id should match a domain, cluster, metric or instance domain defined earlier in a call to pmiAddMetric(3).

If type is PM_LABEL_INSTANCES, then instance should match an instance number of the selected domain. Otherwise instance is ignored.

name is a string containing the name of the label to be added.

value is a string containing the value of the label to be added.

No data will be written until pmiWrite(3) is called, so multiple calls to pmiPutLabel are typically used to accumulate several labels before calling pmiWrite(3).


Диагностика (Diagnostic)

pmiPutLabel returns zero on success else a negative value that can be turned into an error message by calling pmiErrStr(3).


Смотри также (See also)

LOGIMPORT(3), pmiAddInstance(3), pmiAddMetric(3), pmiErrStr(3), pmiPutResult(3), pmiPutValue(3), pmiPutValueHandle(3), pmiPutText(3) and pmiWrite(3).