pcp
[Top] [All Lists]

Re: [pcp] non-root changes break pmcd on Mac OS X

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] non-root changes break pmcd on Mac OS X
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Wed, 09 Jan 2013 20:20:15 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <278136341.1088135.1357635862583.JavaMail.root@xxxxxxxxxx>
References: <278136341.1088135.1357635862583.JavaMail.root@xxxxxxxxxx>
On Tue, 2013-01-08 at 04:04 -0500, Nathan Scott wrote:
> ...
> Was this an install via the Mac installer?  (did it complete with the
> big green tick?  if not, the installed GUI menu provides access to a
> log file that I've found useful for diagnosing this class of issue -
> one gotcha is it doesnt show all messages by default, IIRC, theres a
> verbosity-increase-mechanism in the GUI somewhere).

I used build/mac/cmdline-install not the GUI ... but no errors we
reported.

So I went back and ...

# dscl . -delete /Users/pcp
# dscl . -delete /Groups/pcp

then ran the GUI installer ... no errors ... bit green tick ... no user
or group ... no pmcd.

comma:mac kenj$ dscl . -read /Users/pcp
<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
comma:mac kenj$ dscl . -read /Groups/pcp
<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)

comma:mac kenj$ ps aux | grep pmcd
kenj     66802   0.0  0.0  2426924    328 s002  R+    8:22PM   0:00.00 grep pmcd
comma:mac kenj$ pcp
pcp: Cannot connect to PMCD on host "comma.localdomain": Connection refused
comma:mac kenj$ grep pcp /var/log/pcp/pmcd/pmcd.log
[Wed Jan  9 20:16:44] pmcd(63198) Critical: cannot find the pcp user to switch 
to

Then as root I ran my adduser script and /etc/init.d/pcp start ... then

comma:mac kenj$ dscl . -read /Users/pcp
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 971AEF6A-2D90-440D-8905-31CB0095B2CE
NFSHomeDirectory: /Users/pcp
PrimaryGroupID: 504
RealName:
 Performance Co-Pilot
RecordName: pcp
RecordType: dsRecTypeStandard:Users
UniqueID: 504
UserShell: /sbin/nologin
comma:mac kenj$ dscl . -read /Groups/pcp
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 3379EB27-E9DC-48AE-986E-B60E8B8D95EE
PrimaryGroupID: 504
RecordName: pcp
RecordType: dsRecTypeStandard:Groups
comma:mac kenj$ ps aux | grep pmcd
pcp      66947   0.0  0.1  2440980   1372   ??  Ss    8:24PM   0:00.01 
/usr/libexec/pcp/bin/pmcd -T 3
kenj     67164   0.0  0.0  2426924    328 s002  R+    8:25PM   0:00.00 grep pmcd
comma:mac kenj$ pcp
Performance Co-Pilot configuration on comma.localdomain:

 platform: Darwin comma.localdomain 10.8.0 Darwin Kernel Version 10.8.0: Tue 
Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
 hardware: 2 cpus, 1 disk, 2047MB RAM
 timezone: EST-11
     pmcd: Version 3.6.11-1, 9 agents, 1 client
     pmda: pmcd trace sendmail sample sampledso mmv darwin trivial simple
 pmlogger: primary logger: comma/20130109.20.24

> build/mac/installer-resources/postinstall has the dscl-fu toward the end
> that is supposed to be handling this for us.  Looks like similar sorts
> of stuff to your attached script, so I guess its not been run, somehow.

Looks like it is not being run at all or is failing.  Of course if the
user pcp had already been created, then the failure would have been
masked.

So looks like a real bug still to me.

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