pcp
[Top] [All Lists]

Re: PCP - pmlogger command

To: nscott@xxxxxxxxxx
Subject: Re: PCP - pmlogger command
From: Sai p Seshasayee <sseshas@xxxxxxxxxx>
Date: Fri, 29 Aug 2008 13:38:54 -0400
Cc: pcp@xxxxxxxxxxx, pcp-bounce@xxxxxxxxxxx
In-reply-to: <OFCBA7C193.0CED371F-ON852574B4.005F8713-852574B4.00601CE7@xxxxxxxxxx>
Sender: pcp-bounce@xxxxxxxxxxx

Hi Nathan,

It was getting renamed as "pmlogger.log.prior". Apologies for the typo.

Thanks and Regards
Sai Prakash
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
External: 845-435-4720
email: sseshas@xxxxxxxxxx
Notes: Sai p Seshasayee/Poughkeepsie/IBM

"Always speak the truth, that way you dont need to remember what you said  !"



Sai p Seshasayee/Poughkeepsie/IBM@IBMUS
Sent by: pcp-bounce@xxxxxxxxxxx

08/29/2008 01:29 PM

To
Nathan Scott <nscott@xxxxxxxxxx>
cc
pcp@xxxxxxxxxxx
Subject
Re: PCP -  pmlogger command






Hi Nathan,


I set up the pmlogger as a daemon by making the following entry in the "/var/lib/pcp/config/pmlogger/control" file:


xcat20mn y n PCP_LOG_DIR/pmlogger/xcat20mn -cconfig.base -T1min sai_logger


When I restarted the pcp start scripts, I was able to see the "pmlogger_check script" running correctly. However, it was not archiving the files and I got the following error in my "mail" file:


Subject: pmlogger_check failed in /etc/init.d/pcp


Restarting primary pmlogger for host "xcat20mn" ... timed out waiting!

       Usage: pmlogger [options] archive


       Options:

         -c configfile file to load configuration from

         -h host     metrics source is PMCD on host

         -l logfile  redirect diagnostics and trace output

         -L          linger, even if not primary logger instance and nothing to log

         -n pmnsfile   use an alternative PMNS

         -P          execute as primary logger instance

         -r          report record sizes and archive growth rate

         -s endsize  terminate after endsize has been accumulated

         -t interval   default logging interval [default 60.0 seconds]

         -T endtime  terminate at given time

         -u          output is unbuffered

         -v volsize  switch log volumes after volsize has been accumulated

         -V version    generate version 1 or 2 archives (default is 2)

         -x fd       control file descriptor for application launching pmlogger

                     via pmRecordControl(3)

pmlogger_check: Error: cannot find pmlogger output file at "pmlogger.log"

Directory (/var/log/pcp/pmlogger/xcat20mn) contents:

total 8

drwxr-xr-x 2 root root 4096 Aug 29 12:00 .

drwxr-xr-x 3 root root 4096 Aug 18 10:40 ..

---------- 1 root root    0 Aug 29 12:00 lock

-rw-r--r-- 1 root root    0 Aug 29 11:59 pmlogger.log.prior

pmlogger_check: Error: archive file 20080829.12.00.0 missing

Directory (/var/log/pcp/pmlogger/xcat20mn) contents:

total 8

drwxr-xr-x 2 root root 4096 Aug 29 12:00 .

drwxr-xr-x 3 root root 4096 Aug 18 10:40 ..

---------- 1 root root    0 Aug 29 12:00 lock

-rw-r--r-- 1 root root    0 Aug 29 11:59 pmlogger.log.prior


I tried various combinations in the pmlogger's "control" file entry. I also created a "pmlogger.log" under  "/var/log/pcp/pmlogger/xcat20mn" but I found that when the daemon finished running, the "pmlogger.log" file was getting renamed as "pmlogger.log" and gave the above mentioned output. Any ideas??



Thanks and Regards
Sai Prakash
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
External: 845-435-4720
email: sseshas@xxxxxxxxxx
Notes: Sai p Seshasayee/Poughkeepsie/IBM

"Always speak the truth, that way you dont need to remember what you said  !"


Nathan Scott <nscott@xxxxxxxxxx>

08/28/2008 07:32 PM


To
Sai p Seshasayee/Poughkeepsie/IBM@IBMUS
cc
pcp@xxxxxxxxxxx
Subject
Re: PCP -  pmlogger command







Hi Sai,

(please keep CCing the list - theres lots of interested people there
who can also help, and we all learn from each other that way).

On Thu, 2008-08-28 at 09:42 -0400, Sai p Seshasayee wrote:
>
> Hi Nathan,
>
> Thanks again for your inputs. I was reading the man pages for the
> "pmlogger" command and it looks like an exciting option for us to
> store archives. We are using Red Had Enterprise Linux 5 and when I
> used the "pmlogger" command , the command did not work and I got:
>
> [root@xcat20mn ~]# pmlogger
> -bash: pmlogger: command not found
>
> Does pmlogger command work on Linux or is it deprecated like the
> "pmkstat" command or is it an Irix specific command? (I also read the
> PCPIntro man page and there is no reference of pmlogger being
> deprecated). Please let me know if there is an alternate command.  
>

It isn't deprecated it, no.  pmkstat may be the only deprecated tool
in the current PCP release, I think.  If you use the updated PCP rpm
that I make available (http://oss.sgi.com/~nathans/pcp/rpm/) it is
in fact removed - these rpms are development snapshots of pending code
for the next "official" SGI PCP release.  They include alot of fixes
and alot of new features - and they are quite stable (I use them on
all of our production machines here).

On Redhat, pmlogger lives in /usr/share/pcp/bin, rpm can find it via:

$ rpm -ql pcp | grep pmlogger

It lives in this slightly odd place ($PCP_BINADM_DIR from /etc/pcp.conf)
because it is not often invoked directly, but rather is usually run via
the PCP start scripts (/etc/init.d/pcp) which are run at system bootup.
See the pmlogger_check(1) man page for details on setting pmlogger up as
a daemon.

cheers.

--
Nathan


<Prev in Thread] Current Thread [Next in Thread>