PMUSECONTEXT(3) Library Functions Manual PMUSECONTEXT(3)NAME
pmUseContext - change current PMAPI context
C SYNOPSIS
#include <pcp/pmapi.h>
int pmUseContext(int handle);
cc ... -lpcp
DESCRIPTION
An application using the Performance Metrics Application Programming Interface (PMAPI) may manipulate several concurrent contexts, each
associated with a source of performance metrics, e.g. pmcd(1) on some host, or an archive log of performance metrics as created by pmlog-
ger(1).
Calling pmUseContext causes the current PMAPI context to be set to the context identified by handle. The value of handle must be one
returned from an earlier call to pmNewContext(3) or pmDupContext(3).
Below the PMAPI, all contexts used by an application are saved in their most recently modified state, so pmUseContext restores the context
to the state it was in the last time the context was used, not the state of the context when it was established.
SEE ALSO PMAPI(3), pmDestroyContext(3), pmDupContext(3), pmNewContext(3) and pmWhichContext(3).
DIAGNOSTICS
PM_ERR_NOCONTEXT
handle does not identify a valid PMAPI context
Performance Co-Pilot PCP PMUSECONTEXT(3)
Check Out this Related Man Page
PMTRIMNAMESPACE(3) Library Functions Manual PMTRIMNAMESPACE(3)NAME
pmTrimNameSpace - prune a performance metrics name space
C SYNOPSIS
#include <pcp/pmapi.h>
int pmTrimNameSpace(void);
cc ... -lpcp
DESCRIPTION
If the current Performance Metrics Application Programming Interface (PMAPI) context corresponds to a version 1 archive log of Performance
Co-Pilot (PCP) performance metrics (as collected by pmlogger(1) -V1), then the currently loaded Performance Metrics Name Space (PMNS), is
trimmed to exclude metrics for which no description can be found in the archive. 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 the default PMNS, pmTrimNameSpace effectively trims the applica-
tion's PMNS to contain only the names of the metrics in the archive.
Since PCP 2.0, pmTrimNameSpace is only needed for dealing with version 1 archives. Version 2 archives actually store the "trimmed" PMNS.
Prior to any trimming, the PMNS is restored to the state as of the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), so
the effects of consecutive calls to pmTrimNameSpace with archive contexts are not additive.
If the current PMAPI context corresponds to a host and a pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) call was made, then the PMNS reverts
to all names loaded into the PMNS at the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), i.e. any trimming is undone.
On success, pmTrimNameSpace returns zero.
SEE ALSO pmlogger(1), PMAPI(3), pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmNewContext(3) and pmns(5).
DIAGNOSTICS
PM_ERR_NOPMNS
you must have loaded a PMNS using pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) before calling pmTrimNameSpace
PM_ERR_NOCONTEXT
the current PMAPI context is invalid
Performance Co-Pilot PCP PMTRIMNAMESPACE(3)
Man Page
7 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
can you please let me know will there be any performance improvement
if i change my command in unix from
ls rtlog* | grep "rtlog_*4_"
to
ls rtlog_4_* rtlog_0004_*
assuming that i have patterns only as 4 or 0004 and not other pattern type. (2 Replies)
I'm doing performance testing for one application which works on AIX.
But I don't know which performance parameters of memory need to be collected. Now, I just know very few:
1. page in
2. page out
3. fre
They are all collected by "vmstat" command.
I want to know, except for above... (2 Replies)
I am looking for a way to measure performance metrics of streaming audio/video from a contecnt server, e.g. YouTube for example. Im keen to see if I can look at duration it took for contecnt to download.
I know from the output of wget's log file you can see duration a url is downloaded in.... (5 Replies)
Hi,
I recently upgraded from RH 6.2 to RH 6.4 on our diameter application server. After the upgrade, we saw the performance throughput of out diameter application went down about 40%. From 459K transaction per second to 234K TPS on RH 6.4. Nothing has changed in the network. I am using HP... (3 Replies)
Hi Guys,
I need some help analyzing the attached metrics. System context is 2 LPAR's in a P795 running WebSphere App Server across 4 nodes (2 on each LPAR).
Over the weekend both LPAR's lost power and upon re-start the application server response times have degraded by 25-30% for no obvious... (1 Reply)
Have a question about doing some performance monitoring - how to approach it.
This is on RHEL 7.4
We are moving a rather large application to new hardware in the future. I would like to find a way to compared performance on the new hardware at different stages and at different times.
I'm... (4 Replies)