Max responded to this, I'm justing adding a few additional snippets.
On Wed, 10 Jan 2001, Alan Bailey wrote:
> A few simple questions...
>
> - I'm using the following command:
>
> > pmafm Latest pmdumplog -S "@whatever"
>
> This is all fine and good. But say I just want a single metric. This
> doesn't work:
>
> > pmafm Latest pmdumplog -S "@whatever" mem.freemem
> pmdumplog: Cannot open archive "mem.freemem": No such file or directory
>
> Obviously, this is because there is no archive on the command line, and
> mem.freemem is thought to be the archive. Is there a way around this, or
> is this just the way it is?
1. use pmafm list to get the NAME of the archive from the Latest folio
kenj-pc 66% pmafm Latest list
PCP Archive Folio: Latest
Created: on kenj-pc at Sat Feb 3 09:30:13 EST 2001
Creator: mkaf
Ordinal Hostname Archive Basename
[ 1] kenj-pc 20010203.09.30
2. if the pmlogger is still running use pmlc to connect to pmlogger
and flush the output buffers
kenj-pc 67% pmlc
Performance Co-Pilot Logger Control (pmlc), Version 2.1.9
pmlc commands
show loggers [@<host>] display <pid>s of running pmloggers
connect _logger_id [@<host>] connect to designated pmlogger
status information about connected pmlogger
query metric-list show logging state of metrics
new volume start a new log volume
flush flush the log buffers to disk
log { mandatory | advisory } on <interval> _metric-list
log { mandatory | advisory } off _metric-list
log mandatory maybe _metric-list
timezone local|logger|'<timezone>' change reporting timezone
help print this help message
quit exit from pmlc
_logger_id is primary | <pid> | port <n>
_metric-list is _metric-spec | { _metric-spec ... }
_metric-spec is <metric-name> | <metric-name> [ <instance> ... ]
pmlc> connect primary
pmlc> flush
pmlc> quit
Goodbye
3. Check the archive label.
kenj-pc 68% pmdumplog -L 20010203.09.30
Log Label (Log Format Version 2)
Performance metrics from host kenj-pc
commencing Sat Feb 3 09:30:02.076 2001
ending Sat Feb 3 16:35:30.253 2001
Archive timezone: EST-11
PID for pmlogger: 1084
4. Use -S with pmdumplog + archive name + metric
kenj-pc 69% pmdumplog -S "@14:00" 20010203.09.30 kernel.all.load
16:35:30.170 60.2.0 (kernel.all.load): inst [1 or "1 minute"] value
0.050000001
16:35:30.253 60.2.0 (kernel.all.load): inst [1 or "1 minute"] value
0.05000000
But as Max suggested pmdumplog may not be the weapon of choice here
... pmval or even pmie -v may be better.
> - When I run pmlogger_check to start up the pmlogger processes, there is a
> considerable gap between each one starting up. Is this on purpose so that
> the pmlogger processes are staggered and don't eat up the machine at the
> same time? Or is there some other reason...
pmlogger_check starts the pmlogger and then waits until it can connect
to the pmlogger with pmlc ... and the pmlogger needs to read the config
file, contact pmcd, exchange messages about metadata, and generally
muck about ... pmlogger_check is waiting so that it can reliably report
any failures when each pmlogger is started.
Running pmlogger_check with sh -x may give you an idea if this hypothesis
is correct.
> - Is there a way to round the time values in the archives to, say, every
> five minutes, so that 13:42:23.045 would become 13:40? I doubt this,
> because I know the code for any arbitrary rounding time would be
> nontrivial, and this isn't that necessary.
Yep. From man 1 PCPIntro ...
-A align
By default samples are not necessarily aligned on
any natural unit of time. The -A option may be
used to force the initial sample to be aligned on
the boundary of a natural time unit. For example
-A 1sec, -A 30min and -A 1hour specify alignment on
whole seconds, half and whole hours respectively.
The align argument follows the syntax for an inter
val argument described above for the -t option.
Note that alignment occurs by advancing the time as
required, and that -A acts as a modifier to advance
both the start of the time window (see the next
section) and the origin time (if the -O option is
specified).
> - Is pminfo the suggested way to get a single value from an archive at a
> certain time, and pmdumplog the suggested way to get a range of time
> values?
You need -S for this and pminfo does not grok that option. Also
if the metric is a counter, pminfo will _not_ rate convert it.
I would tend to use pmie for both cases ... varying the -T will
control how many values are reported.
|