Where does cockpit-pcp store its data

Issues related to applications and software problems and general support
Post Reply
whoop
Posts: 8
Joined: 2020/10/17 13:25:06

Where does cockpit-pcp store its data

Post by whoop » 2021/07/16 20:11:33

Should be an easy question but I can't seem to find the answer.
So cockpit-pcp displays about cpu,ram,network etc. usage and displays it in graphs.
Where is this information phisically being stored? Can I remove old data? Can I change the location it is being stored? etc.

larwood
Posts: 66
Joined: 2011/07/27 12:07:30
Location: Perth WA, Australia

Re: Where does cockpit-pcp store its data

Post by larwood » 2021/07/20 01:11:36

Logs are here:
/var/log/pcp/pmlogger/$(hostname)/

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Where does cockpit-pcp store its data

Post by MartinR » 2021/07/20 08:03:33

Start with /etc/pcp.conf which contains the lines:

Code: Select all

# parent directory of PCP archive directories
# Standard path: /var/log/pcp/pmlogger
PCP_ARCHIVE_DIR=/var/log/pcp/pmlogger
So now go to /var/log/pcp/pmlogger and look around, you should see a subdirectory named after your machine. Go there and look.
  • Latest is the start of the latest log.
  • plogger.log records everything the logger has done, including a complete list of metrics.
  • date.xxx
    • index binary file created daily
    • meta binary file created daily
    • n data files, starts with 0 each day and rolls over as required
The xz posfixes indicate that the files have been compressed.

The answers to your questions are therefore:
  • Where is this information phisically being stored? - See above
  • Can I remove old data? - Don't bother, pmlogger does it for you.
  • Can I change the location it is being stored? - Yes, in the configuration file, but I would strongly advise against it.

whoop
Posts: 8
Joined: 2020/10/17 13:25:06

Re: Where does cockpit-pcp store its data

Post by whoop » 2021/07/20 21:13:17

Thank you guys for the clear responses.
MartinR wrote:
2021/07/20 08:03:33
  • Where is this information phisically being stored? - See above
  • Can I remove old data? - Don't bother, pmlogger does it for you.
  • Can I change the location it is being stored? - Yes, in the configuration file, but I would strongly advise against it.
How does pmlogger rotate or delete (old) logs? Is this configurable? Thanks for the help.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Where does cockpit-pcp store its data

Post by MartinR » 2021/07/20 22:00:13

See man pmlogger_check. Its 23:00 here, so you'll need to do further searching yourself until I awake tomorrow!

Post Reply