You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to record the network usage of a single Fleetspeak client deployed, so that we can later on plot, inspect and analyze this data for measuring performance and be alerted if there are any unexpected "spikes" in network usage.
An example for a use case is GRR, that has a dashboard for Client Load Stats (google/grr#859) which fetches its data from Fleetspeak server's datastore.
The concept is similar to other metrics gathered from Fleetspeak clients, such as resident memory size.
As an example, check out #275 to learn more about how IO MiB read/write is implemented.
Implementation details:
Other metrics gathered for individual Fleetspeak clients are using the ResourceUsageFetcher struct, and specifically the method ResourceUsageForPID. Unlike those metrics, the kernel does not have information about the network usage of a given process PID, so this cannot be fetched using the library gopsutil.
Thus, an idea for implementing this: add a new struct (a singleton effectively) that will become a field in ResourceUsageFetcher. This new singleton will also be shared with the StreamingCommunicator struct (note that an implementation may needed for polling as well), so network usage data can be recorded when messages enter/exit the Fleetspeak client in the methods readLoop and writeLoop, where both are called from the connect method of StreamingCommunicator.
The text was updated successfully, but these errors were encountered:
We want to record the network usage of a single Fleetspeak client deployed, so that we can later on plot, inspect and analyze this data for measuring performance and be alerted if there are any unexpected "spikes" in network usage.
An example for a use case is GRR, that has a dashboard for Client Load Stats (google/grr#859) which fetches its data from Fleetspeak server's datastore.
The concept is similar to other metrics gathered from Fleetspeak clients, such as resident memory size.
As an example, check out #275 to learn more about how IO MiB read/write is implemented.
Implementation details:
Other metrics gathered for individual Fleetspeak clients are using the
ResourceUsageFetcher
struct, and specifically the methodResourceUsageForPID
. Unlike those metrics, the kernel does not have information about the network usage of a given process PID, so this cannot be fetched using the librarygopsutil
.Thus, an idea for implementing this: add a new struct (a singleton effectively) that will become a field in
ResourceUsageFetcher
. This new singleton will also be shared with theStreamingCommunicator
struct (note that an implementation may needed for polling as well), so network usage data can be recorded when messages enter/exit the Fleetspeak client in the methodsreadLoop
andwriteLoop
, where both are called from theconnect
method ofStreamingCommunicator
.The text was updated successfully, but these errors were encountered: