From dd7d52f8026f84c8766ae6d4ffea899366dde1fb Mon Sep 17 00:00:00 2001 From: James Clewett Date: Wed, 22 Jul 2026 09:45:34 +0100 Subject: [PATCH 1/2] Fix excessive cpu usage in daq logging. --- src/DAQLogging/DAQLogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DAQLogging/DAQLogging.cpp b/src/DAQLogging/DAQLogging.cpp index 35f6807..970e169 100644 --- a/src/DAQLogging/DAQLogging.cpp +++ b/src/DAQLogging/DAQLogging.cpp @@ -360,7 +360,7 @@ src/DAQLogging/DAQLogging.{h,cpp} -nw //printf("%s \n","in log loop"); // if (RemoteConnections.size()==0) sleep(1); - zmq::poll(&items[0],2,1000); + zmq::poll(&items[0],1,1000); if ((items[0].revents & ZMQ_POLLIN ) && running){ //log a 1message so send it // printf("received message to send \n"); From cf7950f1f495e453d016d4176f1a9de963390aa1 Mon Sep 17 00:00:00 2001 From: brichards64 Date: Mon, 10 Aug 2026 15:59:28 +0100 Subject: [PATCH 2/2] Clean up zmq poll items in DAQLogging.cpp Removed an unused poll item from the zmq::pollitem_t array. --- src/DAQLogging/DAQLogging.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DAQLogging/DAQLogging.cpp b/src/DAQLogging/DAQLogging.cpp index 970e169..874cfd0 100644 --- a/src/DAQLogging/DAQLogging.cpp +++ b/src/DAQLogging/DAQLogging.cpp @@ -351,8 +351,7 @@ src/DAQLogging/DAQLogging.{h,cpp} -nw // printf("%s %d n",log_address.c_str(), log_port); zmq::pollitem_t items [] = { - { LogReceiver, 0, ZMQ_POLLIN, 0 }, - {NULL, sock, ZMQ_POLLOUT, 0 }, + { LogReceiver, 0, ZMQ_POLLIN, 0 } };