Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
7481b2f7
Commit
7481b2f7
authored
Dec 15, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/snmpd: print old and new value for errors on some objects
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
1cdda7ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
wrsNetworkingStatusGroup.c
userspace/snmpd/wrsNetworkingStatusGroup.c
+4
-2
wrsSnmp.h
userspace/snmpd/wrsSnmp.h
+6
-4
No files found.
userspace/snmpd/wrsNetworkingStatusGroup.c
View file @
7481b2f7
...
...
@@ -166,9 +166,11 @@ static int get_rtu_status(struct ns_pstats *old,
* logs */
ret
=
1
;
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
" %s: "
"wrsPstatsHCRXDropRTUFull counter for port %i (wri %i) increased by %lld, allowed %d
\n
"
,
"wrsPstatsHCRXDropRTUFull counter for port %i (wri %i) increased by %lld, allowed %d "
"old val %lld, new val %lld
\n
"
,
slog_obj_name
,
i
+
1
,
i
+
1
,
new
[
i
].
wrsPstatsHCRXDropRTUFull
-
old
[
i
].
wrsPstatsHCRXDropRTUFull
,
0
);
new
[
i
].
wrsPstatsHCRXDropRTUFull
-
old
[
i
].
wrsPstatsHCRXDropRTUFull
,
0
,
old
[
i
].
wrsPstatsHCRXDropRTUFull
,
new
[
i
].
wrsPstatsHCRXDropRTUFull
);
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
" %s: "
"some frames were lost because RTU could not accept new requests
\n
"
,
slog_obj_name
);
...
...
userspace/snmpd/wrsSnmp.h
View file @
7481b2f7
...
...
@@ -80,10 +80,12 @@ struct pickinfo {
#define SLOG_IF_COMP_WNSG(_log_type, _obj, _new, _old, _i, _t_delta, _rate, _assign) \
do { if ((_new[_i]._obj - _old[_i]._obj)/_t_delta > _rate) {\
_assign; \
snmp_log(LOG_ERR, "SNMP: " _log_type " %s: " #_obj " for port %i (wri%i) increased by more than %.0f during %.0fs, allowed %.0f\n", \
slog_obj_name, _i + 1, _i + 1, \
(_new[_i]._obj - _old[_i]._obj)/_t_delta, _t_delta, \
_rate); \
snmp_log(LOG_ERR, "SNMP: " _log_type " %s: " #_obj " for port %i " \
"(wri%i) increased by more than %.0f during %.0fs, " \
"allowed %.0f, old value %llu new value %llu\n", \
slog_obj_name, _i + 1, _i + 1, \
(_new[_i]._obj - _old[_i]._obj)/_t_delta, _t_delta, \
_rate, _old[_i]._obj, _new[_i]._obj); \
} \
} while (0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment