Commit Graph

20 Commits

Author SHA1 Message Date
Christine Caulfield
f6f6f41a87 cpghum: Allow to continue if corosync is restarted
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2021-10-25 11:41:34 +02:00
Jan Friesse
ee38d93cc7 cpghum: Remove unused time variables and functions
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2019-11-28 09:44:44 +01:00
Jan Friesse
5731af2782 logging: Add CS_PRI_NODE_ID and CS_PRI_RING_ID
Previously node id was logged ether as a %d (most often), %u, %x or
PRI.32 and ring id ether as %lld, %llx with various separators (., :, /)
between rep nodeid and seq. This seems to cause confusion.

This patch adds macros CS_PRI_NODE_ID, CS_PRI_RING_ID and
CS_PRI_RING_ID_SEQ (CS prefix = corosync, PRI modeled in spirit of
inttypes.h PRIx32) and makes code use them.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2019-07-03 10:53:52 +02:00
Jan Friesse
055add9147 cpghum: Check cpg_local_get return code
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2018-11-29 17:49:55 +01:00
Jan Friesse
0a9c3be5ad cpghum: Mark print/log functions with printf attr
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2017-11-08 09:09:44 +01:00
Chrissie Caulfield
93d48c8cc6 cpghum: Add options to change flood start/mult/end sizes (#237)
I ran out of sensible short options for cpghum so added some long
ones to cope with them.

Also added is the ability to specify most size values in a sensible format
eg 64M for 64 Megabytes or 48K for 48 Kilobytes.

Strictly those are MiB and KiB of course, but I'm old-fashioned.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-08-11 15:28:02 +01:00
Christine Caulfield
efef3a90e3 cpghum: remove space after delimiter
machine-readable stats do not need extra spaces!

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-05-25 15:55:17 +02:00
Christine Caulfield
57c4086fff cpghum: Add interim RTT to cpghum
when -f is selected the interim stats show the RTTs for that
size of packet.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-05-25 15:54:48 +02:00
Christine Caulfield
ce188ff3f4 cpghum: Add machine-readable output
and fix a few small counter bugs.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-05-15 14:19:38 +01:00
Chrissie Caulfield
0be72f03f3 test: Fold cpgbench into cpghum (#205)
* test: Fold cpgbench into cpghum

cpgbench and cpghum share a lot of code & concepts so it makes
sense to merge them into a single test program that can both
benchmark and sanity check CPG.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-05-11 08:51:34 +01:00
Bin Liu
c144dba622 cpghum: Fix printf of size_t variable
Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-04-20 08:53:33 +02:00
Jan Friesse
eca52f679f cpghum test: Improve error codes
Return error when unknown option is found. Also return error code 2 if
one of send/crc/length/sequence error happened. Finally make sure abort
returns same error code and not 999 (what is nonsense code anyway).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2017-04-07 09:36:39 +02:00
Christine Caulfield
e6d0f87f73 cpghum: Stop cpghum from reporting fake CRC errors
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-03-14 16:38:19 +00:00
Christine Caulfield
40c246fb44 cpghum: Add abort_on_error option
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-17 14:50:27 +00:00
Christine Caulfield
16a865e573 cpghum: Add min rtt and print stats every alarm
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-16 15:59:52 +00:00
Christine Caulfield
7170754919 cpghum: Add Round Trip Time (RTT) reporting
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2017-02-15 14:09:09 +00:00
Takeshi MIZUTA
4939c75629 Remove redundant header file inclusion
Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:59:08 +01:00
Jan Friesse
1925074909 Fix few bugs found by coverity
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Ruben Kerkhof
1f10c500c6 cpghum: Fix type of recv_crc
Fixes build on FreeBSD which doesn't have ulong

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2015-12-16 16:47:45 +01:00
Jan Friesse
3842ba6080 Really add cpghum
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2015-03-10 13:20:37 +01:00