pcp
[Top] [All Lists]

Re: PCP - pmlogger command

To: Sai p Seshasayee <sseshas@xxxxxxxxxx>
Subject: Re: PCP - pmlogger command
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 30 Aug 2008 07:19:21 +1000
Cc: Nathan Scott <nscott@xxxxxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: <OFCBA7C193.0CED371F-ON852574B4.005F8713-852574B4.00601CE7@us.ibm.com>
References: <OFCBA7C193.0CED371F-ON852574B4.005F8713-852574B4.00601CE7@us.ibm.com>
Reply-to: kenj@xxxxxxxxxxxxxxxx
Sender: pcp-bounce@xxxxxxxxxxx
Sai,

You're trying to start the primary logger here.  What is the name of the
host pmlogger is running on?

If it xcat20mn then your pmlogger control file is OK, but there is a
problem with pmcd on this host ... please send output from
        $ pcp
        $ pcp -h xcat20mn
        $ cat /var/log/pcp/pmcd/pmcd.log

If it not, then you need to amend your control file ... change the first
y to n and then run (and send the output from)

        # /usr/lib/pcp/bin/pmlogger_check -V

Also (since I suspect you may be trying to start more than one pmlogger
for the same host), it would help to see output from
1. ps -ef | grep pmlogger
2. pminfo -f pmcd.pmlogger
3. and all your pmlogger control file

On Fri, 2008-08-29 at 13:29 -0400, Sai p Seshasayee wrote:
> 
> 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>