pcp
[Top] [All Lists]

Re: Running PCP as non-root

To: Nathan Scott <nathans@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Running PCP as non-root
From: Mark Goodwin <markgw@xxxxxxx>
Date: Mon, 23 Oct 2000 14:55:43 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <10010231231.ZM83885@wobbly.melbourne.sgi.com>
Sender: owner-pcp@xxxxxxxxxxx
You can run PCP as non-root, as Michal suggested. e.g.
   # mkdir ~/log
   # edit /etc/pcp.conf and change the PCP_LOG_DIR variable to the new dir
   # edit /etc/rc.d/init.d/pcp and comment out the root uid check.
   # then run "/etc/rc.d/init.d/pcp start" as yourself or some other user.

In the next PCP release, I'll remove the root uid check in the rc script
and replace it with a check if $PCP_LOG_DIR is writable by the current user.

If you're using the cron scripts for pmlogger and/or pmie (see the man pages
for pmlogger_check(1) and pmie_check(1), you'll need to move these from
root's crontab to that for your chosen non-root user.

The only other problem I can think of is that the optional PMDA Install
scripts (in /var/pcp/pmdas) will want to manipulate files in directories
owned by root. These Install scripts will also want to restart or hup pmcd.
But once you have the optional PMDAs configured, you can restart as non-root.

In theory you should be able to relocate all of PCP's var heirarchy by
changing PCP_VAR_DIR, PCP_PMCDCONF_PATH, PCP_PMDAS_DIR, PCP_LOG_DIR
and (perhaps) PCP_TMP_DIR to some place else [I haven't tried this].

-- Mark



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