diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-12 13:52:49 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-12 13:52:49 +0000 |
| commit | 35fd572dcb20db6beb702a2c71902d09bb4a50df (patch) | |
| tree | c1223bde74d426470c360b9753cd3e162273c506 /sys/netgraph/netflow | |
| parent | 77bcc9ce358adf2964e6193b3ed6bfd667f628c7 (diff) | |
Notes
Diffstat (limited to 'sys/netgraph/netflow')
| -rw-r--r-- | sys/netgraph/netflow/netflow.c | 5 | ||||
| -rw-r--r-- | sys/netgraph/netflow/ng_netflow.h | 18 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index 4ed9e1984c82..ff94bef13e15 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -204,8 +204,7 @@ expire_flow(priv_p priv, item_p *item, struct flow_entry *fle) if (*item == NULL) *item = get_export_dgram(priv); if (*item == NULL) { - /* XXX: do stats! */ - log(LOG_DEBUG, "get_export_dgram failed\n"); + atomic_add_32(&priv->info.nfinfo_export_failed, 1); uma_zfree_arg(priv->zone, fle, priv); return; } @@ -259,7 +258,7 @@ hash_insert(priv_p priv, struct flow_hash_entry *hsh, struct flow_rec *r, fle = uma_zalloc_arg(priv->zone, priv, M_NOWAIT); if (fle == NULL) { - atomic_add_32(&priv->info.nfinfo_failed, 1); + atomic_add_32(&priv->info.nfinfo_alloc_failed, 1); return (ENOMEM); } diff --git a/sys/netgraph/netflow/ng_netflow.h b/sys/netgraph/netflow/ng_netflow.h index 20b7b0daf3a8..79037ee208fa 100644 --- a/sys/netgraph/netflow/ng_netflow.h +++ b/sys/netgraph/netflow/ng_netflow.h @@ -54,14 +54,15 @@ enum { /* This structure is returned by the NGM_NETFLOW_INFO message */ struct ng_netflow_info { - uint64_t nfinfo_bytes; /* total number of accounted bytes */ - uint32_t nfinfo_packets; /* total number of accounted packets */ - uint32_t nfinfo_used; /* number of used cache records */ - uint32_t nfinfo_failed; /* number of failed allocations */ - uint32_t nfinfo_act_exp; - uint32_t nfinfo_inact_exp; - uint32_t nfinfo_inact_t; /* flow inactive timeout */ - uint32_t nfinfo_act_t; /* flow active timeout */ + uint64_t nfinfo_bytes; /* accounted bytes */ + uint32_t nfinfo_packets; /* accounted packets */ + uint32_t nfinfo_used; /* used cache records */ + uint32_t nfinfo_alloc_failed; /* failed allocations */ + uint32_t nfinfo_export_failed; /* failed exports */ + uint32_t nfinfo_act_exp; /* active expiries */ + uint32_t nfinfo_inact_exp; /* inactive expiries */ + uint32_t nfinfo_inact_t; /* flow inactive timeout */ + uint32_t nfinfo_act_t; /* flow active timeout */ }; /* This structure is returned by the NGM_NETFLOW_IFINFO message */ @@ -168,6 +169,7 @@ struct flow_entry { { "Packets", &ng_parse_uint32_type }, \ { "Records used", &ng_parse_uint32_type },\ { "Failed allocations", &ng_parse_uint32_type },\ + { "Failed exports", &ng_parse_uint32_type },\ { "Active expiries", &ng_parse_uint32_type },\ { "Inactive expiries", &ng_parse_uint32_type },\ { "Inactive timeout", &ng_parse_uint32_type },\ |
