Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Files missing from /usr/share/pcp/lib after installing the .deb packages #39

Closed
rvernica opened this Issue Aug 13, 2015 · 5 comments

Comments

Projects
None yet
2 participants
Contributor

rvernica commented Aug 13, 2015

I compiled version 3.10.4 from Git with ./Makepkgs. After installing the .deb files, it seems that files are missing /usr/share/pcp/lib. I get the following messages in /var/log/messages when pmcd tries to start:

Mar 27 18:09:20 beaglebone systemd[1]: [/lib/systemd/system/pmcd.service:3] Unknown lvalue 'Documentation' in section 'Unit'. Ignoring.
Mar 27 18:17:10 beaglebone (pmcd)[715]: Failed at step EXEC spawning /usr/share/pcp/lib/pmcd: No such file or directory
Mar 27 18:17:10 beaglebone systemd[1]: pmcd.service: main process exited, code=exited, status=203
Mar 27 18:17:10 beaglebone systemd[1]: Unit pmcd.service entered failed state.

Here are the contents of the /usr/share/pcp/lib directory:

debian@beaglebone:~$ ll /usr/share/pcp/lib
total 72
-rw-r--r-- 1 root root  2659 Apr 21  2015 bashproc.sh
-rwxr-xr-x 1 root root  1259 Apr 21  2015 lockpmns
-rw-r--r-- 1 root root 35927 Apr 21  2015 pmdaproc.sh
-rw-r--r-- 1 root root 10683 Apr 21  2015 rc-proc.sh
-rw-r--r-- 1 root root  1970 Apr 21  2015 rc-proc.sh.minimal
-rwxr-xr-x 1 root root  4931 Apr 21  2015 ReplacePmnsSubtree
-rwxr-xr-x 1 root root   983 Apr 21  2015 unlockpmns

I have a second instance of the same hardware with the same OS. There I did sudo make install which I know it is not recommended. Here are the contents of the /usr/share/pcp/lib directory on the second system:

debian@beaglebone:~$ ll /usr/share/pcp/lib/
total 132K
-rw-r--r-- 1 root root 2.6K Apr 14 13:44 bashproc.sh
-rwxr-xr-x 1 root root 1.3K Apr 14 13:44 lockpmns
-rwxr-xr-x 1 root root 2.2K Apr 14 12:12 pcp
-rwxr-xr-x 1 root root  14K Apr 14 12:12 pmcd
-rw-r--r-- 1 root root  36K Apr 14 13:44 pmdaproc.sh
-rwxr-xr-x 1 root root 6.6K Apr 14 12:13 pmie
-rwxr-xr-x 1 root root 7.3K Apr 14 12:13 pmlogger
-rwxr-xr-x 1 root root 6.7K Apr 14 12:13 pmmgr
-rwxr-xr-x 1 root root 6.9K Apr 14 12:13 pmproxy
-rwxr-xr-x 1 root root 7.5K Apr 14 12:13 pmwebd
-rw-r--r-- 1 root root  11K Apr 14 13:44 rc-proc.sh
-rw-r--r-- 1 root root 2.0K Apr 14 13:44 rc-proc.sh.minimal
-rwxr-xr-x 1 root root 4.9K Apr 14 13:44 ReplacePmnsSubtree
-rwxr-xr-x 1 root root  983 Apr 14 13:44 unlockpmns

The two systems run Debian. Here are the details:

$ cat /etc/issue
Debian GNU/Linux 7
$ uname -a
Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux
Contributor

rvernica commented Aug 13, 2015

To make sure pmcd starts at boot I am doing:

$ sudo update-rc.d pmcd defaults
update-rc.d: using dependency based boot sequencing
Contributor

kmcdonell commented Aug 14, 2015

Something has gone wrong with the configuration in the build.

Debian 7 is one of my primary development platform and I run Makepkgs more often than most people have had a hot breakfast.

None of the rc/init stuff on my system ends up in /usr/share/pcp/lib as this shows ...

kenj@bozo-vm:~$ cat /etc/issue
Debian GNU/Linux 7 \n \l

kenj@bozo-vm:~$ grep RC /etc/pcp.conf

WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

PCP_RC_DIR=/etc/init.d
PCP_PMCDRCLOCAL_PATH=/etc/pcp/pmcd/rc.local
PCP_PMLOGGERCONTROL_PATH=/etc/pcp/pmlogger/control

What is the value of PCP_RC_DIR in your /etc/pcp.conf after an install?

Assuming it is not /etc/init.d I'm guessing you're running with systemd ... and last time I checked systemd was marked "experimental" in Debian, which is why I am not using it.

Contributor

rvernica commented Aug 14, 2015

I think the rd/init script expects the binary to be in /usr/share/pcp/lib. Here are the details you requested:

debian@beaglebone:~$ grep RC /etc/pcp.conf
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
PCP_RC_DIR=/etc/init.d
PCP_PMCDRCLOCAL_PATH=/etc/pcp/pmcd/rc.local
PCP_PMLOGGERCONTROL_PATH=/etc/pcp/pmlogger/control

I am not using systemd, but sys v init:

debian@beaglebone:~$ dpkg -S /sbin/init
sysvinit: /sbin/init
Contributor

kmcdonell commented Aug 14, 2015

Something is not right here. Your initial post clearly shows error messages from systemd.

If /etc/init.d/pmcd is really trying to find pmcd in /usr/share/pcp/lib, that is a different sort of configure problem.

It does not do this on my Debian system as this shows:
$ grep PMCD= /etc/init.d/pmcd
PMCD=$PCP_BINADM_DIR/pmcd
$ grep BINADM /etc/pcp.conf
PCP_BINADM_DIR=/usr/lib/pcp/bin

Does
$ sudo /etc/init.d/pmcd start
work?

Send me (via email) your /etc/pcp.conf, config.log and config.status from the build and I'll try to see where the difference is.

Contributor

rvernica commented Aug 14, 2015

Here is the output from grep:

debian@beaglebone:~$  grep PMCD= /etc/init.d/pmcd
PMCD=$PCP_BINADM_DIR/pmcd
debian@beaglebone:~$ grep BINADM /etc/pcp.conf
PCP_BINADM_DIR=/usr/lib/pcp/bin

And here is the output from the start command:

debian@beaglebone:~$ ps ax | grep pmcd
23299 pts/0    S+     0:00 grep pmcd
debian@beaglebone:~$ sudo /etc/init.d/pmcd start
Rebuilding PMNS ... 
Starting pmcd ... 
debian@beaglebone:~$ ps ax | grep pmcd
23463 ?        Ss     0:00 /usr/lib/pcp/bin/pmcd
23485 pts/0    S+     0:00 grep pmcd

Now I am confused as well... I think this is the explanation. Initially I was using systemd and the *.service scripts. The *.service scripts expected the binaries to be in /usr/share/pcp/lib. Later I removed the *.service scripts via systemctl and enabled the init.d scripts via update-rc.d. Now pmcd starts at boot, which was my goal.

@rvernica rvernica closed this Aug 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment