pmTrimNameSpace - prune a performance metrics name space
#include <pcp/pmapi.h> int pmTrimNameSpace(void); cc ... -lpcp
In some (rare) cases it is helpful to prune the Performance Metrics
Name Space (PMNS) to match the available metrics.
The default PMNS that is accessible to a Performance Metrics
Application Programming Interface (PMAPI) client is provided by the
current PMAPI context:
* for a PMAPI context of type PM_CONTEXT_HOST the PMNS is provided by
pmcd(1) on the associated host and no pruning is required
* for a PMAPI context of type PM_CONTEXT_ARCHIVE the PMNS is stored
within the associated Performance Co-Pilot (PCP) archive log and no
pruning is required
* for a PMAPI context of type PM_CONTEXT_LOCAL at the first PMAPI call
requiring access to the PMNS it is loaded from the default local
location $PCP_VAR_DIR/pmns/root (or $PMNS_DEFAULT) and no pruning is
required.
If the default PMNS is in effect then calling pmTrimNameSpace is a no-
op and returns zero with no change to the PMNS.
PMAPI clients also have the option of over-riding the default PMNS by
loading a local PMNS from a file (see pmns(5) for the format) by
calling pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) and this is when
some PMNS pruning may be useful.
If a local PMNS is in effect when pmTrimNameSpace is called then the
first action is to restore the PMNS to the state as of the completion
of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), so that the
effects of consecutive calls to pmTrimNameSpace are not additive.
The subsequent actions of pmTrimNameSpace depend on the type of the
current PMAPI context.
* For a context of type PM_CONTEXT_ARCHIVE the local PMNS is trimmed
to exclude metrics for which no description can be found in the PCP
archive log. The PMNS is further trimmed to remove empty subtrees
that do not contain any performance metric. Since PCP archives
usually contain some subset of all metrics named in a PMNS,
pmTrimNameSpace effectively prunes the application's PMNS to contain
only the names of the metrics in the archive.
* For a context of type PM_CONTEXT_HOST or PM_CONTEXT_LOCAL no further
action is required.
On success, pmTrimNameSpace returns zero.
pmlogger(1), PMAPI(3), pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmNewContext(3) and pmns(5).
PM_ERR_NOPMNS
there has been some earlier problem with establishing the
relevant PMNS
PM_ERR_NOCONTEXT
the current PMAPI context is invalid
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.