Answers in situ below.
On Tue, 2008-09-02 at 20:28 -0400, Sai p Seshasayee wrote:
>
> Ken/Nathan,
>
> I want the pmlogger to work only for 1 min (because I am planning to
> set that as a cron job and schedule it) and hence I want to use
> "-T1min".
> Regarding the removal of the archiving name, Ken, you are spot on: I
> removed the "sai_logger" archive name and this time I did not get any
> errors!
Good.
> I was able to see the process running and it was generating a file
> named "20080902.20.17". But here is where the problem comes again : I
> did a search for the file "20080902.20.17" but I was not able to find
> it. Where will the archive be stored and how can I replay it using
> "kmchart -a " command?
Each PCP archive is at least 3 physical files, so in your case above
20080902.20.17.0 and 20080902.20.17.meta and 20080902.20.17.index.
Assuming you're using the same control file as in the prevuous mail,
these will be in the directory $PCP_LOG_DIR/pmlogger/xcat20mn ... where
$PCP_LOG_DIR is set in /etc/pcp.conf. For me, this is as follows:
kenj@bozo:~$ grep PCP_LOG_DIR /etc/pcp.conf
PCP_LOG_DIR=/var/log/pcp
To replay,
$ kmchart -a /var/log/pcp/pmlogger/xcat20mn/20080902.20.17
the -a argument accepts any of the physical file names, or the basename
for the archive (as I've used in the example above).
> I am also planning to use "pmstat" command on multiple hosts to
> capture some information and store it in a database. The o/p comes
> like this:
>
> [root@xcat20mn xCAT_monitoring]# pmstat -h cu03sv -hxcat20mn -s1 -t0.1
> @ Tue Sep 2 16:26:18 2008
> node loadavg memory swap io system
> cpu
> 1 min swpd buff cache pi po bi bo in cs us sy
> id
> cu03sv 0.00 0 79068 987m 0 0 0 0 199 199 0 0
> 100
> xcat20m 0.04 0 1717m 3000m 0 0 0 0 1109 309 0 0
> 100
>
> But I want the heading to suppressed i.e the o/p should only be:
>
> cu03sv 0.00 0 79068 987m 0 0 0 0 199 199 0 0
> 100
> xcat20m 0.04 0 1717m 3000m 0 0 0 0 1109 309 0 0
> 100
There is no command line option to suppress the heading, which will
repeat after min(21, windowsize - 3) lines of output ... sed(1) is your
new friend here.
> I also want it to appear with a delimiter. Is it possible ? You have
> been very helpful and I trust this question should be a piece of cake
> for you !
Fields are separated by at least one space, so post-processing with
sed(1) will get you delimeters of choice very easily. Note the values
are scaled with postfix 2^10 scales of "m" (as above) and "g" and also
decimal scales K (1000) and M (1000000), so whatever you're doing with
the values is probably going to involve post-processing ... or scratch
the itch and generate a patch to produce the spartan output format you
desire.
|