Code Monkey home page Code Monkey logo

performancecopilot / pcp Goto Github PK

View Code? Open in Web Editor NEW
944.0 944.0 231.0 158.76 MB

Performance Co-Pilot

Home Page: https://pcp.io

License: Other

Emacs Lisp 0.01% Makefile 2.41% Shell 24.07% HTML 0.01% C 52.87% C++ 5.11% Perl 3.72% QMake 0.08% Python 5.48% DTrace 0.01% XS 0.17% Fortran 0.01% Java 0.01% Batchfile 0.01% Yacc 0.90% Lex 0.31% M4 0.56% DM 0.01% Roff 4.20% Ragel 0.06%
analysis distributed graph lightweight metrics monitoring performance timeseries

pcp's People

Contributors

4ge32 avatar andreasgerstmayr avatar christianhorn avatar ddiss avatar drsmith2 avatar elephantzhang avatar erbenos avatar fche avatar goodwinos avatar guillemlp avatar hamishcoleman avatar hkshaw1990 avatar jronak avatar kmcdonell avatar kurik avatar lberk avatar mbaldessari avatar minnus avatar mmakc avatar mohicks avatar myllynen avatar natoscott avatar not4win avatar pauljevans avatar pcuzner avatar portante avatar shiyaoc avatar shogo-matsumoto avatar smalinux avatar stanfordcox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcp's Issues

PMDA Initialisation Failed

Hi All,
while exploring pcp
in PMDAMMV.log we are getting error.

Log for pmdammv on GFGPH32.egi.ericsson.com started Tue Aug 11 14:25:32 2015

[Tue Aug 11 14:25:42] pmdammv(24263) Warning: pduread: timeout (after 10.000 sec) while attempting to read 12 bytes out of 12 in HDR on fd=0
[Tue Aug 11 14:25:42] pmdammv(24263) Critical: __pmdaSetupPDU: PMDA pmdammv getting creds: Timeout waiting for a response from PMCD
[Tue Aug 11 14:25:42] pmdammv(24263) Error: PMDA Initialisation Failed

Let me know how to overcome this error.

Regards,
Prem

OSX Build issues

Continuing from my initial attempts towards #51 I tried checking out a clean PCP git repo and building it locally on my OSX El Capitan, however I ran fairly quickly into build issues.

Documenting my tribulations, I needed to:

brew install gnu-tar coreutils make

As well as the following diff to fool it to find the right binary of gtar on my system:

https://gist.github.com/tallpsmith/64cb747004466f702381

To get some base bits working, I'm presuming too that the standard XCode install may be needed, I'm not sure, but since I had that installed worth mentioning.

After reading the INSTALL document, I then ran:

./Makepkgs --verbose

and hit the following error:

dyld: Library not loaded: libpcp.3.dylib
  Referenced from: /workspace_intellij/pcp/pcp/pcp-3.10.9/src/pmdas/root/../../../src/pmcpp/pmcpp
  Reason: image not found
Error Parsing ASCII PMNS: pmcpp returned non-zero exit status
newhelp: pmLoadASCIINameSpace(root_root, 1): Problems parsing PMNS definitions

The Makepkg log is also attached to the Gist referenced above for the full log.

Since I'm new to building PCP, I am sure this is mostly environmental at this stage, but if anyone can help point directions as to what is going wrong exactly, I would appreciate it.

OpenBSD support, EPROTO question

Hi,

I'm not really a developer so I'm asking before pull request? How to handle in better way EPROTO? It seems odd to have ifndef in couple of files?

(Otherwise with diffs below I could build pcp on OpenBSD. Just build, I have to learn how to use it :) )

diff --git a/configure b/configure
index 1ffeaa6..dbd1179 100755
--- a/configure
+++ b/configure
@@ -3099,6 +3099,15 @@ $as_echo "#define IS_NETBSD 1" >>confdefs.h
     export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE -D_NETBSD_SOURCE"
     pcp_platform_paths='/usr/pkg/bin'
     pcp_ps_all_flags=auxww
+elif test $target_os = openbsd
+then
+    target_os=openbsd
+
+$as_echo "#define IS_OPENBSD 1" >>confdefs.h
+
+    export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE"
+    pcp_platform_paths='/usr/local/bin'
+    pcp_ps_all_flags=auxww
 else
     echo
     echo "FATAL ERROR: need platform-specific customization for \"$target_os\""
diff --git a/configure.ac b/configure.ac
index ac47d8b..91f7cfd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -310,6 +310,13 @@ then
     export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE -D_NETBSD_SOURCE"
     pcp_platform_paths='/usr/pkg/bin'
     pcp_ps_all_flags=auxww
+elif test $target_os = openbsd
+then
+    target_os=openbsd
+    AC_DEFINE(IS_OPENBSD, [1], [Platform is OpenBSD])
+    export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE"
+    pcp_platform_paths='/usr/local/bin'
+    pcp_ps_all_flags=auxww
 else
     echo
     echo "FATAL ERROR: need platform-specific customization for \"$target_os\""
diff --git a/src/include/buildrules b/src/include/buildrules
index f4b552e..a92036c 100644
--- a/src/include/buildrules
+++ b/src/include/buildrules
@@ -40,7 +40,7 @@ endif
 .SUFFIXES: .cxx

 ifdef LIBTARGET
-ifneq (, $(filter linux freebsd kfreebsd netbsd mingw gnu, $(TARGET_OS)))
+ifneq (, $(filter linux freebsd kfreebsd netbsd openbsd mingw gnu, $(TARGET_OS)))
 _SHAREDOPTS    = -shared -Wl,-soname,$(LIBTARGET)
 endif
 ifeq ($(TARGET_OS), solaris)
diff --git a/src/include/pcp/config.h.in b/src/include/pcp/config.h.in
index 392a761..8964c2d 100644
--- a/src/include/pcp/config.h.in
+++ b/src/include/pcp/config.h.in
@@ -539,6 +539,9 @@ typedef void (*SIG_PF) (int);
 /* Determine if we are on a NetBSD box */
 #undef IS_NETBSD

+/* Determine if we are on a OpenBSD box */
+#undef IS_OPENBSD
+
 /* Determine if we are on a Mac OS X box */
 #undef IS_DARWIN
 #ifdef IS_DARWIN
diff --git a/src/include/pcp/impl.h b/src/include/pcp/impl.h
index ba781a3..369056b 100644
--- a/src/include/pcp/impl.h
+++ b/src/include/pcp/impl.h
@@ -39,6 +39,9 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
+#if defined(IS_OPENBSD)
+#include <sys/select.h>
+#endif

 /*
  * Thread-safe support ... #define to enable thread-safe protection of
diff --git a/src/libpcp/src/auxserver.c b/src/libpcp/src/auxserver.c
index b7f75b1..892a33b 100644
--- a/src/libpcp/src/auxserver.c
+++ b/src/libpcp/src/auxserver.c
@@ -22,6 +22,11 @@
 #include <ucred.h>
 #endif

+/* OpenBSD doesn't have EPROTO */
+#ifndef EPROTO
+#define EPROTO EINTR
+#endif
+
 #define STRINGIFY(s)   #s
 #define TO_STRING(s)   STRINGIFY(s)

diff --git a/src/libpcp/src/pdubuf.c b/src/libpcp/src/pdubuf.c
index b222bf8..99fb3be 100644
--- a/src/libpcp/src/pdubuf.c
+++ b/src/libpcp/src/pdubuf.c
@@ -25,6 +25,10 @@
 #include <assert.h>
 #include <search.h>

+#ifdef IS_OPENBSD
+#include <sys/stdint.h>
+#endif
+
 typedef struct bufctl
 {
     int        bc_pincnt;
diff --git a/src/libpcp/src/util.c b/src/libpcp/src/util.c
index 039969a..64002e0 100644
--- a/src/libpcp/src/util.c
+++ b/src/libpcp/src/util.c
@@ -2138,7 +2138,7 @@ __pmProcessExists(pid_t pid)
        return 0;
     return (len > 0);
 }
-#elif defined(IS_FREEBSD)
+#elif defined(IS_FREEBSD) || defined(IS_OPENBSD)
 int 
 __pmProcessExists(pid_t pid)
 {
diff --git a/src/libpcp_gui/src/timeclient.c b/src/libpcp_gui/src/timeclient.c
index 1046e3f..0c101f7 100644
--- a/src/libpcp_gui/src/timeclient.c
+++ b/src/libpcp_gui/src/timeclient.c
@@ -16,6 +16,11 @@
 #include "impl.h"
 #include "pmtime.h"

+/* OpenBSD doesn't have EPROTO */
+#ifndef EPROTO
+#define EPROTO EINTR
+#endif
+
 static int
 pmServerExec(int fd, int livemode)
 {
diff --git a/src/perl/MMV/GNUmakefile b/src/perl/MMV/GNUmakefile
index 1fc485d..239377d 100644
--- a/src/perl/MMV/GNUmakefile
+++ b/src/perl/MMV/GNUmakefile
@@ -55,7 +55,7 @@ include $(BUILDRULES)
 install: default
 ifneq "$(PACKAGE_DISTRIBUTION)" "debian"
    $(call PERL_GET_FILELIST,$(TOPDIR)/perl-pcp-mmv.list,MMV)
-   find $$DIST_ROOT -name server.pl -exec chmod 755 '{}' ';'
+#  find $$DIST_ROOT -name server.pl -exec chmod 755 '{}' ';'
 endif

 install_perl:
diff --git a/src/pmdas/pmcd/src/pmcd.c b/src/pmdas/pmcd/src/pmcd.c
index 2271d16..b6e36c2 100644
--- a/src/pmdas/pmcd/src/pmcd.c
+++ b/src/pmdas/pmcd/src/pmcd.c
@@ -1022,7 +1022,7 @@ simabi()
     } else {
    return abi;
     }
-#elif defined(IS_FREEBSD) || defined(IS_NETBSD)
+#elif defined(IS_FREEBSD) || defined(IS_NETBSD) || defined(IS_OPENBSD)
     return "elf";
 #elif defined(IS_DARWIN)
     return "Mach-O " SIM_ABI;
diff --git a/src/pmdas/root/root.c b/src/pmdas/root/root.c
index 0be0af2..48b152f 100644
--- a/src/pmdas/root/root.c
+++ b/src/pmdas/root/root.c
@@ -32,6 +32,11 @@
 #define S_IRWXU 0700
 #endif

+/* OpenBSD doesn't have EPROTO */
+#ifndef EPROTO
+#define EPROTO EINTR
+#endif
+
 static char socket_path[MAXPATHLEN];
 static __pmSockAddr *socket_addr;
 static int socket_fd = -1;
diff --git a/src/pmdas/shping/shping.c b/src/pmdas/shping/shping.c
index f14be03..a184b6b 100644
--- a/src/pmdas/shping/shping.c
+++ b/src/pmdas/shping/shping.c
@@ -210,7 +210,7 @@ refresh(void *dummy)
     prctl(PR_TERMCHILD);           /* SIGHUP when the parent dies */
 #elif defined (PR_SET_PDEATHSIG)
     prctl(PR_SET_PDEATHSIG, SIGTERM);
-#elif defined(IS_SOLARIS) || defined(IS_DARWIN) || defined(IS_MINGW) || defined(IS_AIX) || defined(IS_FREEBSD) || defined(IS_GNU) || defined(IS_NETBSD)
+#elif defined(IS_SOLARIS) || defined(IS_DARWIN) || defined(IS_MINGW) || defined(IS_AIX) || defined(IS_FREEBSD) || defined(IS_GNU) || defined(IS_NETBSD) || defined(IS_OPENBSD)
     /* no signals here for child exit */
 #else
 !bozo: cant decide between PR_TERMCHILD and PR_SET_PDEATHSIG

Missing metrics for disk partitions

Hi,

I would like to get metrics for each disk partition using PCP. The following is the list of metrics I can get, however it seems to be missing several metrics comparing to disk.dev and disk.dm. Can anyone help to answer the reason behind this or any workaround to get these missing metrics? Thanks.

disk.partitions.read
disk.partitions.write
disk.partitions.total
disk.partitions.blkread
disk.partitions.blkwrite
disk.partitions.blktotal
disk.partitions.read_bytes
disk.partitions.write_bytes
disk.partitions.total_bytes

These following metrics are missing from disk.partitions:

disk.dev.read_merge
disk.dev.write_merge
disk.dev.avactive
disk.dev.read_rawactive
disk.dev.write_rawactive
disk.dev.aveq

iostat seems can output these missing metrics for disk partitions.

Memory leak detected by Valgrind

This Valgrind error was generated on 3.10.8 but it also applies to the latest master branch:

==109671== 5 bytes in 1 blocks are definitely lost in loss record 1 of 6
==109671==    at 0x4C27A2E: malloc (vg_replace_malloc.c:270)
==109671==    by 0x505ACB3: DecodeNameReq (p_pmns.c:519)
==109671==    by 0x4E37247: __pmdaMainPDU (mainloop.c:232)
==109671==    by 0x4E378C7: pmdaMain (mainloop.c:428)
==109671==    by 0x402A34: main (fbit_main.c:271)

The problem is in src/libpcp_pmda/src/mainloop.c, line 232:

if ((sts = __pmDecodeChildReq(pb, &name, &subtype)) >= 0) {

The name string is not freed.

Suggested patch:

diff --git a/src/libpcp_pmda/src/mainloop.c b/src/libpcp_pmda/src/mainloop.c
index 5dff1a9..b900b72 100644
--- a/src/libpcp_pmda/src/mainloop.c
+++ b/src/libpcp_pmda/src/mainloop.c
@@ -243,6 +243,7 @@ __pmdaMainPDU(pmdaInterface *dispatch)
                /* Not INTERFACE_4 */
                sts = PM_ERR_NAME;
            }
+           free(name);
        }
        if (sts < 0)
            __pmSendError(pmda->e_outfd, FROM_ANON, sts);

PCP webapi not returning data/metrics ?

I followed these instruction and compiled pcp from source.

$ git clone git://git.pcp.io/pcp

$ apt-get build-dep pcp

$ cd pcp
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-webapi
$ make
$ groupadd -r pcp
$ useradd -c "Performance Co-Pilot" -g pcp -d /var/lib/pcp -M -r -s /usr/sbin/nologin pcp
$ make install

but I am getting this error when calling the API

PMWEBD error, code -12443: Insufficient elements in list

when i request http://host:44323/pmapi/context?hostspec=localhost&polltimeout=600

I get { "context": 367806010 }

when i request http://host:44323/pmapi/367806010/_metric?prefix=hinv

i get { "metrics":[]}

how can i make it populate data in the metrics array?

Thank you!

Cannot build from source as a docker image

./configure is failing with error while building docker image from Dockerfile

checking for ps style... unknown
FATAL ERROR: could not determine how to get the "all processes with arguments"

Here is snippet from my Dockerfile

FROM debian:wheezy
MAINTAINER <eldos-dl>

# Update and install essentials
RUN apt-get update && apt-get install -y git build-essential wget openssl libssl-dev curl vim pkg-config
# Node installation
RUN wget ftp://ftp.pcp.io/projects/pcp/download/pcp-3.10.4.src.tar.gz
RUN tar xvzf pcp-3.10.4.src.tar.gz && mv pcp-3.10.4 /opt/pcp
# PCP Installation
WORKDIR /opt/pcp/
RUN apt-get install -y flex bison autoconf python2.7-dev python qt4-qmake libmicrohttpd-dev procps
RUN ps -ef
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
RUN make && make install

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

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

pmcollectl referencing pm before its instantiated

When using the -R option 'pm' gets called before instantiation.

$ ./pmcollectl -R 1s -s m -v
Traceback (most recent call last):
File "./pmcollectl", line 621, in
(timeval, errmsg) = pm.pmParseInterval(str(opts.duration_arg))
NameError: name 'pm' is not defined

Building on Ubuntu Precise fails on LOGIMPORT.3.gz

Vanilla Ubuntu Precise install with required deps installed.

dh_install --sourcedir=debian/pcp
cp: cannot stat `debian/pcp/usr/share/man/man3/LOGIMPORT.3.gz': No such file or directory
dh_install: cp -a debian/pcp/usr/share/man/man3/LOGIMPORT.3.gz debian/libpcp3-dev//usr/share/man/man3/ returned exit code 1
make: *** [binary-arch] Error 2

I have not figured out why it isn't built yet.

pmval does not print negative values

I modified the acme.c example provided in the Programmer's Guide and here do generate negative numbers.

When reading the values produced, pminfo displays the values correctly but pmval prints ! in place of the negative values.

$ pminfo -f mmv.acme.products.count

mmv.acme.products.count
    inst [0 or "Anvils"] value -1849.6024
    inst [1 or "Rockets"] value -3.6371837e+31
    inst [2 or "Giant_Rubber_Bands"] value -6.3034399e+09

$ pmval mmv.acme.products.count

metric:    mmv.acme.products.count
host:      beaglebone-01
semantics: instantaneous value
units:     byte
samples:   all
full label for instance[0]: Anvils
full label for instance[1]: Rockets
full label for instance[2]: Giant_Rubber_Bands

       Anvils       Rockets Giant_Rubber_
            !     1.194E-05     3.127E-35
            !     2.816E-30     1.712E-17
    4.185E-28        0.8811     1.438E-32

This might be the location in pmval where this might need to be fixed pmval.c#L505

You can see here the changes made to acme.c to print negative numbers.

RFE: Informix PMDA

I remember there being an Informix PMDA included in PCP back when it was an SGI product, has it been removed or was it not open sourced with the rest of PCP?

Multiple network addresses and check-vm

Hi,

I am trying to compile version 3.10.4 from Git. I get the following error during check-vm:

Warning: ... (127.0.1.1) not associated with a network interface
_getnetworkaddr: cannot handle multiple network addresses:
....78.7.203  Bcast:....78.7.255 255.255.252.0
192.168.7.2  Bcast:192.168.7.3 255.255.255.252

I have indeed two network interfaces on the device, but it seems that pmcd could be configured to a specific network interface if multiple interfaces are available. Is this an issue with check-vm?

Also, by looking at the check-vm, it seem that my 255.255.252.0 network mask won't be supported anyway https://github.com/performancecopilot/pcp/blob/master/qa/admin/check-vm#L76

Is this a real problem or check-vm requires just a little fixing? Thanks!

_pm_ispartition() heulistic miss some block devices

In src/pmdas/linux/proc_partitions.c, _pm_ispartition() use heulistic to detect partitions, but this misses some block devices like "sr0", "scd0", "fd0" etc.
I suggest using sysfs. /sys/block/* listing all block devices.

Thanks,

pminfo -t aborts pmcd

Excuse me, but when first and simplest command from manual crashes, it's a bit weird for 20 year old software.

apt-get install pcp on Ubuntu 14.04.2 LTS, pcp package version is 3.8.12ubuntu1

root@n:~# ps axu|grep pmcd
pcp      15018  0.0  0.5  25580 12148 ?        Ssl  10:39   0:00 /usr/lib/pcp/bin/pmcd
root@n:~# pminfo -t
[... lots of output skipped ...]
root@n:~# pminfo -t
pminfo: Cannot connect to PMCD on host "local:": Connection refused
root@n:~# ps axu|grep pmcd
[nothing]
root@n:~# dmesg
[1897410.769797] potentially unexpected fatal signal 6.
[1897410.769803] code at b77afd50: 5d 5a 59 c3 ec f9 ff ff 14 00 00 00 71 00 03 03 
[1897410.769826] CPU: 1 PID: 15018 Comm: pmcd Not tainted 3.16.0-38-generic #52~14.04.1-Ubuntu
[1897410.769830] Hardware name: System manufacturer System Product Name/P5B-VM, BIOS 0405    09/21/2006
[1897410.769834] task: ced65070 ti: cea5c000 task.ti: cea5c000
[1897410.769838] EIP: 0073:[<b77afd50>] EFLAGS: 00200206 CPU: 1
[1897410.769868] EIP is at 0xb77afd50
[1897410.769871] EAX: 00000000 EBX: 00003aaa ECX: 00003aaa EDX: 00000006
[1897410.769874] ESI: b798ac4c EDI: b7725000 EBP: 00000044 ESP: bf818da4
[1897410.769877]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b
[1897410.769879] 

When I do service pcp restart pminfo -t works again, once more. Also, pminfo w/o -t doesn't abort pmcd.

pcp cross-compile

Hi,
I am working on a project for IoT and it seems pcp would fit quite well to it.
I am trying to cross-compile the code for an arm architecture on a linux machine, however on the config phase (./config --host=linux-arm), the script skips the section to set the ps command when it is "checking the ps style".
Since the variable that sets the ps model is not set, the ps style is unknown and the scripts exits.

My target machine has a busybox, and the ps behavior is different from the system I am compiling the code.
Does it make sense to cross compile?
I can also cross compile specific versions of ps, grep, whatever I need, but it is not clear to me if these binaries are being used to the compilation part (on my linux machine) or if they they are used to parse the output on my target machine.

Channel mutex cleanup when destroying host context

Valgrind (on FreeBSD) has shown a channel mutex hanging after a host context destroy. Below are snippets from valgrind output:

[...]
==70693== 80 bytes in 1 blocks are definitely lost in loss record 503 of 587
==70693==    at 0x4C24C90: calloc (in /usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==70693==    by 0x64A86DB: pthread_mutex_init (in /lib/libthr.so.3)
==70693==    by 0x749A02F: __pmInitChannelLock (context.c:319)
==70693==    by 0x749A02F: pmNewContext (context.c:597)
==70693==    by 0x860164B: ???
==70693==    by 0x8601450: ???
==70693==    by 0x400CF3: test0 (testfoo.c:128)
==70693==    by 0x400B43: main (testfoo.c:152)
==70693== 

[...]

I'm attaching a suggested fix (including parts of #61 fix, please ignore it here).
out.txt

pcp tries to send emails for "unresolvable problems"

We've noticed tons of error messages from local sendmail instances because PCP was trying to send some error information via email, to our fake domain. We don't really care about these errors, so it would be good to have the option to completely ignore those (and not send emails) or output them to a log file.

PCP Licensing Scheme Problem?

According to the FAQ at http://www.pcp.io/faq.html#Q1b all of the libraries in PCP should be licensed under โ€œVersion 2.1 of the GNU Lesser General Public Licenseโ€. However upon a close examination of the source code we have discovered that the library sources contains some code that is tagged as GPL.

Our analysis shows that the PCP libraries are clean for LGPL licensing up until (and including) version 3.5.8-1, at which time it appears that code from other components with a GPL license was brought into the library but the license was not changed. They remained as GPL.

We were wondering if you were aware of this issue and wanted to know if there was a way to clean this up. Would you be willing to change the licensing of the newer GPL code in library to LGPL to resolve the issue and maintain the intent of licensing the libraries under LGPL?

(If there is a better forum/contact to discuss this, please let me know. All emails to [email protected] are bouncing)

arc/zpool metric support on linux

The arc and ZFS metrics are burried inside a 'solaris' pmdas but zfs is now available on linux. ZoL exports a similar set of kstat like metrics.

make fails after sudo make install

When compiling version 3.10.3 from source, after running sudo make install, running make fails due to Permission denied. Here are the steps to reproduce:

$ wget ftp://ftp.pcp.io/projects/pcp/download/pcp-3.10.3.src.tar.gz
...
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
$ sudo make install
$ make
...
=== pmieconf ===
gcc -fPIC -fno-strict-aliasing -D_GNU_SOURCE -fstack-protector-all -D_FORTIFY_SOURCE=2 -I../../src/pmie/src -Wall -O2 -g -DPCP_DEBUG -DPCP_VERSION=\"3.10.3\" -I../../src/include -I../../src/include/pcp -o pmieconf  -Wall -L../../src/libpcp/src -L../../src/libpcp_pmda/src   pmieconf.o rules.o io.o     -lpcp  
rm: cannot remove `rules/cpu/load_average': Permission denied
rm: cannot remove `rules/cpu/system': Permission denied
rm: cannot remove `rules/cpu/util': Permission denied
rm: cannot remove `rules/cpu/context_switch': Permission denied
rm: cannot remove `rules/cpu/low_util': Permission denied
rm: cannot remove `rules/global/parameters': Permission denied
rm: cannot remove `rules/global/pcp_actions': Permission denied
rm: cannot remove `rules/pernetif/packets': Permission denied
rm: cannot remove `rules/pernetif/errors': Permission denied
rm: cannot remove `rules/pernetif/util': Permission denied
rm: cannot remove `rules/pernetif/collisions': Permission denied
rm: cannot remove `rules/memory/swap_low': Permission denied
rm: cannot remove `rules/memory/exhausted': Permission denied
rm: cannot remove `rules/filesys/filling': Permission denied
rm: cannot remove `rules/percpu/some_util': Permission denied
rm: cannot remove `rules/percpu/many_util': Permission denied
rm: cannot remove `rules/percpu/system': Permission denied
mkdir: cannot create directory `rules': File exists
make[2]: *** [local] Error 1
make[1]: *** [default_pcp] Error 2
make[1]: Leaving directory `/home/debian/pcp-3.10.3/src'
make: *** [default_pcp] Error 2

I would guess the permissions need to be reset after sudo make install runs.

Documentation on FreeBSD support

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.

Issues with PCP installation during make?

I'm following the latest instructions to building PCP on OS X Yosemite.

$ git clone git://git.pcp.io/pcp
$ cd pcp
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
$ make install 

But when I go to "make" the files, I get this error after some time:

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pmwebd] Error 1
make[1]: *** [default_pcp] Error 2
make: *** [default_pcp] Error 2

I'm sure I've installed all the necessary tools and libraries for the file to install properly. What should I do?

Logging at an instance / cgroup level

Hello All,

I want to see if its possible to log certain things such as memory at an instance level.

Here is the api url
http://host:44323/pmapi/1281741401/_fetch?names=mem.util.cached,mem.util.used,mem.util.free,mem.util.bufmem

i get [-1] in the instance values, is there a way to get it to return with actual instance values?

Here is the response I get back.
{
"pmid": 251659268,
"name": "mem.util.bufmem",
"instances": [{"instance": -1,"value": 225412}]
}

When I run the queryname as containers.state.running,containers.name I get back proper instance and value for all the cgroups, would be beneficial to be able to see other info such as memory and cpu at an cgroup level.

Thanks!

sending snmp based on pmie

Hi ALL,
may i know is there any provision to send SNMP trap based on certain metric value? what i read is in pmie we can use shell to call executable's , apart from that is there any way to achieve the same.

Thanks

Should pcp2graphite run as a service?

Hi,

$subject says it all. I am relying on pcp2graphite to forward metrics to a carbon/graphite instance.
I ended up having to write a pcp2graphite.service systemd unit file to keep it running.

Should pcp provide such init file/systemd unit file (or document the need for it) or maybe we have other options available / in the works (like a "metrics forwarding facility" that can then use pcp2graphite)?

Thanks!

pmchart crash on OSX with certain archive

I've tried this with the latest pmchart (3.10.6), but I get this crash pretty reliably as I scroll around time ranges with a specific archive.

[ app2 ]$ pmchart -z -a 20150807.0
pmchart(13806,0x7fff7e625300) malloc: *** error for object 0x1028caf80: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6```

I'll attach the actual OSX Debug window data as a separate file. The archive I think I'll have to provide externally rather than here.

pmlogger.service missing from .deb after ./Makepkgs

I compiled version 3.10.4 from Git with ./Makepkgs. After installing the .deb files, it seems that the /lib/systemd/system/pmlogger.service file is missing. Here is the error message that I get when installing the .deb files:

$ sudo dpkg -i pcp_3.10.4_armhf.deb libpcp-gui2_3.10.4_armhf.deb libpcp-mmv1_3.10.4_armhf.deb libpcp-pmda3_3.10.4_armhf.deb libpcp-trace2_3.10.4_armhf.deb libpcp3_3.10.4_armhf.deb libpcp-pmda-perl_3.10.4_armhf.deb python-pcp_3.10.4_armhf.deb pcp-conf_3.10.4_armhf.deb libpcp-import1_3.10.4_armhf.deb 
Selecting previously unselected package pcp.
(Reading database ... 61382 files and directories currently installed.)
Unpacking pcp (from pcp_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-gui2.
Unpacking libpcp-gui2 (from libpcp-gui2_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-mmv1.
Unpacking libpcp-mmv1 (from libpcp-mmv1_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-pmda3.
Unpacking libpcp-pmda3 (from libpcp-pmda3_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-trace2.
Unpacking libpcp-trace2 (from libpcp-trace2_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp3.
Unpacking libpcp3 (from libpcp3_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-pmda-perl.
Unpacking libpcp-pmda-perl (from libpcp-pmda-perl_3.10.4_armhf.deb) ...
Selecting previously unselected package python-pcp.
Unpacking python-pcp (from python-pcp_3.10.4_armhf.deb) ...
Selecting previously unselected package pcp-conf.
Unpacking pcp-conf (from pcp-conf_3.10.4_armhf.deb) ...
Selecting previously unselected package libpcp-import1.
Unpacking libpcp-import1 (from libpcp-import1_3.10.4_armhf.deb) ...
Setting up pcp-conf (3.10.4) ...
Setting up libpcp3 (3.10.4) ...
Setting up libpcp-import1 (3.10.4) ...
Setting up libpcp-gui2 (3.10.4) ...
Setting up libpcp-mmv1 (3.10.4) ...
Setting up libpcp-pmda3 (3.10.4) ...
Setting up libpcp-trace2 (3.10.4) ...
Setting up libpcp-pmda-perl (3.10.4) ...
Setting up python-pcp (3.10.4) ...
Processing triggers for man-db ...
Setting up pcp (3.10.4) ...
Rebuilding PMNS ... 
Starting pmcd ... 
Failed to issue method call: No such file or directory
/etc/init.d/pmlogger: Warning: Performance Co-Pilot archive logger(s) not permanently enabled.
    To enable pmlogger, run the following as root:
    # /bin/systemctl enable pmlogger.service
Starting pmlogger ... 
Processing triggers for desktop-file-utils ...

Here are all the pmlogger files that show up in the system:

$ locate pmlogger
/etc/cron.d/pcp-pmlogger
/etc/init.d/pmlogger
/etc/pcp/pmlogger
/etc/pcp/pmlogger/control
/etc/rc0.d/K01pmlogger
/etc/rc1.d/K01pmlogger
/etc/rc2.d/S03pmlogger
/etc/rc3.d/S03pmlogger
/etc/rc4.d/S03pmlogger
/etc/rc5.d/S03pmlogger
/etc/rc6.d/K01pmlogger
/usr/bin/pmlogger
/usr/lib/pcp/bin/pmlogger
/usr/lib/pcp/bin/pmlogger_check
/usr/lib/pcp/bin/pmlogger_daily
/usr/lib/pcp/bin/pmlogger_merge
/usr/share/man/man1/pmlogger.1.gz
/usr/share/man/man1/pmlogger_check.1.gz
/usr/share/man/man1/pmlogger_daily.1.gz
/usr/share/man/man1/pmlogger_merge.1.gz
/usr/share/pcp/demos/pmclient/pmlogger.config
/var/lib/pcp/config/pmlogger
/var/lib/pcp/config/pmlogger/config.default
/var/lib/pcp/config/pmlogger/config.pmstat
/var/lib/pcp/tmp/pmlogger
/var/lib/pcp/tmp/pmlogger/24522
/var/lib/pcp/tmp/pmlogger/primary
/var/log/pcp/pmlogger
/var/log/pcp/pmlogger/beaglebone
/var/log/pcp/pmlogger/beaglebone/20150421.21.03.0
/var/log/pcp/pmlogger/beaglebone/20150421.21.03.index
/var/log/pcp/pmlogger/beaglebone/20150421.21.03.meta
/var/log/pcp/pmlogger/beaglebone/Latest
/var/log/pcp/pmlogger/beaglebone/pmlogger.log

Here are all the pmlogger related files contained in all the .deb files generated:

 for f in *.deb; do dpkg -c $f; done | grep pmlogger
-rwxr-xr-x root/root     21911 2015-04-21 19:03 ./usr/lib/pcp/bin/pmlogger_check
-rwxr-xr-x root/root      5929 2015-04-21 19:03 ./usr/lib/pcp/bin/pmlogger_merge
-rwxr-xr-x root/root     23362 2015-04-21 19:03 ./usr/lib/pcp/bin/pmlogger_daily
-rwxr-xr-x root/root     80096 2015-04-21 19:09 ./usr/bin/pmlogger
-rw-r--r-- root/root       306 2015-04-21 19:02 ./usr/share/pcp/demos/pmclient/pmlogger.config
-rw-r--r-- root/root      7208 2015-04-21 19:05 ./usr/share/man/man1/pmlogger.1.gz
-rw-r--r-- root/root      5092 2015-04-21 19:05 ./usr/share/man/man1/pmlogger_check.1.gz
drwxrwxr-x root/root         0 2015-04-21 19:03 ./var/lib/pcp/tmp/pmlogger/
drwxr-xr-x root/root         0 2015-04-21 19:03 ./var/lib/pcp/config/pmlogger/
-rw-r--r-- root/root       560 2015-04-21 19:03 ./var/lib/pcp/config/pmlogger/config.pmstat
drwxr-xr-x root/root         0 2015-04-21 19:03 ./var/log/pcp/pmlogger/
-rwxr-xr-x root/root      7642 2015-04-21 19:03 ./etc/init.d/pmlogger
drwxr-xr-x root/root         0 2015-04-21 19:03 ./etc/pcp/pmlogger/
-rw-r--r-- root/root      1700 2015-04-21 19:03 ./etc/pcp/pmlogger/control
-rw-r--r-- root/root       355 2015-04-21 19:03 ./etc/cron.d/pcp-pmlogger
lrwxrwxrwx root/root         0 2015-04-21 19:08 ./usr/lib/pcp/bin/pmlogger -> ../../../bin/pmlogger
lrwxrwxrwx root/root         0 2015-04-21 19:08 ./usr/share/man/man1/pmlogger_daily.1.gz -> pmlogger_check.1.gz
lrwxrwxrwx root/root         0 2015-04-21 19:08 ./usr/share/man/man1/pmlogger_merge.1.gz -> pmlogger_check.1.gz
-rw-r--r-- root/root     11342 2015-04-21 19:06 ./usr/share/doc/pcp-doc/html/lab.pmlogger.html
-rw-r--r-- root/root         0 2015-04-21 19:03 ./etc/pcp/pmmgr/pmlogger

Finally, the file seems to be present in the build directory:

build/deb/pcp-3.10.4/src/pmlogger/pmlogger.service
build/deb/pcp-3.10.4/src/pmlogger/pmlogger.service.in

So, somehow this file eludes the .deb files. Thanks!

chown: invalid user: `pcp:pcp'

I get a chown: invalid user: pcp:pcp error when running make install for version 3.10.3. Here is the sequence of steps:

$ wget ftp://ftp.pcp.io/projects/pcp/download/pcp-3.10.3.src.tar.gz
...
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
$ sudo make install
...
make[1]: Leaving directory `/home/debian/pcp-3.10.3/debian'
# install the common directories _once_
./install-sh -o root -g root -m 755 -d /var/lib/pcp
./install-sh -o root -g root -m 755 -d /usr/share/pcp
./install-sh -o root -g root -m 775 -o pcp -g pcp -d /var/lib/pcp/tmp
chown: invalid user: `pcp:pcp'
make: *** [install_pcp] Error 1

More info about the host:

$ cat /etc/issue
Debian GNU/Linux 7 \n \l
$ uname -a
Linux beaglebone-01 3.8.13-bone56 #1 SMP Wed Jun 4 23:59:23 UTC 2014 armv7l GNU/Linux

pmie and pminfo

for a metric disk.dev.total, using pmino -f disk.dev.total the value got is
disk.dev.total
inst [0 or "sda"] value 3902261

when we execute :/var/lib/pcp/config/pmie$ pmie -c test.disk

sh: 2: disk.dev.total 6.1

test.disk has following content
disk.dev.total > 1
-> shell 1 mins "echo
'disk.dev.total %v'";

my question is does the value of pminfo 3902261 and value of pmie 6.1 should be same ? since both gives same metric's value. Please correct me if am wrong.

Thanks in advance.

pmchart on OSX doesn't work properly from App launcher - works fine from terminal

Registering this because I think my email a long time ago got lost somehow.

Latest OSX build 3.10.9, if I launch pmchart using the OSX application icon, I can't connect to anything properly. It works fine if I launch it from the Terminal though.

What appears to be happening is that pmtime is not launching at the same time as pmchart. If I run the command pmchart from the terminal, then up pmtime comes, and everything is dandy.

If I try and launch pmtime manually ahead of the GUI launch of pmchart it still doesn't work. I get a model window with Cannot get pmtime to show itself message.

While we have a workaround to use the Terminal, this is not ideal for anyone using OSX as for many users they will prefer to work with the GUI app launcher.

Compiling from source on Ubuntu 14.04 leaves no pmwebd binary

Hello all,

I'm unsure what's needed to reproduce this issue. I've been trying to set up Netflix's Vector tool and I installed pcp from source onto a 14.04 server. When I look at /usr/libexec/pcp/bin, I see no pmwebd binary and this is confirmed when I try to start the service by running:

sudo /etc/init.d/pmwebd start && sudo /etc/init.d/pmwebd status
Checking for pmwebd: stopped

make and make install seem to succeed and when I pipe the output of either into grep, I get the following message:

sudo make install | grep -A 5 -B 5 pmweb
make[2]: Nothing to be done for `default_pcp'.
=== pmwebapi ===

Let me know what other output I need to add. I installed libmicrohttpd10, libmicrohttpd-dev, bison, flex and autoconf.

Thanks

OSX El Capitan PCP Installation failure

I upgraded my OSX to the latest El Capitan release, noticed pmchart was no longer on the path, so tried to just reinstall it, but it failed.

I've attached the full install log, I suspect permissions of some PCP directories have been borked by some part of the El Capitan upgrade.

I'll see if I can work out a hack to fix it, but it may need some changes to the PCP installer ?

Would be nice not to run pmcpp for PM_CONTEXT_LOCAL

Creating a PM_CONTEXT_LOCAL will run pmcpp. This raises some eyebrows, especially since pmcpp is not usually packaged together with libpcp.

For example, the Cockpit unit tests use their own mock pmda and nothing else (no daemon, no other pmda, etc). But they still need the pmcpp binary from a full PCP installation.

pmwebd binaries and init scripts missing from Solaris 11 package

Just downloaded and installed provided binaries for PCP 3.10.8 for Solaris 11.
Although the SMF entry for pmwebd exists:

# svcs '*pmwebd*'
STATE          STIME    FMRI
disabled       Dec_12   svc:/application/pcp/pmwebd:default

The service fails to start because the pmwebd binary and init files are not included in the package:

[ Dec 12 15:43:17 Method "start" exited with status 127. ]
[ Dec 12 15:43:17 Executing start method ("/etc/init.d/pmwebd start"). ]
/sbin/sh[1]: exec: /etc/init.d/pmwebd: not found
[ Dec 12 15:43:17 Method "start" exited with status 127. ]

I'm not sure if this is deliberate or a bug.

Homebrew installation for PCP

I've been thinking that a nice way to get PCP in the hands of OSX users would be to have a Homebrew formula added:

http://brew.sh/

This package utility is a common place for open source utilities to be installed in OSX, I and many others use it to install and keep up to date things like git, wireshark etc.

To accomplish this it should be very straight forward, here's an example of a Formula:

https://github.com/Homebrew/homebrew/blob/master/Library/Formula/etl.rb

I'd like to have a go at this, but first I think I'll need to understand how to build PCP for OSX locally, and then understand enough of the build configuration so that I can get PCP installed in the usual Homebrew locations.

Having said that someone who knows more about building PCP, particularly on OSX, may be better at doing this..

Appendix:

Anyway, thought I'd register this as an issue/idea/enhancement.

Cannot build on FreeBSD 11-CURRENT

When building on a not so old 11-CURRENT, I'm getting this:

cc -fPIC -fno-strict-aliasing -D_GNU_SOURCE -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -Wall -O2 -g -DPCP_DEBUG -DPCP_VERSION=\"3.11.0\" -I../../../src/include -I../../../src/include/pcp   -c -o netif.o netif.c
netif.c:148:35: error: no member named 'if_data' in 'struct ifnet'
                    atom->ul = (__uint32_t)ifp->if_data.ifi_mtu;
                                           ~~~  ^
netif.c:156:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_baudrate;
                                ~~~  ^
netif.c:160:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ibytes;
                                ~~~  ^
netif.c:164:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ipackets;
                                ~~~  ^
netif.c:168:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_imcasts;
                                ~~~  ^
netif.c:172:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ierrors;
                                ~~~  ^
netif.c:176:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_iqdrops;
                                ~~~  ^
netif.c:180:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_obytes;
                                ~~~  ^
netif.c:184:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_opackets;
                                ~~~  ^
netif.c:188:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_omcasts;
                                ~~~  ^
netif.c:192:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_oerrors;
                                ~~~  ^
netif.c:196:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_collisions;
                                ~~~  ^
netif.c:200:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ibytes + ifp->if_data.ifi_obytes;
                                ~~~  ^
netif.c:200:50: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ibytes + ifp->if_data.ifi_obytes;
                                                          ~~~  ^
netif.c:204:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ipackets + ifp->if_data.ifi_opackets;
                                ~~~  ^
netif.c:204:52: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ipackets + ifp->if_data.ifi_opackets;
                                                            ~~~  ^
netif.c:208:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_imcasts + ifp->if_data.ifi_omcasts;
                                ~~~  ^
netif.c:208:51: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_imcasts + ifp->if_data.ifi_omcasts;
                                                           ~~~  ^
netif.c:212:24: error: no member named 'if_data' in 'struct ifnet'
                    atom->ull = ifp->if_data.ifi_ierrors + ifp->if_data.ifi_oerrors;
                                ~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
<builtin>: recipe for target 'netif.o' failed
gmake: *** [netif.o] Error 1

After some digging into it, looks like FreeBSD's kvm(3) was used, directly interpreting kernel memory structures. The interface turns out to be quite unstable. I would suggest to re-implement it using getifaddrs(3) API. The attached patch worked for me.
out.txt

Build issue qa-notes.txt

when building using Makepkgs script, the build is exited with exit 1.

Message:

Installed (but unpackaged) file(s) found: /usr/share/pcp/webapps/qa-notes.txt

pmie value's taken

Hi ALL,
Regarding pmie , May i know the value of metric is taken for consideration, what i read is metric's average value is taken. if so how to take current/recent value for that metric.

Regards,
Prem

pmatop crashes when it encounters pid >= 1000000

When kernel.pid_max is set to a high value (> 1000000) and a process with pid >= 1000000 appears, pmatop segfaults with the following stack.
#0 __strncpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:296
#1 0x000000000040bb69 in strncpy (__len=255, __src=, __dest=0x7f94cda7ceb8 "") at /usr/include/bits/string3.h:120
#2 update_task (dp=0x62cdc0 <descs.9608>, rp=0x1acde20, name=, pid=1033589, task=0x7f94cda7ce60) at photoproc.c:32
#3 photoproc (tasks=, taskslen=) at photoproc.c:152
#4 0x0000000000402e6e in main (argc=, argv=) at atop.c:577

potential memory leaks in pmdaproc?

Hi,

I'm using PCP to fetch processes info at 1 second interval. My PCP monitor (same host) is in Python using PMAPI (pmFetch). It worked well except I've noticed the RSS of pmdaproc process has increased from 944K to 5Mb in 4 days period. Is there a potential memory leaks in pmdaproc or I missed something? Thanks for your helps.

/proc/pmdaproc_pid/smaps: (heap size increases by 4 bytes every few seconds)
02416000-028c8000 rw-p 00000000 00:00 0 [heap]
Size: 4808 kB
Rss: 4732 kB
Pss: 4732 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 4732 kB
Referenced: 4732 kB
Anonymous: 4732 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB

pmtime needs to have AppNap disabled on OSX

PCP on OSX once install shows choppy pmcharts on Laptops, even when plugged into power, because the OSX AppNap feature which is enabled by default seems to want to sleep the pmtime process periodically.

I used to be able to use the "Get Info" action on the pmtime application bundle and disable AppNap, but in OSX Yosemite it doesn't seem to be there any more.

Ideally as part of the OSX packaging, the pmtime/pmchart are effectively marked correctly to disable AppNap.

RFE: dmthin pmie example

dmthin pools' monitoring by pmie would be normal story.
I hope dmthin monitoring pmie example.

I wrote following pmie script, but I'm not familiar to pmie manner, yet.
Please review and include into examples if it is applicable.

delta = 10 min;
threshold_data = 90;
threshold_metadata = 80;

some_host (
  some_inst (
    100 * dmthin.pool.data.used / dmthin.pool.data.total > $threshold_data
  ) 
) -> print "dmthin pool data %v%used [%i]@%h";

some_host (
  some_inst (
    100 * dmthin.pool.metadata.used / dmthin.pool.metadata.total > $threshold_metadata
  ) 
) -> print "dmthin pool metadata %v%used [%i]@%h";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.