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
86
Issues
86
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
b282f0a3
Commit
b282f0a3
authored
May 10, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/snmpd: add the time of last servo update
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
3acd87a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
WR-SWITCH-MIB.txt
userspace/snmpd/WR-SWITCH-MIB.txt
+10
-1
wrsPtpDataTable.c
userspace/snmpd/wrsPtpDataTable.c
+5
-0
wrsPtpDataTable.h
userspace/snmpd/wrsPtpDataTable.h
+1
-0
wrs_dump_shmem.c
userspace/tools/wrs_dump_shmem.c
+1
-0
No files found.
userspace/snmpd/WR-SWITCH-MIB.txt
View file @
b282f0a3
...
...
@@ -1588,7 +1588,8 @@ WrsPtpDataEntry ::=
wrsPtpDeltaRxS Integer32,
wrsPtpServoStateErrCnt Counter32,
wrsPtpClockOffsetErrCnt Counter32,
wrsPtpRTTErrCnt Counter32
wrsPtpRTTErrCnt Counter32,
wrsPtpServoUpdateTime Counter64
}
wrsPtpDataIndex OBJECT-TYPE
...
...
@@ -1783,6 +1784,14 @@ wrsPtpRTTErrCnt OBJECT-TYPE
"Number of servo updates with wrong RTT"
::= { wrsPtpDataEntry 22 }
wrsPtpServoUpdateTime OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"TAI Nanosecond of the last servo's update"
::= { wrsPtpDataEntry 23 }
-- wrsPortStatusTable (.7.6)
wrsPortStatusTable OBJECT-TYPE
SYNTAX SEQUENCE OF WrsPortStatusEntry
...
...
userspace/snmpd/wrsPtpDataTable.c
View file @
b282f0a3
...
...
@@ -28,6 +28,8 @@ static struct pickinfo wrsPtpDataTable_pickinfo[] = {
FIELD
(
wrsPtpDataTable_s
,
ASN_COUNTER
,
n_err_state
),
FIELD
(
wrsPtpDataTable_s
,
ASN_COUNTER
,
n_err_offset
),
FIELD
(
wrsPtpDataTable_s
,
ASN_COUNTER
,
n_err_delta_rtt
),
FIELD
(
wrsPtpDataTable_s
,
ASN_COUNTER64
,
update_time
),
};
static
int32_t
int_saturate
(
int64_t
value
)
...
...
@@ -110,6 +112,9 @@ time_t wrsPtpDataTable_data_fill(unsigned int *n_rows)
wrsPtpDataTable_array
[
0
].
n_err_state
=
ppsi_servo
->
n_err_state
;
wrsPtpDataTable_array
[
0
].
n_err_offset
=
ppsi_servo
->
n_err_offset
;
wrsPtpDataTable_array
[
0
].
n_err_delta_rtt
=
ppsi_servo
->
n_err_delta_rtt
;
wrsPtpDataTable_array
[
0
].
update_time
=
(((
uint64_t
)
ppsi_servo
->
update_time
.
seconds
)
*
1000000000LL
)
+
ppsi_servo
->
update_time
.
nanoseconds
;
retries
++
;
if
(
retries
>
100
)
{
snmp_log
(
LOG_ERR
,
"%s: too many retries to read PPSI
\n
"
,
...
...
userspace/snmpd/wrsPtpDataTable.h
View file @
b282f0a3
...
...
@@ -33,6 +33,7 @@ struct wrsPtpDataTable_s {
uint32_t
n_err_state
;
uint32_t
n_err_offset
;
uint32_t
n_err_delta_rtt
;
uint64_t
update_time
;
};
extern
struct
wrsPtpDataTable_s
wrsPtpDataTable_array
[
WRS_MAX_N_SERVO_INSTANCES
];
...
...
userspace/tools/wrs_dump_shmem.c
View file @
b282f0a3
...
...
@@ -507,6 +507,7 @@ struct dump_info servo_state_info [] = {
DUMP_FIELD
(
UInteger32
,
n_err_state
),
DUMP_FIELD
(
UInteger32
,
n_err_offset
),
DUMP_FIELD
(
UInteger32
,
n_err_delta_rtt
),
DUMP_FIELD
(
TimeInternal
,
update_time
),
};
#undef DUMP_STRUCT
...
...
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