mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/seth/stats-improvement'
(Cleaned up some code a little bit.) * origin/topic/seth/stats-improvement: Fixing tests for stats improvements Rename the reporting interval variable for stats. Removing more broken functionality due to changed stats apis. Removing some references to resource_usage() Removing Broker stats, it was broken and incomplete. Fixing default stats collection interval to every 5 minutes. Add DNS stats to the stats.log Small stats script tweaks and beginning broker stats. Continued stats cleanup and extension. More stats collection extensions. More stats improvements Slight change to Mach API for collecting memory usage. Fixing some small mistakes. Updating the cmake submodule for the stats updates. Fix memory usage collection on Mac OS X. Cleaned up stats collection. BIT-1581 #merged
This commit is contained in:
commit
00d94f1bbc
53 changed files with 887 additions and 498 deletions
|
@ -22,44 +22,24 @@ event Control::id_value_request(id: string)
|
|||
|
||||
event Control::peer_status_request()
|
||||
{
|
||||
local status = "";
|
||||
for ( p in Communication::nodes )
|
||||
{
|
||||
local peer = Communication::nodes[p];
|
||||
if ( ! peer$connected )
|
||||
next;
|
||||
|
||||
local res = resource_usage();
|
||||
status += fmt("%.6f peer=%s host=%s events_in=%s events_out=%s ops_in=%s ops_out=%s bytes_in=? bytes_out=?\n",
|
||||
network_time(),
|
||||
peer$peer$descr, peer$host,
|
||||
res$num_events_queued, res$num_events_dispatched,
|
||||
res$blocking_input, res$blocking_output);
|
||||
}
|
||||
|
||||
event Control::peer_status_response(status);
|
||||
}
|
||||
|
||||
event Control::net_stats_request()
|
||||
{
|
||||
local ns = net_stats();
|
||||
local reply = fmt("%.6f recvd=%d dropped=%d link=%d\n", network_time(),
|
||||
ns$pkts_recvd, ns$pkts_dropped, ns$pkts_link);
|
||||
event Control::net_stats_response(reply);
|
||||
}
|
||||
|
||||
|
||||
event Control::configuration_update_request()
|
||||
{
|
||||
# Generate the alias event.
|
||||
# Generate the alias event.
|
||||
event Control::configuration_update();
|
||||
|
||||
|
||||
# Don't need to do anything in particular here, it's just indicating that
|
||||
# the configuration is going to be updated. This event could be handled
|
||||
# by other scripts if they need to do some ancilliary processing if
|
||||
# by other scripts if they need to do some ancilliary processing if
|
||||
# redef-able consts are modified at runtime.
|
||||
event Control::configuration_update_response();
|
||||
}
|
||||
|
||||
|
||||
event Control::shutdown_request()
|
||||
{
|
||||
# Send the acknowledgement event.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue