svn commit: r260413 - stable/9/usr.sbin/bsnmpd/modules/snmp_hast
Mikolaj Golub
trociny at FreeBSD.org
Tue Jan 7 21:24:35 UTC 2014
Author: trociny
Date: Tue Jan 7 21:24:34 2014
New Revision: 260413
URL: http://svnweb.freebsd.org/changeset/base/260413
Log:
MFC r260049:
Add mibs for hastd(1) queue stats.
Modified:
stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt
stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def
Directory Properties:
stable/9/usr.sbin/bsnmpd/ (props changed)
Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt
==============================================================================
--- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:23:41 2014 (r260412)
+++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:24:34 2014 (r260413)
@@ -60,6 +60,11 @@ begemotHast MODULE-IDENTITY
REVISION "201307010000Z"
DESCRIPTION
"Added hastResourceWorkerPid."
+ REVISION "201312290000Z"
+ DESCRIPTION
+ "Added hastResourceLocalQueue, hastResourceSendQueue,
+ hastResourceRecvQueue, hastResourceDoneQueue,
+ hastResourceIdleQueue."
::= { begemot 220 }
begemotHastObjects OBJECT IDENTIFIER ::= { begemotHast 1 }
@@ -120,7 +125,12 @@ HastResourceEntry ::= SEQUENCE {
hastResourceWriteErrors Counter64,
hastResourceDeleteErrors Counter64,
hastResourceFlushErrors Counter64,
- hastResourceWorkerPid INTEGER
+ hastResourceWorkerPid INTEGER,
+ hastResourceLocalQueue UNSIGNED32,
+ hastResourceSendQueue UNSIGNED32,
+ hastResourceRecvQueue UNSIGNED32,
+ hastResourceDoneQueue UNSIGNED32,
+ hastResourceIdleQueue UNSIGNED32
}
hastResourceIndex OBJECT-TYPE
@@ -307,4 +317,46 @@ hastResourceWorkerPid OBJECT-TYPE
"Worker process ID."
::= { hastResourceEntry 22 }
+hastResourceLocalQueue OBJECT-TYPE
+ SYNTAX UNSIGNED32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of outstanding I/O requests to the local component."
+ ::= { hastResourceEntry 23 }
+
+hastResourceSendQueue OBJECT-TYPE
+ SYNTAX UNSIGNED32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of outstanding I/O requests to send to the remote
+ component."
+ ::= { hastResourceEntry 24 }
+
+hastResourceRecvQueue OBJECT-TYPE
+ SYNTAX UNSIGNED32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of outstanding I/O requests waiting for response
+ from the remote component."
+ ::= { hastResourceEntry 25 }
+
+hastResourceDoneQueue OBJECT-TYPE
+ SYNTAX UNSIGNED32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of processed I/O requests to return to the kernel."
+ ::= { hastResourceEntry 26 }
+
+hastResourceIdleQueue OBJECT-TYPE
+ SYNTAX UNSIGNED32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of request objects in the free bucket."
+ ::= { hastResourceEntry 27 }
+
END
Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
==============================================================================
--- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:23:41 2014 (r260412)
+++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:24:34 2014 (r260413)
@@ -79,6 +79,11 @@ struct hast_snmp_resource {
uint64_t delete_errors;
uint64_t flush_errors;
pid_t workerpid;
+ uint32_t local_queue;
+ uint32_t send_queue;
+ uint32_t recv_queue;
+ uint32_t done_queue;
+ uint32_t idle_queue;
};
static TAILQ_HEAD(, hast_snmp_resource) resources =
@@ -345,6 +350,16 @@ update_resources(void)
res->flush_errors =
nv_get_uint64(nvout, "stat_flush_error%u", i);
res->workerpid = nv_get_int32(nvout, "workerpid%u", i);
+ res->local_queue =
+ nv_get_uint64(nvout, "local_queue_size%u", i);
+ res->send_queue =
+ nv_get_uint64(nvout, "send_queue_size%u", i);
+ res->recv_queue =
+ nv_get_uint64(nvout, "recv_queue_size%u", i);
+ res->done_queue =
+ nv_get_uint64(nvout, "done_queue_size%u", i);
+ res->idle_queue =
+ nv_get_uint64(nvout, "idle_queue_size%u", i);
TAILQ_INSERT_TAIL(&resources, res, link);
}
nv_free(nvout);
@@ -503,6 +518,21 @@ op_hastResourceTable(struct snmp_context
case LEAF_hastResourceWorkerPid:
value->v.integer = res->workerpid;
break;
+ case LEAF_hastResourceLocalQueue:
+ value->v.uint32 = res->local_queue;
+ break;
+ case LEAF_hastResourceSendQueue:
+ value->v.uint32 = res->send_queue;
+ break;
+ case LEAF_hastResourceRecvQueue:
+ value->v.uint32 = res->recv_queue;
+ break;
+ case LEAF_hastResourceDoneQueue:
+ value->v.uint32 = res->done_queue;
+ break;
+ case LEAF_hastResourceIdleQueue:
+ value->v.uint32 = res->idle_queue;
+ break;
default:
ret = SNMP_ERR_RES_UNAVAIL;
break;
Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def
==============================================================================
--- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:23:41 2014 (r260412)
+++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:24:34 2014 (r260413)
@@ -60,6 +60,11 @@
(20 hastResourceDeleteErrors COUNTER64 GET)
(21 hastResourceFlushErrors COUNTER64 GET)
(22 hastResourceWorkerPid INTEGER GET)
+ (23 hastResourceLocalQueue UNSIGNED32 GET)
+ (24 hastResourceSendQueue UNSIGNED32 GET)
+ (25 hastResourceRecvQueue UNSIGNED32 GET)
+ (26 hastResourceDoneQueue UNSIGNED32 GET)
+ (27 hastResourceIdleQueue UNSIGNED32 GET)
)
)
)
More information about the svn-src-stable-9
mailing list