Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion man/man1/pmseries.1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
\f3pmseries\f1 \- display information about performance metric timeseries
.SH SYNOPSIS
\fBpmseries\fR
[\fB\-adFiIlLmMnqsStvV?\fR]
[\fB\-adFGiIlLmMnNqsStvV?\fR]
[\fB\-c\fR \fIconfig\fR]
[\f3\-D\f1 \f2debug\f1]
[\fB\-g\fR \fIpattern\fR]
Expand Down Expand Up @@ -745,6 +745,36 @@ Connect to the key-value server at
.IR host ,
rather than the one the localhost.
.TP
\fB\-G\fR, \fB\-\-gc\fR
Scan for expired time series and remove their ancillary data from the
key-value cluster.
A series is considered expired when its
.B pcp:values:series:
stream key no longer exists (i.e. the
.B stream.expire
TTL has elapsed without new data being ingested).
The following keys are removed for each expired series:
.B pcp:desc:series:,
.B pcp:metric.name:series:,
.B pcp:instances:series:,
.B pcp:labelvalue:series:,
and
.B pcp:labelflags:series:.
The series identifier is also removed from the forward-lookup sets
.B pcp:series:metric.name:,
.B pcp:series:inst.name:,
.B pcp:series:label.<name>.value:,
and
.B pcp:series:context.name:.
Orphaned
.B pcp:inst:series:
hashes are cleaned up when their associated instance-name set becomes empty.
.TP
\fB\-N\fR, \fB\-\-dryrun\fR
Used with
.BR \-\-gc :
log which series would be removed without actually deleting anything.
.TP
\fB\-L\fR, \fB\-\-load\fR
Load timeseries metadata and data into the key-value cluster.
.TP
Expand Down
2 changes: 1 addition & 1 deletion src/bashrc/pcp_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ _pcp_complete()
arg_regex="-[ahKcoFeDASTOstZiJ489N6XWwP0lEfqbyQBY]"
;;
pmseries)
all_args="acdDFghiIlLmMnqpsStvVwZ"
all_args="acdDFgGhiIlLmMnNqpsStvVwZ"
arg_regex="-[cDghpwZ]"
;;
pmstat)
Expand Down
2 changes: 2 additions & 0 deletions src/include/pcp/pmwebapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ typedef enum pmSeriesFlags {
PM_SERIES_FLAG_METADATA = (1 << 0), /* only load metric metadata */
PM_SERIES_FLAG_ACTIVE = (1 << 1), /* continual source updates */
PM_SERIES_FLAG_TEXT = (1 << 2), /* load metric & indom help */
PM_SERIES_FLAG_DRYRUN = (1 << 3), /* GC: log what would be removed, no writes */
PM_SERIES_FLAG_ALL = ((unsigned int)~PM_SERIES_FLAG_NONE)
} pmSeriesFlags;

Expand Down Expand Up @@ -169,6 +170,7 @@ extern int pmSeriesValues(pmSeriesSettings *, pmSeriesTimeWindow *, int, sds *,
extern int pmSeriesWindow(pmSeriesSettings *, sds, pmSeriesTimeWindow *, void *);
extern int pmSeriesQuery(pmSeriesSettings *, sds, pmSeriesFlags, void *);
extern int pmSeriesLoad(pmSeriesSettings *, sds, pmSeriesFlags, void *);
extern int pmSeriesGC(pmSeriesSettings *, pmSeriesFlags, void *);

/*
* Timer list interface - global, thread-safe
Expand Down
1 change: 1 addition & 0 deletions src/libpcp_web/src/batons.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ typedef enum {
MAGIC_NAMES,
MAGIC_LABELMAP,
MAGIC_SEARCH,
MAGIC_GC,

MAGIC_COUNT
} series_baton_magic;
Expand Down
5 changes: 5 additions & 0 deletions src/libpcp_web/src/exports.in
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,8 @@ PCP_WEB_1.23 {
dictSetVal;
keySlotsContextFree;
} PCP_WEB_1.22;

PCP_WEB_1.24 {
global:
pmSeriesGC;
} PCP_WEB_1.23;
Loading
Loading