issues with pmlogger_daily via cron
"Sharif Islam" <[email protected]> Tue, 14 Feb 2017 09:01:24 +0100 (CET)
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
I am trying to debug an issue with pmlogger (we are using version 3.9.10-1 in SLES 11) while running via cron. Not sure if anyone else has ran into this.
It seems to be an issue with char width limit in cron. I cannot reproduce this while running via command line. Any suggestion on how to debug this? I added set -x in pmlogger_daily and in pmnewlog.
Here's a snippet of the set -x output where my hostname turns into "loca" from "local"
+ _message looking
+ case $1 in
+ /bin/echo -n 'Looking for pmlogger (process 63142) ...'
Looking for pmlogger (process 63142) ...+ ps -efw
+ false
+ /usr/bin/gawk --posix '$2 == 63142 && /pmlogger/ { print }'
+ '[' -s /tmp/pcp.pkokQMTHh/out ']'
+ true
+ echo ' found'
found
+ true
+ cat /tmp/pcp.pkokQMTHh/out
root 63142 1 0 Feb13 ? 00:00:50 pmlogger -r -U root -m pmlogger_daily -l /var/log/pcp-storage/pmlogger.log -h loca
++ /usr/bin/gawk --posix '{ print $2 }'
+ pid=63142
++ sed -n -e '/ -h /{
s/.* -h //
s/ .*//
p
}'
+ hostname=loca
++ echo loca
++ sed -n -e '/@/{
s/.*@//
s/:.*//
p
}'
+ proxyhost=
++ echo loca
++ sed -n -e '/@.*:/s/.*;//p'
+ proxyport=
+ '[' -n '' ']'
+ pmlc_prefix=
+ false
+ args='-r -U root -m pmlogger_daily -l /var/log/pcp-storage/pmlogger.log '
+ false
+ '[' -z loca ']'
+ args='-r -U root -m pmlogger_daily -l /var/log/pcp-storage/pmlogger.log -h loca '
+ '[' -z /var/lib/pcp/config/pmlogger/logger.config ']'
+ '[' -n '' ']'
+ args='-r -U root -m pmlogger_daily -l /var/log/pcp-storage/pmlogger.log -h loca -c /var/lib/pcp/config/pmlogger/logger.config '
--sharif
--
Sharif Islam| Dataservices | SURFsara | Science Park 140 | 1098 XG Amsterdam | T +31 (0)6 53859713 | [email protected] | www.surfsara.nl