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
83
Issues
83
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
394194df
Commit
394194df
authored
Jul 18, 2016
by
Grzegorz Daniluk
Committed by
Adam Wujek
Jul 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/snmp: adding NIC TX frame counter to exported Pstats
parent
950856e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
WR-SWITCH-MIB.txt
userspace/snmpd/WR-SWITCH-MIB.txt
+11
-2
wrsPstatsHCTable.c
userspace/snmpd/wrsPstatsHCTable.c
+2
-0
wrsPstatsHCTable.h
userspace/snmpd/wrsPstatsHCTable.h
+2
-1
No files found.
userspace/snmpd/WR-SWITCH-MIB.txt
View file @
394194df
...
...
@@ -2036,7 +2036,8 @@ WrsPstatsHCEntry ::=
wrsPstatsHCFastMatchRespValid Counter64,
wrsPstatsHCFullMatchRespValid Counter64,
wrsPstatsHCForwarded Counter64,
wrsPstatsHCTRURespValid Counter64
wrsPstatsHCTRURespValid Counter64,
wrsPstatsHCNICTXFrames Counter64
}
wrsPstatsHCIndex OBJECT-TYPE
...
...
@@ -2376,7 +2377,15 @@ wrsPstatsHCTRURespValid OBJECT-TYPE
DESCRIPTION
"Number of TRU decisions"
::= { wrsPstatsHCEntry 41 }
wrsPstatsHCNICTXFrames OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of TX frames coming from CPU"
::= { wrsPstatsHCEntry 42 }
--wrsNetworking
--Configuration
END
\ No newline at end of file
END
userspace/snmpd/wrsPstatsHCTable.c
View file @
394194df
...
...
@@ -46,6 +46,7 @@ static struct pickinfo wrsPstatsHCTable_pickinfo[] = {
FIELD
(
wrsPstatsHCTable_s
,
ASN_COUNTER64
,
wrsPstatsHCFullMatchRespValid
),
FIELD
(
wrsPstatsHCTable_s
,
ASN_COUNTER64
,
wrsPstatsHCForwarded
),
FIELD
(
wrsPstatsHCTable_s
,
ASN_COUNTER64
,
wrsPstatsHCTRURespValid
),
FIELD
(
wrsPstatsHCTable_s
,
ASN_COUNTER64
,
wrsPstatsHCNICTXFrames
),
};
time_t
...
...
@@ -171,6 +172,7 @@ wrsPstatsHCTable_data_fill(unsigned int *n_rows)
pstats_array
[
wrport
].
wrsPstatsHCFullMatchRespValid
=
counters
[
36
];
pstats_array
[
wrport
].
wrsPstatsHCForwarded
=
counters
[
37
];
pstats_array
[
wrport
].
wrsPstatsHCTRURespValid
=
counters
[
38
];
pstats_array
[
wrport
].
wrsPstatsHCNICTXFrames
=
counters
[
39
];
break
;
case
2
:
default:
...
...
userspace/snmpd/wrsPstatsHCTable.h
View file @
394194df
...
...
@@ -4,7 +4,7 @@
#define WRSPSTATSHCTABLE_CACHE_TIMEOUT 5
#define WRSPSTATSHCTABLE_OID WRS_OID, 7, 7
#define PSTATS_MAX_N_COUNTERS
39
/* maximum number of counters */
#define PSTATS_MAX_N_COUNTERS
40
/* maximum number of counters */
#define PSTATS_SYSCTL_PATH "/proc/sys/pstats/"
/* Path to sysclt entries */
#define PSTATS_SYSCTL_INFO_FILE "info"
/* file with version of pstats counters
* and number of counters */
...
...
@@ -53,6 +53,7 @@ struct wrsPstatsHCTable_s {
uint64_t
wrsPstatsHCFullMatchRespValid
;
uint64_t
wrsPstatsHCForwarded
;
uint64_t
wrsPstatsHCTRURespValid
;
uint64_t
wrsPstatsHCNICTXFrames
;
};
extern
struct
wrsPstatsHCTable_s
pstats_array
[
WRS_N_PORTS
];
...
...
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