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

Documentation on FreeBSD support #63

Closed
Scorpiion opened this Issue Jan 25, 2016 · 9 comments

Comments

Projects
None yet
4 participants

Hi,

I'm trying to figure out if and to what extent FreeBSD is supported by/with pcp. The introduction page here suggest that FreeBSD is supported. However, I can't find any FreeBSD port or installation instructions, it's not mentioned at all in the INSTALL file for example. At the same time I could find some mentions of it being compiled on FreeBSD in issues here on Github and online in mailing list archives.

So, if FreeBSD is supported (?), it would be great if that could be stated a little bit clearer. I guess most of the pcp developers use Linux of course, but if it would be possible to provide a little better information about how to get started for FreeBSD that would be really great.

I am evaluating different monitoring solutions at the moment and if we end up using pcp I could maybe help out improving some FreeBSD related docs in the future. One of the requirements for this monitoring solution is full or at least "good enough" FreeBSD support, the basics of cpu/mem/disk/network and potentially some extra NFS and ZFS data would be nice. The things we run on FreeBSD on mainly ZFS+NFS and Nginx (not on the same servers).

Is there some list somewhere listing what is supported for different OSes or something like that? Do you know of any company using pcp and FreeBSD in production or are all users 100% Linux deployments? I know Netflix uses FreeBSD for their open connect CDN, so that could be a potential use I guess but not sure how much or where Netflix use pcp.

Ps. Hope it's okay that I ask this here, I can admit that this might be better to post on the mailing list, not sure, but Github is easier and if some more docs should/will be added then an issue to track that should be okay. Ds.

Hi @mkushnir, I did see your issue here about building on FreeBSD 11-CURRENT. Are you just trying out pcp for personal usage or do you guys use pcp on FreeBSD at Limelight Networks? (saw that you worked at Limelight Networks on your Github profile)

Contributor

mkushnir commented Jan 25, 2016

2016-01-25 6:42 GMT+02:00 Robert Åkerblom-Andersson notifications@github.com:

Hi @mkushnir, I did see your issue here about building on FreeBSD 11-CURRENT. Are you just trying out pcp for personal usage or do you guys use pcp on FreeBSD at Limelight Networks? (saw that you worked at Limelight Networks on your Github profile)

Hello Robert,

Our syseng are evaluating different products/tools for collecting
system and app stats across cdn the most convenient way, so PCP is one
of the options. I'm a part of our in-house data processing system,
and actually do my side of evaluation, just installed PCP on my
FreeBSD workstation, mostly default configuration, learning how it
works, and thinking of how I can use PMAPI to write a simple data
provider into our system.

Markiyan.


Reply to this email directly or view it on GitHub.

Hi Markiyan, thanks for the feedback, appreciate it.

I understand, I have not tried too hard yet to get pcp running on FreeBSD, I'm a little bit time constrained unfortunately. I'm not really supposed to look at monitoring systems at all right at this point in time, I just could not help myself to do some research and try out some open source solutions yesterday. I tried compiling pcp from source on FreeBSD but when I could not get the "qa/admin/check-vm" script to not give any errors I gave up for now. Got it running on the Linux servers though and the Netflix Vector makes it really easy to get some simple graphs up and running within just 5-10 minutes when you have a host you can connect to. The pcp desktop client worked too but it seemed it requires some work to build all graphs... I ran Vector locally with gulp serve and created a ssh tunnel into the datacenter server to get it running.

I can also recommend this podcast where @kmcdonell is being interviewed about the pcp project, I listen to it yesterday and it gave a very nice background of the whole pcp project.

Contributor

kmcdonell commented Jan 26, 2016

Robert,

The FreeBSD version of PCP was mostly done by me (a) as an exercise in code portability (the more platforms we can make the code work on, the less likely we are to have embraced some obscure feature of the Linux+gcc-toolchain ecosystem that will come back to bite later) and (b) to see how hard it is to get kernel metrics out of FreeBSD and into PCPland.

I have the following *BSD systems in my QA environment and the code builds and part of the QA suite runs there on a regular basis:
Host PCP CPU Operating System
vm06 3.11.0 amd64 FreeBSD 10.2-RELEASE
vm09 3.11.0 i386 NetBSD 6.1.5
vm10 3.10.9 i386 FreeBSD 9.3-RELEASE-p30
vm32 3.11.0 amd64 FreeBSD 11.0-CURRENT

I used qa/admin/check-vm to set up these machines, so if you're having difficulties there, please send me the details.

There is no packaging for *BSD (I don't know anything about how this should be done), so the "build" generates a tarball that can be installed relative to / ... so that probably explains why you can't find a "FreeBSD port" ... and we should add something in the INSTALL file to explain the current status here.

In the freebsd PMDA there is basic coverage of cpu, disk, mem and network (interface) metrics. There is no nfs and no zfs ... this does not mean it would be difficult, I just haven't had anyone ask before which would be the trigger for having a look.

The available metrics for each operating system vary widely, and for some there are thousands of metrics and hundreds of thousands of metric values, so listing them is probably not helpful ... if your FreeBSD version matches any in the list above, let me know and I'll send you the list of metrics in email.

Hi @kmcdonell, thanks for the input.

I understand the FreeBSD support background better now. I got stuck when I could not figure out how to install sadf, the systat command is part of the core OS I believe and I can not find any package called systat to installed (the systat command does work). You can see the output below. I assume "QA optional" packages are not needed, the warnings, well I guess those are not critical. /etc/hosts and pcp user I could fix, for the conf file /etc/pcp.conf error, is an empty file okay or do I need some proper conf to compile? The initialize policy plugin I'm not sure what it means.

Missing: sadf [sysstat]
Missing: socat [(QA optional)]
Missing: avahi-browse [avahi-tools or avahi-utils (QA optional)]
Missing: valgrind [(QA optional)]
Warning: Package libmicrohttpd not known to pkg-config , need > 0.9.9
Warning: Package cairo not known to pkg-config , need >= 1.2
Warning: Package cairo-ft not known to pkg-config , need >= 1.2
Warning: Package cairo-png not known to pkg-config , need >= 1.2
No /etc/hosts entry for XXXXXXXXXXXXXXX
Warning: "/etc/pcp.conf" is missing
sudo: unknown user: pcp
sudo: unable to initialize policy plugin
Error: /home/robert is not searchable by user "pcp"

Do you have some script you use to setup the FreeBSD servers or do you install required packages manually?

As far as packaging goes I don't think that has been FreeBSD strongest suit historically, however recently (the last few years) a new more "modern" package manager has been introduced called "pkgng", I think it works quite good, on newer systems it's executable is just called just pkg. I install most thing with pkg install [packageName]. I have yet to create any packages myself so far but I think it should not be too hard, it's documented here. I do have some experience of creating startup rc scripts though, to integrate with the service XXX start/stop/restart commands, it is very easy to do.

Locally on the server I use these tools today zfs-stat (it's a script fetching zfs data) and the continuous output from this command zpool iostat -v 1. The NFS command nfsstat gives lots of NFS stats, it has helped me in the past so that's my main tool for NFS stats.

If I could get pcp running on my own that would of course be the best solution, but I would appreciate you taking the time to send an email as well. You could send the stats for FreeBSD 10.2-RELEASE if you get some time over for that, robert at dartvoid.com is my work address, it would be interesting to see the output.

Contributor

mkushnir commented Jan 26, 2016

2016-01-26 8:43 GMT+02:00 Robert Åkerblom-Andersson notifications@github.com:

Hi @kmcdonell, thanks for the input.

I understand the FreeBSD support background better now. I got stuck when I
could not figure out how to install sadf, the systat command is part of the
core OS I believe and I can not find any package called systat to installed
(the systat command does work). You can see the output below. I assume "QA
optional" packages are not needed, the warnings, well I guess those are not
critical. /etc/hosts and pcp user I could fix, for the conf file
/etc/pcp.conf error, is an empty file okay or do I need some proper conf to
compile? The initialize policy plugin I'm not sure what it means.

Missing: sadf [sysstat]
Missing: socat [(QA optional)]
Missing: avahi-browse [avahi-tools or avahi-utils (QA optional)]
Missing: valgrind [(QA optional)]
Warning: Package libmicrohttpd not known to pkg-config , need > 0.9.9
Warning: Package cairo not known to pkg-config , need >= 1.2
Warning: Package cairo-ft not known to pkg-config , need >= 1.2
Warning: Package cairo-png not known to pkg-config , need >= 1.2
No /etc/hosts entry for XXXXXXXXXXXXXXX
Warning: "/etc/pcp.conf" is missing
sudo: unknown user: pcp
sudo: unable to initialize policy plugin
Error: /home/robert is not searchable by user "pcp"

Do you have some script you use to setup the FreeBSD servers or do you
install required packages manually?

As far as packaging goes I don't think that has been FreeBSD strongest suit
historically, however recently (the last few years) a new more "modern"
package manager has been introduced called "pkgng", I think it works quite
good, on newer systems it's executable is just called just pkg. I install
most thing with pkg install [packageName]. I have yet to create any packages
myself so far but I think it should not be too hard, it's documented here. I
do have some experience of creating startup rc scripts though, to integrate
with the service XXX start/stop/restart commands, it is very easy to do.

Locally on the server I use these tools today zfs-stat (it's a script
fetching zfs data) and the continuous output from this command zpool iostat
-v 1. The NFS command nfsstat gives lots of NFS stats, it has helped me in
the past so that's my main tool for NFS stats.

If I could get pcp running on my own that would of course be the best
solution, but I would appreciate you taking the time to send an email as
well. You could send the stats for FreeBSD 10.2-RELEASE if you get some time
over for that, robert at dartvoid.com is my work address, it would be
interesting to see the output.

I've just put together a simple port of the current pcp snapshot
(cf5e23a) for FreeBSD, you can see if
it fits your needs (attached). Since the port is based on a snapshot,
I had to make some bugfixes and portability fixes in it, which I
otherwise would upstream.

If it works, we might just post it to FreeBSD Ports.

Markiyan.


Reply to this email directly or view it on GitHub.

Contributor

mkushnir commented Jan 26, 2016

Could not send an attachment .tgz from my gmail account, so submitted a pull-request (details please see at #64)

Contributor

natoscott commented Mar 10, 2016

@KenJ with all the recent FreeBSD code & docs you merged, can this be closed?

Contributor

kmcdonell commented Mar 10, 2016

@natoscott I think we're done here. I'll reply to @Scorpiion in email to answer the 2 questions I did not answer when this was going around the first time.

@kmcdonell kmcdonell closed this Mar 10, 2016

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