dpdkstat: rework
1) Declaring int i = 0 in for loop
2) Removed -fPIC flag
3) Fixed indentation
4) Changed true and false to yes and no
5) Fixed empty var issue when --with-libdpdk=yes
6) Changed DPDK_LIB to DPDK_EXTRA_LIB (typo)
7) Removed dead code & FOUND_DPDK after AC_MSG_ERROR
8) Changed AC_CHECK_FILE to AC_CHECK_HEADER
9) Restructured DPDK part of configure.ac
10) Add comment explaining no-as-needed flag.
11) Added new if_* types to types.db
12) Updated type & type inst. selection for xstats
Change-Id: I7fb48852d8d0b94b4c67f204f1b1b430681e4509
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
1) Declaring int i = 0 in for loop
2) Removed -fPIC flag
3) Fixed indentation
4) Changed true and false to yes and no
5) Fixed empty var issue when --with-libdpdk=yes
6) Changed DPDK_LIB to DPDK_EXTRA_LIB (typo)
7) Removed dead code & FOUND_DPDK after AC_MSG_ERROR
8) Changed AC_CHECK_FILE to AC_CHECK_HEADER
9) Restructured DPDK part of configure.ac
10) Add comment explaining no-as-needed flag.
11) Added new if_* types to types.db
12) Updated type & type inst. selection for xstats
Change-Id: I7fb48852d8d0b94b4c67f204f1b1b430681e4509
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
dpdkstat: remove redundant types in types.db
We are not using them; we are using counter and
the "types" are, in fact, type instances.
Change-Id: Iaec23f730a3cdb544fe7393c3fb103c9f6258913
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
We are not using them; we are using counter and
the "types" are, in fact, type instances.
Change-Id: Iaec23f730a3cdb544fe7393c3fb103c9f6258913
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
dpdkstat: README instructions for DPDK static lib
Updated README with instructions on how to build and link to the static
DPDK library for dpdk plugins.
Change-Id: I580cccc8af648c270c5a35689dc536a283f1689a
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Updated README with instructions on how to build and link to the static
DPDK library for dpdk plugins.
Change-Id: I580cccc8af648c270c5a35689dc536a283f1689a
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Modify DPDK CFLAGS
The failed compile when there are no additional
flags on Ub14.04 is specific to GCC 4.8 and below.
This can be fixed by installing GCC 4.9, or
alternately by adding -mssse3 or newer ISA flag.
The opensource community have requested that we
simply document the GCC version requirement,
rather than adding GCC ISA flags to configure.ac
Change-Id: I8ec7bd3f094b0dd608381068fd6b18a74050d420
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
The failed compile when there are no additional
flags on Ub14.04 is specific to GCC 4.8 and below.
This can be fixed by installing GCC 4.9, or
alternately by adding -mssse3 or newer ISA flag.
The opensource community have requested that we
simply document the GCC version requirement,
rather than adding GCC ISA flags to configure.ac
Change-Id: I8ec7bd3f094b0dd608381068fd6b18a74050d420
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Fixing configure.ac to reflect changes in collectd
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Added ASLR info to README
Applied an old version the last time; reverted and reapplying new
version.
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Applied an old version the last time; reverted and reapplying new
version.
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Interface name and number of ports enabled can now be customised
Using the .conf files
They are optional arguments
Change-Id: Icc8dd0933f98c3ba05cc6bc3f338070d38b06a05
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
Using the .conf files
They are optional arguments
Change-Id: Icc8dd0933f98c3ba05cc6bc3f338070d38b06a05
Signed-off-by: Kim Jones <kim-marie.jones@intel.com>
dpdkstat: refactored pipe error checking
This commit cleans up and fixes the pipe creation, and improves the
error checking.
Change-Id: I53de4a7ff450aea349971f58fe5cce8904da1e89
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit cleans up and fixes the pipe creation, and improves the
error checking.
Change-Id: I53de4a7ff450aea349971f58fe5cce8904da1e89
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
configure: check AVX support
Check AVX support before adding -mavx flag.
Change-Id: I2de2a12704126590ef991de89880ad5bd5c3805e
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Check AVX support before adding -mavx flag.
Change-Id: I2de2a12704126590ef991de89880ad5bd5c3805e
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: configuration improvements
Cleanup detection and configuration for dpdkstat to include:
* -mavx flag which is need for compilation on Ubuntu 14.04.
* Simplification of code to detect DPDK library.
* Support for DPDK not being installed in /usr/lib.
Change-Id: I2767797f1928934a8545a602b8af92c9decf24d3
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Cleanup detection and configuration for dpdkstat to include:
* -mavx flag which is need for compilation on Ubuntu 14.04.
* Simplification of code to detect DPDK library.
* Support for DPDK not being installed in /usr/lib.
Change-Id: I2767797f1928934a8545a602b8af92c9decf24d3
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: cleanup of code
Cleaned up code to ensure appropriate spacing and moved integer declarations
out of loops as it's not supported out of box on C99 compilers.
Change-Id: Ia420fcb5e0a5ce9110fcdc7cc09aaa01c2b86771
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Cleaned up code to ensure appropriate spacing and moved integer declarations
out of loops as it's not supported out of box on C99 compilers.
Change-Id: Ia420fcb5e0a5ce9110fcdc7cc09aaa01c2b86771
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: fix missed rework
Update README to refer to libdpdk instead of dpdk. Update the
declaration of dpdk_init to remove whitespace.
Change-Id: Ib2b02929bf7ab164fc97a84da1dbb0c7d77a2080
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Update README to refer to libdpdk instead of dpdk. Update the
declaration of dpdk_init to remove whitespace.
Change-Id: Ib2b02929bf7ab164fc97a84da1dbb0c7d77a2080
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: rebase against latest master
Change-Id: I2528cd3cae66a0d2ded0950fec9a529545b75c81
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Change-Id: I2528cd3cae66a0d2ded0950fec9a529545b75c81
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: fix configure.ac and src/Makefile
Fix configuration.ac and src/Makefile based on comments from pull
request review.
* Removed unnecessary libs.
* Removed unnecessary compilation flags.
* Fixed indentation in configure.ac
* Remove duplicate AC_CHECK_LIB check.
* Compare FOUND_DPDK with xtrue explicitly.
* Change standalone instances of dpdk to libdpdk.
* Add BUILD_WITH_DPDK_LIBS to dpdkstat_la_LIBADD.
Change-Id: I27b0c888f81cac3219fdc97174e31770dbd5e746
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Fix configuration.ac and src/Makefile based on comments from pull
request review.
* Removed unnecessary libs.
* Removed unnecessary compilation flags.
* Fixed indentation in configure.ac
* Remove duplicate AC_CHECK_LIB check.
* Compare FOUND_DPDK with xtrue explicitly.
* Change standalone instances of dpdk to libdpdk.
* Add BUILD_WITH_DPDK_LIBS to dpdkstat_la_LIBADD.
Change-Id: I27b0c888f81cac3219fdc97174e31770dbd5e746
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: fix typo in collectd.conf.pod
Fix typo in collectd.conf.pod.
Change-Id: I0de9582c0a3f2731194b73c85aa83a1e6bdc9aec
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Fix typo in collectd.conf.pod.
Change-Id: I0de9582c0a3f2731194b73c85aa83a1e6bdc9aec
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: fix compilation errors
Fix compilation errors for dpdkstat.
Change-Id: I5f20219344f36a12d4a60f2bad6ce8228e3e992e
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Fix compilation errors for dpdkstat.
Change-Id: I5f20219344f36a12d4a60f2bad6ce8228e3e992e
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
README: update to include min version of DPDK
Update the readme to include the minimum version of DPDK required for
the dpdkstat plugin.
Change-Id: I51ca20284d90586e24bb9711de0b40d4027ca367
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Update the readme to include the minimum version of DPDK required for
the dpdkstat plugin.
Change-Id: I51ca20284d90586e24bb9711de0b40d4027ca367
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
types.db: fix alignment for dpdkstats
Change-Id: I00173c9a07a288a4aca5912687627b8f62d64f65
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Change-Id: I00173c9a07a288a4aca5912687627b8f62d64f65
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
v2: dpdkstat: fixed issues from github review
v2: fixed indentation of part
This commit fixes all code issues in dpdkstat.c
Mostly error handling, and some minor nit-picks.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
v2: fixed indentation of part
This commit fixes all code issues in dpdkstat.c
Mostly error handling, and some minor nit-picks.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
dpdkstat: rebased + fixed alignment in types.db
Rebased against the latest master and cleaned up alignment in types.db.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Rebased against the latest master and cleaned up alignment in types.db.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
readme: update to include DPDK.
Include DPDK as part of the README features.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Include DPDK as part of the README features.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: bugfix missed enabled_port_count
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Harry Van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Harry Van Haaren <harry.van.haaren@intel.com>
dpdkstat: convert snprintf uses to ssnprintf
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: bugfix enable_port_count
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
dpdkstat: fix configuration without DPDK
Modify the configuration in the situation where DPDK is not selected as
an option.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Modify the configuration in the situation where DPDK is not selected as
an option.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
dpdkstat: enable a plugin for DPDK stats
This patch enables support to retrieve statistics for DPDK
interfaces. An overview of the threading is as follows:
1. collectd init() or read() calls dpdk_helper_spawn() to retrieve
the required size of xstats to allocate.
1.1. DPDK counts ports, stats and length, writing them to
shared-memory (SHM).
1.2. DPDK helper (secondary) process quits, allowing cleanup of
the shared memory.
2. collectd resizes shared-memory to size of stats as provided by
DPDK.
3. collectd respawns the DPDK helper.
3.1. Helper blocks on a semaphore until told to read the stats
from DPDK and write them to SHM.
4. collectd dispatches statistics
4.1. Thread blocks on semaphore until stats are available.
This threading model is required to allow the plugin to detect when
the DPDK primary process/application has been killed/reset, and to avoid
the plugin from stopping another DPDK primary process from starting.
Some extra housekeeping is in place to ensure collectd is never
stalled by using sem_timedwait() with a timeout. If collectd dies, the
helper process will automatically quit after a timeout, as it detects
its ppid has changed.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
This patch enables support to retrieve statistics for DPDK
interfaces. An overview of the threading is as follows:
1. collectd init() or read() calls dpdk_helper_spawn() to retrieve
the required size of xstats to allocate.
1.1. DPDK counts ports, stats and length, writing them to
shared-memory (SHM).
1.2. DPDK helper (secondary) process quits, allowing cleanup of
the shared memory.
2. collectd resizes shared-memory to size of stats as provided by
DPDK.
3. collectd respawns the DPDK helper.
3.1. Helper blocks on a semaphore until told to read the stats
from DPDK and write them to SHM.
4. collectd dispatches statistics
4.1. Thread blocks on semaphore until stats are available.
This threading model is required to allow the plugin to detect when
the DPDK primary process/application has been killed/reset, and to avoid
the plugin from stopping another DPDK primary process from starting.
Some extra housekeeping is in place to ensure collectd is never
stalled by using sem_timedwait() with a timeout. If collectd dies, the
helper process will automatically quit after a timeout, as it detects
its ppid has changed.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Merge remote-tracking branch 'github/pr/1814'
empty_counter match: Code cleanup.
empty_counter match: Add support for the DERIVE data source type.
Fixes: #1813
Fixes: #1813
varnish plugin: Add informative warnings to the config handling.
Not all config options are valid for all versions of Varnish. Rather
than removing the if-clause altogether, which results in a "Ignoring
unknown configuration option" warning, print a user-friendly warning
instead.
Fixes: #1790
Not all config options are valid for all versions of Varnish. Rather
than removing the if-clause altogether, which results in a "Ignoring
unknown configuration option" warning, print a user-friendly warning
instead.
Fixes: #1790
Merge pull request #1806 from rubenk/network-plugin-size_t
network plugin: use size_t for length and offsets
network plugin: use size_t for length and offsets
write_http: fix warning in new kairos support
Found by LLVM:
comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long')
Found by LLVM:
comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long')
write_http: remove superfluous braces
Merge pull request #1809 from beorn-/write_http_kairosdb_format_master
Add KAIROSDB format to write_http plugin
Add KAIROSDB format to write_http plugin
Add KAIROSDB format to write_http plugin
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Conflicts:
ChangeLog
contrib/redhat/collectd.spec
version-gen.sh
Conflicts:
ChangeLog
contrib/redhat/collectd.spec
version-gen.sh
Merge pull request #1804 from rubenk/madwifi-fix-buffer-overflow
madwifi plugin: fix buffer overflows
madwifi plugin: fix buffer overflows
metadata: add comment about metadata functions use and threads safety
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Bump spec file to 5.4.3
Update spec file to 5.5.2
Merge pull request #1807 from matteocontrini/master
Added 'operations_per_second' (redis) type
Added 'operations_per_second' (redis) type
Bump version to 5.4.3; Update ChangeLog.
network plugin: Fix error message for GCRYCTL_INIT_SECMEM failure.
Merge branch 'collectd-5.5'
ChangeLog: Add note about #1665.
Added 'operations_per_second' (redis) type
Bump version to 5.5.2; Update ChangeLog.
Merge branch 'collectd-5.4' into collectd-5.5
network plugin, libcollectdclient: Check return value of gcry_control().
Fixes: #1665
Fixes: #1665
libcollectdclient: fix compiler warning on Solaris
CC libcollectdclient_la-client.lo
"client.c", line 1104: argument #4 is incompatible with prototype:
prototype: pointer to function(pointer to const void, pointer to const void) returning int : "/usr/include/iso/stdlib_iso.h", line 134
argument : pointer to void
CC libcollectdclient_la-client.lo
"client.c", line 1104: argument #4 is incompatible with prototype:
prototype: pointer to function(pointer to const void, pointer to const void) returning int : "/usr/include/iso/stdlib_iso.h", line 134
argument : pointer to void
utils_cache_mock: fix annotations
It's __attribute__, not __attribute
Found with Solaris lint.
It's __attribute__, not __attribute
Found with Solaris lint.
configure.ac: fix empty else on RHEL5
Ancient autoconf versions don't like empty
strings in m4 arguments.
Ancient autoconf versions don't like empty
strings in m4 arguments.
Fix build when hal is not installed
treewide: fix invocation of c_avl_create
Fixes the following warning on Solaris:
|c_avl_tree_t *c_avl_create (int (*compare) (const void *, const
void *));
| ^ line 54, utils_avltree.h
| included in line 34, utils_vl_lookup.c
|
| obj->by_type_tree = c_avl_create ((void *) strcmp);
| ^ line 567,
utils_vl_lookup.c
E_ARG_INCOMPATIBLE_WITH_ARG_L, argument #1 is incompatible with
prototype:
prototype: pointer to function(pointer to const void, pointer to
const void) returning int : "src/daemon/utils_avltree.h", line 54
argument : pointer to void
I'll look into writing a generic function to compare avl keys so
we don't need to do all the casting.
Fixes the following warning on Solaris:
|c_avl_tree_t *c_avl_create (int (*compare) (const void *, const
void *));
| ^ line 54, utils_avltree.h
| included in line 34, utils_vl_lookup.c
|
| obj->by_type_tree = c_avl_create ((void *) strcmp);
| ^ line 567,
utils_vl_lookup.c
E_ARG_INCOMPATIBLE_WITH_ARG_L, argument #1 is incompatible with
prototype:
prototype: pointer to function(pointer to const void, pointer to
const void) returning int : "src/daemon/utils_avltree.h", line 54
argument : pointer to void
I'll look into writing a generic function to compare avl keys so
we don't need to do all the casting.
email plugin: fix lint warnings
set but not used in function
(468) err in open_connection
(574) err in email_init
set but not used in function
(468) err in open_connection
(574) err in email_init
utils_llist.c: remove unneccesary include
write_kafka plugin: remove unneccesary includes
threshold plugin: remove unneccesary include
mqtt plugin: remove unused include
battery plugin: remove unused include
memcachec plugin: correct error message
curl plugin: correct error message
modbus plugin: unsigned value can't be negative
collectd-tg: remove dead code
fscache plugin: unsigned value can't be negative
configure.ac: always use pkg-config to detect hal
Hal needs dbus, but we need pkg-config to tell us that.
Now that pkg-config is not optional anymore, rewrite the
check to always use it. Also add a check for the header.
Fixes building the uuid plugin on Solaris 11.3
Hal needs dbus, but we need pkg-config to tell us that.
Now that pkg-config is not optional anymore, rewrite the
check to always use it. Also add a check for the header.
Fixes building the uuid plugin on Solaris 11.3
ganglia plugin: unsigned value can't be negative
treewide: remove unused includes
network plugin: use size_t for length and offsets
Ignore lint files
apache plugin: fix compiler warning on Solaris
memcached plugin: fix compiler warning on Solaris
| ud.free_func = (void *) memcached_free;
| ^ line 559, memcached.c
assignment type mismatch:
pointer to function(pointer to void) returning void "=" pointer to void
Casting a function pointer to a void pointer is undefined behaviour
in C (it is defined in POSIX however)
| ud.free_func = (void *) memcached_free;
| ^ line 559, memcached.c
assignment type mismatch:
pointer to function(pointer to void) returning void "=" pointer to void
Casting a function pointer to a void pointer is undefined behaviour
in C (it is defined in POSIX however)
mysql plugin: remove unneccesary cast
network plugin: unsigned variables can't be negative
utils_dns.c: unsigned variable can't be negative
utils_dns.c: fix strange linebreak
rrdtool plugin: unsigned value can't be negative
ted plugin: 0xAA doesn't fit in a signed char
openldap plugin: rc is only used once
interface plugin: val is only used once
Make chrony compile with Solaris Studio compiler
Ideally we'll have autoconf checks for supported attributes,
will look into that later.
Ideally we'll have autoconf checks for supported attributes,
will look into that later.
utils_dns.c: remove dead code
zone plugin: remove unused code
collectctl: remove dead code
teamspeak plugin: fix indentation
madwifi plugin: fix buffer overflows
curl_xml plugin: fix indentation
utils_curl_stats.c: fix order of calloc arguments
libcollectdclient: remove unneccesary cast
processes plugin: fix indentation
log_logstash plugin: fix indentation
curl_json plugin: fix indentation
conntrack plugin: fix indentation
utils_cmd_putval.c: fix indentation
utils_threshold.c: fix indentation
collectd.h: guard define of __attribute__
It might have already been defined to a no-op in <sys/cdefs.h>
It might have already been defined to a no-op in <sys/cdefs.h>
collectd.h: remove unused defines