Added another method to monitor Tusage_delay. Changed output order.
This commit is contained in:
@@ -117,9 +117,14 @@ static void packet_statistics(
|
|||||||
case FRAME_TYPE_TOKEN:
|
case FRAME_TYPE_TOKEN:
|
||||||
MSTP_Statistics[src].token_count++;
|
MSTP_Statistics[src].token_count++;
|
||||||
if (old_frame == FRAME_TYPE_TOKEN) {
|
if (old_frame == FRAME_TYPE_TOKEN) {
|
||||||
if (old_dst == dst) {
|
if ((old_dst == dst) && (old_src == src)) {
|
||||||
/* repeated token */
|
/* repeated token */
|
||||||
MSTP_Statistics[dst].token_retries++;
|
MSTP_Statistics[dst].token_retries++;
|
||||||
|
/* Tusage_timeout */
|
||||||
|
delta = timeval_diff_ms(&old_tv, tv);
|
||||||
|
if (delta > MSTP_Statistics[src].tusage_timeout) {
|
||||||
|
MSTP_Statistics[src].tusage_timeout = delta;
|
||||||
|
}
|
||||||
} else if (old_dst == src) {
|
} else if (old_dst == src) {
|
||||||
/* token to token response time */
|
/* token to token response time */
|
||||||
delta = timeval_diff_ms(&old_tv, tv);
|
delta = timeval_diff_ms(&old_tv, tv);
|
||||||
@@ -194,21 +199,21 @@ static void packet_statistics_save(void)
|
|||||||
fprintf(stdout, "\r\n");
|
fprintf(stdout, "\r\n");
|
||||||
/* separate with tabs (8) keep words under 8 characters */
|
/* separate with tabs (8) keep words under 8 characters */
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"MAC\tMaxMstr\tTokens\tRetries\tTusage"
|
"MAC\tMaxMstr\tTokens\tRetries\tTreply"
|
||||||
"\tTreply\tTrpfm\tTder\tTpostpd");
|
"\tTusage\tTrpfm\tTder\tTpostpd");
|
||||||
fprintf(stdout, "\r\n");
|
fprintf(stdout, "\r\n");
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
if (MSTP_Statistics[i].token_count) {
|
if (MSTP_Statistics[i].token_count) {
|
||||||
fprintf(stdout, "%u\t%u", i,
|
fprintf(stdout, "%u\t%u", i,
|
||||||
(unsigned)MSTP_Statistics[i].max_master);
|
(unsigned)MSTP_Statistics[i].max_master);
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"\t%lu\t%lu\t%lu",
|
"\t%lu\t%lu\t%lu\t%lu",
|
||||||
(long unsigned int)MSTP_Statistics[i].token_count,
|
(long unsigned int)MSTP_Statistics[i].token_count,
|
||||||
(long unsigned int)MSTP_Statistics[i].token_retries,
|
(long unsigned int)MSTP_Statistics[i].token_retries,
|
||||||
|
(long unsigned int)MSTP_Statistics[i].token_reply,
|
||||||
(long unsigned int)MSTP_Statistics[i].tusage_timeout);
|
(long unsigned int)MSTP_Statistics[i].tusage_timeout);
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"\t%lu\t%lu\t%lu\t%lu",
|
"\t%lu\t%lu\t%lu",
|
||||||
(long unsigned int)MSTP_Statistics[i].token_reply,
|
|
||||||
(long unsigned int)MSTP_Statistics[i].pfm_reply,
|
(long unsigned int)MSTP_Statistics[i].pfm_reply,
|
||||||
(long unsigned int)MSTP_Statistics[i].der_reply,
|
(long unsigned int)MSTP_Statistics[i].der_reply,
|
||||||
(long unsigned int)MSTP_Statistics[i].reply_postponed);
|
(long unsigned int)MSTP_Statistics[i].reply_postponed);
|
||||||
|
|||||||
Reference in New Issue
Block a user