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

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



   pmgetopt_r    ( 3 )

обработка командной строки для инструментов PMAPI (command line handling for PMAPI tools)

  Name  |  C synopsis  |  Description  |  Flags values  |    Options via environment variables    |  Return value  |  Pcp environment  |  See also  |

Параметры с помощью переменных окружающей среды (Options via environment variables)

Some environment variables may be used as an alternative to the command line options. The use of these mechanisms is primarily for internal use by PCP tools. General users should choose the command line options as this provides a clearer indication of intent, makes debugging issues easier and avoids confusion over possible conflicts between the command line options and the environment variables (where the command line options usually ``win'').

The following table describes the environment variables that may be used to set values as an alternative to command line options.

┌──────────────────┬───────┬─────────────────┬───────────────────┐ │ Environment │Short │ Long │ Meaning │ │ │Option │ Option │ │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_ALIGN_TIME -A --align │align sample │ │ │ │ │times on │ │ │ │ │natural │ │ │ │ │boundaries │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_ARCHIVE -a --archive │metrics source │ │ │ │ │is a PCP │ │ │ │ │archive │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_ARCHIVE_LIST │ │ --archive-list │comma- │ │ │ │ │separated list │ │ │ │ │of metric │ │ │ │ │source │ │ │ │ │archives │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_FOLIO │ │ --archive-folio │metric source │ │ │ │ │is a mkaf(1) │ │ │ │ │archives folio │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_DEBUG -D --debug │a comma- │ │ │ │ │separated list │ │ │ │ │of │ │ │ │ │pmSetDebug(3) │ │ │ │ │debugging │ │ │ │ │options │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_GUIMODE -g --guimode │start in GUI │ │ │ │ │mode with new │ │ │ │ │pmtime(1) time │ │ │ │ │control │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_HOST -h --host │metrics source │ │ │ │ │is pmcd(1) on │ │ │ │ │a host │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_HOST_LIST │ │ --host-list │comma- │ │ │ │ │separated list │ │ │ │ │of metric │ │ │ │ │source hosts │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_SPECLOCAL -K --spec-local │optional │ │ │ │ │additional DSO │ │ │ │ │PMDA │ │ │ │ │specification │ │ │ │ │for local │ │ │ │ │connection, │ │ │ │ │see │ │ │ │ │pmSpecLocalPMDA(3) │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_LOCALPMDA or │-L --local-PMDA │metrics source is │ │$PCP_LOCALMODE │ │ │local connection │ │ │ │ │to a DSO PMDA │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_NAMESPACE -n --namespace │use an alternative │ │ │ │ │Performance │ │ │ │ │Metrics Name Space │ │ │ │ │(PMNS) │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_UNIQNAMES -N --uniqnames │like -n but only │ │ │ │ │one name allowed │ │ │ │ │for each metric in │ │ │ │ │the PMNS │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_ORIGIN or │-O --origin │initial sample │ │$ORIGIN_TIME │ │ │time within the │ │ │ │ │time window │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_GUIPORT -p --guiport │port for │ │ │ │ │connection to an │ │ │ │ │existing pmtime(1) │ │ │ │ │time control │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_START_TIME -S --start │start of the time │ │ │ │ │window │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_SAMPLES -s --samples │terminate after │ │ │ │ │this many samples │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_FINISH_TIME -T --finish │end of the time │ │ │ │ │window │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_INTERVAL -t --interval │sampling interval │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_TIMEZONE -Z --timezone │set reporting │ │ │ │ │timezone │ ├──────────────────┼───────┼─────────────────┼───────────────────┤ │$PCP_HOSTZONE -z --hostzone │set reporting │ │ │ │ │timezone to local │ │ │ │ │time of metrics │ │ │ │ │source │ └──────────────────┴───────┴─────────────────┴───────────────────┘