src/daemon/graphs/hostapd-station-signal.h \
src/daemon/graphs/interface-throughput.c \
src/daemon/graphs/interface-throughput.h \
+ src/daemon/graphs/interface-packets.c \
+ src/daemon/graphs/interface-packets.h \
src/daemon/graphs/legacy-gateway-latency4.c \
src/daemon/graphs/legacy-gateway-latency4.h \
src/daemon/graphs/legacy-suricata.c \
src/daemon/graphs/hostapd-station-rate-info.h
src/daemon/graphs/hostapd-station-signal.c
src/daemon/graphs/hostapd-station-signal.h
+src/daemon/graphs/interface-packets.c
+src/daemon/graphs/interface-packets.h
src/daemon/graphs/interface-throughput.c
src/daemon/graphs/interface-throughput.h
src/daemon/graphs/legacy-gateway-latency4.c
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-12-03 13:27+0000\n"
+"POT-Creation-Date: 2025-12-03 13:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Objects"
msgstr ""
+msgid "Packets Per Second"
+msgstr ""
+
msgid "Queries Per Second"
msgstr ""
msgid "bps"
msgstr ""
+msgid "pps"
+msgstr ""
+
msgid "qps"
msgstr ""
msgid "Outgoing Traffic"
msgstr ""
+msgid "Received Packets"
+msgstr ""
+
+msgid "Sent Packets"
+msgstr ""
+
#, c-format
msgid "Station %s - Bandwidth"
msgstr ""
msgid "Last ACK Signal"
msgstr ""
+#, c-format
+msgid "Packets - %s"
+msgstr ""
+
#, c-format
msgid "Throughput - %s"
msgstr ""
return __td_string_set(vlabel, length, _("Objects"));
}
+int td_graph_vlabel_pps(td_ctx* ctx, td_graph* graph,
+ const td_graph_render_options* options, const char* object, char* vlabel, size_t length) {
+ return __td_string_set(vlabel, length, _("Packets Per Second"));
+}
+
int td_graph_vlabel_qps(td_ctx* ctx, td_graph* graph,
const td_graph_render_options* options, const char* object, char* vlabel, size_t length) {
return __td_string_set(vlabel, length, _("Queries Per Second"));
int td_graph_vlabel_objects(td_ctx* ctx, td_graph* graph,
const td_graph_render_options* options, const char* object, char* vlabel, size_t length);
+int td_graph_vlabel_pps(td_ctx* ctx, td_graph* graph,
+ const td_graph_render_options* options, const char* object, char* vlabel, size_t length);
+
int td_graph_vlabel_qps(td_ctx* ctx, td_graph* graph,
const td_graph_render_options* options, const char* object, char* vlabel, size_t length);
#include "graphs/hostapd-station-rate-info.h"
#include "graphs/hostapd-station-signal.h"
#include "graphs/interface-throughput.h"
+#include "graphs/interface-packets.h"
#include "graphs/loadavg.h"
#include "graphs/memory.h"
#include "graphs/pressure.h"
// Interfaces
&interface_throughput_graph,
+ &interface_packets_graph,
// Pressure (PSI)
&pressure_cpu_graph,
#define FLOAT_WITH_UNIT "%%10.2lf %3s"
#define LARGE_FLOAT "%%14.2lf %%s"
#define BPS "%%9.2lf %%s%3s", _("bps")
+#define PPS "%%14.2lf %3s", _("pps")
#define QPS "%%14.2lf %3s", _("qps")
#define HZ "%%10.2lf %%s%2s", _("Hz")
#define SECONDS_HIGHRES "%%12.2lf%%ss"
PRINT_CAMM(args, bytes, object, BPS); \
} while (0)
+/*
+ This draws a packets graph
+*/
+#define DRAW_PACKETS(args, object, rx_packets, tx_packets) \
+ do { \
+ DRAW_PACKETS_RX(args, object, rx_packets); \
+ DRAW_PACKETS_TX(args, object, tx_packets); \
+ } while (0)
+
+#define DRAW_PACKETS_RX(args, object, rx_packets) \
+ __DRAW_PACKETS(args, object, rx_packets, COLOR_RX, "%s", _("Received Packets"))
+
+#define DRAW_PACKETS_TX(args, object, tx_packets) \
+ __DRAW_PACKETS(args, object, tx_packets, COLOR_TX, "%s", _("Sent Packets"))
+
+#define __DRAW_PACKETS(args, object, packets, color, label, ...) \
+ do { \
+ DRAW_AREA_WITH_LABEL(args, packets, object, color, 0, label, __VA_ARGS__); \
+ PRINT_CAMM(args, packets, object, PPS); \
+ } while (0)
+
/*
This draws a temperature graph
*/
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include <limits.h>
+
+#include "graph.h"
+#include "interface-packets.h"
+
+static int interface_packets_title(td_ctx* ctx, td_graph* graph,
+ const char* object, char* title, size_t length) {
+ return __td_string_format(title, length, _("Packets - %s"), object);
+}
+
+static int interface_packets_render(td_ctx* ctx,td_graph* graph,
+ const td_graph_render_options* options, td_args* args, const char* object) {
+ int r;
+
+ // Require the source
+ r = td_graph_require_source(graph, args, "interface", object);
+ if (r < 0)
+ return r;
+
+ // Header
+ PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
+
+ // Draw the packets
+ DRAW_PACKETS(args, object, "rx_packets", "tx_packets");
+
+ return 0;
+}
+
+const td_graph_impl interface_packets_graph = {
+ .name = "InterfacePackets",
+ .render = interface_packets_render,
+ .title = interface_packets_title,
+ .vlabel = td_graph_vlabel_pps,
+
+ // Limits
+ .lower_limit = 0,
+ .upper_limit = LONG_MAX,
+};
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef TELEMETRY_GRAPH_INTERFACE_PACKETS_H
+#define TELEMETRY_GRAPH_INTERFACE_PACKETS_H
+
+#include "../graph.h"
+
+extern const td_graph_impl interface_packets_graph;
+
+#endif /* TELEMETRY_GRAPH_INTERFACE_PACKETS_H */