Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
7481b2f7
Commit
7481b2f7
authored
8 years ago
by
Adam Wujek
Browse files
Options
Downloads
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
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/snmpd/wrsNetworkingStatusGroup.c
+4
-2
4 additions, 2 deletions
userspace/snmpd/wrsNetworkingStatusGroup.c
userspace/snmpd/wrsSnmp.h
+6
-4
6 additions, 4 deletions
userspace/snmpd/wrsSnmp.h
with
10 additions
and
6 deletions
userspace/snmpd/wrsNetworkingStatusGroup.c
+
4
−
2
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
);
...
...
This diff is collapsed.
Click to expand it.
userspace/snmpd/wrsSnmp.h
+
6
−
4
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)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment