PMFETCHARCHIVE(3) Library Functions Manual PMFETCHARCHIVE(3)NAME
pmFetchArchive - get performance metrics directly from an archive log
C SYNOPSIS
#include <pcp/pmapi.h>
int pmFetchArchive(pmResult **result);
cc ... -lpcp
DESCRIPTION
pmFetchArchive is a variant of pmFetch(3) that may only be used when the current Performance Metrics Application Programming Interface
(PMAPI) context is associated with an archive log.
The result is instantiated with all of the metrics (and instances) from the next archive record, consequently there is no notion of a list
of desired metrics, and the instance profile of the PMAPI context is ignored.
It is expected that pmFetchArchive would be used to create utilities that scan archive logs, while the more common access to the archives
would be via the pmFetch(3) interface.
To skip records within the archive log, use pmSetMode(3) to change the collection time within the current PMAPI context, then call
pmFetchArchive.
Note that the result returned by pmFetchArchive is dynamically allocated, and must be released using pmFreeResult(3), not free(3C). See
pmFetch(3) and pmFreeResult(3) for further details.
pmFetchArchive returns zero on success.
SEE ALSO PMAPI(3), pmFetch(3), pmFreeResult(3), pmNewContext(3), pmSetMode(3) and pmTrimNameSpace(3).
DIAGNOSTICS
PM_ERR_NOTARCHIVE
the current PMAPI context is not associated with an archive log
Performance Co-Pilot PCP PMFETCHARCHIVE(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)
Hi all.
I am not a DBA. But I do have responsibility for making sure the archive logs dont fill up and cause the database. This happend the other day while I was absent (sick) and I got a good ticking off for it.
Needless to say I dont want this happen!
Could anyone lend a hand to a... (8 Replies)
Hello how are you, i have a question i have a file ale.log and i want to agregate a title and later a space when the text is over and put another title (when the text is over) how can i do this? thank you
Example
Last ------>(Title) i want to agregate
pupu pupu pupu pupu... (1 Reply)
HI frnds
I have one flat with data and am loading the data into oracle table. While loading , rejected records are captured in log file. Now I want to read the log file and get the all rejected records and the reason for the rejection.
I developed the script . its finding 5000 rejected... (7 Replies)
Hi,
I have a strange situation here, I want to archive gc.logs file, generated by a java application, the strange thing about gc.log file is is doesn't have any time/date stamp appended to it unlike other logs (catalina/access/error) and one more strange thing is when ever the application is... (6 Replies)
Plese help I need a urgent requirement.
Ex: test.log
requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb
and then in the archive folder log files are name to test.tar
test1.tar
test2.tar
EX:
/home/abc/
test.log ... (1 Reply)
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)
Hi,
I am trying to move old file to archive folder.
find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \;
The above command not only search for old file in /sourcedirectory/logs/ folder but also searchs in /sourcedirectory/logs/archive ( what... (3 Replies)
I am required to create a CSV file reading last 200000 lines form a log file. I have to grep 3 parameters from this log file and write these parameters in the .csv file, with time stamp. This script will be setup in a cron job which will run every 10 minutes. I have written the script but it is... (5 Replies)
Requirement:
Under fuse application we have placeholders called containers;
Every container has their logs under:
<container1>/data/log/fuse.log
<container1>/data/log/fuse.log.1
<container1>/data/log/fuse.log.XX
<container2>/data/log/fuse.log... (6 Replies)