Discussion:
PCP - pmlogger command
Nathan Scott
2008-08-28 23:32:08 UTC
Permalink
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).
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
-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
Sai p Seshasayee
2008-08-29 17:29:49 UTC
Permalink
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: ***@us.ibm.com
Notes: Sai p Seshasayee/Poughkeepsie/IBM

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



Nathan Scott <***@aconex.com>
08/28/2008 07:32 PM

To
Sai p Seshasayee/Poughkeepsie/***@IBMUS
cc
***@oss.sgi.com
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).
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
-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
Sai p Seshasayee
2008-08-29 17:38:54 UTC
Permalink
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: ***@us.ibm.com
Notes: Sai p Seshasayee/Poughkeepsie/IBM

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



Sai p Seshasayee/Poughkeepsie/***@IBMUS
Sent by: pcp-***@oss.sgi.com
08/29/2008 01:29 PM

To
Nathan Scott <***@aconex.com>
cc
***@oss.sgi.com
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: ***@us.ibm.com
Notes: Sai p Seshasayee/Poughkeepsie/IBM

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


Nathan Scott <***@aconex.com>
08/28/2008 07:32 PM


To
Sai p Seshasayee/Poughkeepsie/***@IBMUS
cc
***@oss.sgi.com
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).
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
-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
Ken McDonell
2008-08-29 21:19:21 UTC
Permalink
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
Hi Nathan,
I set up the pmlogger as a daemon by making the following entry in the
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
Subject: pmlogger_check failed in /etc/init.d/pcp
Restarting primary pmlogger for host "xcat20mn" ... timed out
waiting!
Usage: pmlogger [options] archive
-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"
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
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
Notes: Sai p Seshasayee/Poughkeepsie/IBM
"Always speak the truth, that way you dont need to remember what you
said !"
08/28/2008 07:32 PM
To
Sai p
cc
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).
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
-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).
$ 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
Sai p Seshasayee
2008-09-02 13:15:33 UTC
Permalink
Hi Ken,

Thanks for your inputs. My host is "xcat20mn". I have only 1 entry in the
"/var/lib/pcp/config/pmlogger/control" file but an interesting thing is
that I have 2 pmlogger process running (I don't know how). I am sending
all the files and o/p you have asked for, including the control file
attached herewith.

[***@xcat20mn ~]# pcp
Performance Co-Pilot configuration on xcat20mn.clusters.com:
platform: Linux xcat20mn 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007
x86_64 ia32
hardware: 8 cpus, 2 disks, 6035MB RAM
timezone: EDT+4
licenses: none
pmcd: Version 2.7.4-20080507, 5 agents
pmda: pmcd trace linux apache mounts
[***@xcat20mn ~]#




[***@xcat20mn ~]# pcp -h xcat20mn
Performance Co-Pilot configuration on xcat20mn:
platform: Linux xcat20mn 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007
x86_64 ia32
hardware: 8 cpus, 2 disks, 6035MB RAM
timezone: EDT+4
licenses: none
pmcd: Version 2.7.4-20080507, 5 agents
pmda: pmcd trace linux apache mounts



[***@xcat20mn ~]# cat /var/log/pcp/pmcd/pmcd.log
Log for pmcd on xcat20mn started Tue Sep 2 09:00:23 2008
active agent dom pid in out ver protocol parameters
============ === ===== === === === ======== ==========
pmcd 2 2 dso i:2
lib=/var/lib/pcp/pmdas/pmcd/pmda_pmcd.so entry=pmcd_init [0xf7ffa1c4]
linux 60 2 dso i:3
lib=/var/lib/pcp/pmdas/linux/pmda_linux.so entry=linux_init [0xf7fb78eb]
apache 68 31892 10 11 2 bin pipe
cmd=/var/lib/pcp/pmdas/apache/pmdaapache -d 68
mounts 72 31893 12 13 2 bin pipe
cmd=/var/lib/pcp/pmdas/mounts/pmdamounts -d 72
trace 10 31894 14 15 2 bin pipe
cmd=/var/lib/pcp/pmdas/trace/pmdatrace -d 10

Host access list empty: access control turned off

pmcd: PID = 31876, PDU version = 2, pcpcol license
pmcd request port(s):
sts fd port IP addr
=== === ===== ==========
ok 0 44321 0x00000000 INADDR_ANY
ok 3 4321 0x00000000 INADDR_ANY




[***@xcat20mn ~]# ps -ef | grep pmlogger
root 713 25144 0 09:01 pts/11 00:00:00 grep pmlogger
root 31895 31883 0 09:00 pts/11 00:00:00 /bin/sh
/usr/share/pcp/bin/pmlogger_check
root 31913 31895 0 09:00 pts/11 00:00:00 /bin/sh
/usr/share/pcp/bin/pmlogger_check



[***@xcat20mn ~]# pminfo -f pmcd.pmlogger
pmcd.pmlogger.host
No value(s) available!

pmcd.pmlogger.port
No value(s) available!

pmcd.pmlogger.archive
No value(s) available!

pmcd.pmlogger.pmcd_host
No value(s) available!


Thanks and Regards
Sai Prakash
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
External: 845-435-4720
email: ***@us.ibm.com
Notes: Sai p Seshasayee/Poughkeepsie/IBM

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



Ken McDonell <***@internode.on.net>
Sent by: pcp-***@oss.sgi.com
08/29/2008 05:19 PM
Please respond to
***@internode.on.net


To
Sai p Seshasayee/Poughkeepsie/***@IBMUS
cc
Nathan Scott <***@aconex.com>, ***@oss.sgi.com
Subject
Re: PCP - pmlogger command






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
Hi Nathan,
I set up the pmlogger as a daemon by making the following entry in the
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
Subject: pmlogger_check failed in /etc/init.d/pcp
Restarting primary pmlogger for host "xcat20mn" ... timed out
waiting!
Usage: pmlogger [options] archive
-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"
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
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
Notes: Sai p Seshasayee/Poughkeepsie/IBM
"Always speak the truth, that way you dont need to remember what you
said !"
08/28/2008 07:32 PM
To
Sai p
cc
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).
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
-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).
$ 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
Nathan Scott
2008-09-02 23:11:19 UTC
Permalink
Post by Sai p Seshasayee
Hi Ken,
Thanks for your inputs. My host is "xcat20mn". I have only 1 entry in
the "/var/lib/pcp/config/pmlogger/control" file but an interesting
thing is that I have 2 pmlogger process running (I don't know how).
You have 2 pmlogger_check processes running (this is a shell script,
which tries to start pmlogger and can be used to check its running at
any interval). You have no pmlogger processes running.
xcat20mn y n PCP_LOG_DIR/pmlogger/xcat20mn -cconfig.base -T1min
sai_logger

Looks like "-T1min" may be the problem - that means "terminate after
1 minute". What you want, I suspect, is "-t1min" which means "sample
every 1 minute by default".

cheers.

--
Nathan
Ken McDonell
2008-09-02 23:55:51 UTC
Permalink
Nathan beat me to it.

But the other "odd" thing is the sai_logger at the end of the pmlogger
control line.

My guess is this was an attempt at naming the archive, but
pmlogger_check generates the archive name automagically (it is a date
and time stamp) ... so I think that explains the usage message, the lack
of a pmlogger.log file, no archive, etc.

If I use the same control line, I get the same error!

So
1. change the -T1min to -t1min (or drop it entirely and move the logging
intervals into the pmlogger config file where you can choose appropriate
and possibly different intervals per group of metrics)

2. drop the sai_logger at the end of the control line
Post by Nathan Scott
Post by Sai p Seshasayee
Hi Ken,
Thanks for your inputs. My host is "xcat20mn". I have only 1 entry in
the "/var/lib/pcp/config/pmlogger/control" file but an interesting
thing is that I have 2 pmlogger process running (I don't know how).
You have 2 pmlogger_check processes running (this is a shell script,
which tries to start pmlogger and can be used to check its running at
any interval). You have no pmlogger processes running.
xcat20mn y n PCP_LOG_DIR/pmlogger/xcat20mn -cconfig.base -T1min sai_logger
Looks like "-T1min" may be the problem - that means "terminate after
1 minute". What you want, I suspect, is "-t1min" which means "sample
every 1 minute by default".
cheers.
--
Nathan
Sai p Seshasayee
2008-09-03 00:28:53 UTC
Permalink
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!
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?

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:

[***@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

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 !

Thanks and Regards
Sai Prakash
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
External: 845-435-4720
email: ***@us.ibm.com
Notes: Sai p Seshasayee/Poughkeepsie/IBM

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



Ken McDonell <***@internode.on.net>
Sent by: pcp-***@oss.sgi.com
09/02/2008 07:55 PM
Please respond to
***@internode.on.net


To
Nathan Scott <***@aconex.com>
cc
Sai p Seshasayee/Poughkeepsie/***@IBMUS, ***@oss.sgi.com
Subject
Re: PCP - pmlogger command






Nathan beat me to it.

But the other "odd" thing is the sai_logger at the end of the pmlogger
control line.

My guess is this was an attempt at naming the archive, but
pmlogger_check generates the archive name automagically (it is a date
and time stamp) ... so I think that explains the usage message, the lack
of a pmlogger.log file, no archive, etc.

If I use the same control line, I get the same error!

So
1. change the -T1min to -t1min (or drop it entirely and move the logging
intervals into the pmlogger config file where you can choose appropriate
and possibly different intervals per group of metrics)

2. drop the sai_logger at the end of the control line
Post by Nathan Scott
Post by Sai p Seshasayee
Hi Ken,
Thanks for your inputs. My host is "xcat20mn". I have only 1 entry in
the "/var/lib/pcp/config/pmlogger/control" file but an interesting
thing is that I have 2 pmlogger process running (I don't know how).
You have 2 pmlogger_check processes running (this is a shell script,
which tries to start pmlogger and can be used to check its running at
any interval). You have no pmlogger processes running.
xcat20mn y n PCP_LOG_DIR/pmlogger/xcat20mn -cconfig.base -T1min sai_logger
Looks like "-T1min" may be the problem - that means "terminate after
1 minute". What you want, I suspect, is "-t1min" which means "sample
every 1 minute by default".
cheers.
--
Nathan
Ken McDonell
2008-09-03 04:41:16 UTC
Permalink
Answers in situ below.
Post by Sai p Seshasayee
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.
Post by Sai p Seshasayee
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:

***@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).
Post by Sai p Seshasayee
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
@ 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
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.
Post by Sai p Seshasayee
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.

Loading...