pcp
[Top] [All Lists]

Re: pmie_check starts too many pmie processes when /var/log/pcp is a sym

To: Micah Altman <Micah_Altman@xxxxxxxxxxx>
Subject: Re: pmie_check starts too many pmie processes when /var/log/pcp is a symbolic link
From: kenmcd@xxxxxxxxxxxxxxxxx
Date: Tue, 27 Nov 2001 13:09:00 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <Pine.GHP.4.21.0111260002000.22689-100000@xxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: kenmcd@xxxxxxxxxxxxxxxxx
Sender: owner-pcp@xxxxxxxxxxx
I've tried and I'm afraid I cannot reproduce this ... could you please
send me ...

1. contents of /var/pcp/config/pmie/control
2. output from: ls -l /var/log/pcp
3. output from: pminfo -f pmcd.pmie
4. output from: ps -ef | grep pmie
5. output from: ls -l /var/tmp/pmie

6. output from: pmie_check -V

7. output from: pminfo -f pmcd.pmie
8. output from: ps -ef | grep pmie
9. output from: ls -l /var/tmp/pmie

Thanks.


On Mon, 26 Nov 2001, Micah Altman wrote:

>
> Under RH 6.2 and PCP 2.2.1...
>
> When /var/log/pcp is a symbolic link, pmie_check fails to detect that a
> pmie  process exists, even when it already running, and starts another
> one. This leads to an accumulation of pmie processes and eventually to
> proc-table overflow.
>
> The is a patch for pmie_check that eliminates the problem of pmie_check
> failing to detect run. The fix works for our case, but is probably
> incorrect -- so please consider it an illustration. The problem seems to
> be that the symlink makes $logfile <> $p_logfile when they both, in fact,
> refer to the same file.
>
>
> *** /usr/share/pcp/bin/pmie_check     Sun Aug 12 00:44:16 2001
> --- pmie_check        Sun Nov 25 23:50:38 2001
> ***************
> *** 1,4 ****
> ! #! /bin/sh
>   #Tag 0x00010D13
>   #
>   # Copyright (c) 1998-2000 Silicon Graphics, Inc.  All Rights Reserved.
> --- 1,4 ----
> ! #! /bin/sh
>   #Tag 0x00010D13
>   #
>   # Copyright (c) 1998-2000 Silicon Graphics, Inc.  All Rights Reserved.
> ***************
> *** 473,479 ****
>   NR == 2     { printf "p_logfile=\"%s\"\n", $0; next }
>   NR == 3     { printf "p_pmcd_host=\"%s\"\n", $0; next }
>       { next }'`
> !         if [ "$p_logfile" = $logfile -a "$p_pmcd_host" = "$fqdn" ]
>           then
>               pid=$p_id
>               break
> --- 473,481 ----
>   NR == 2     { printf "p_logfile=\"%s\"\n", $0; next }
>   NR == 3     { printf "p_pmcd_host=\"%s\"\n", $0; next }
>       { next }'`
> !
> !         ##if [ "$p_logfile" = $logfile -a "$p_pmcd_host" = "$fqdn" ]
> !         if [ $logfile -a "$p_pmcd_host" = "$fqdn" ] # fixes problem when 
> /var/log/pcp is a symlink , but not sure if it's correct
>           then
>               pid=$p_id
>               break
>
> ______________________________________________________________________________
> Micah Altman, Ph.D.           Associate Director, Harvard-MIT Data Center
>               Director, Virtual Data Center Project, Harvard U. Library
>  Research Associate, Center for Basic Research in the Social Science,
>       Faculty of Arts & Sciences, Harvard University
> micah_altman@xxxxxxxxxxx         http://data.fas.harvard.edu/micah_altman/
> "Entia non sunt multiplicanda sine necessitate" - Doctor Invincibilis
>               ("Ad indicia spectate." - Micah's corollary)
> Disclaimer: This is an unofficial, unsigned, document.  (Copyright 2001)
>
>



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