Date: Tue, 7 Jan 2014 21:23:42 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260412 - stable/10/usr.sbin/bsnmpd/modules/snmp_hast Message-ID: <201401072123.s07LNg6g003372@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Tue Jan 7 21:23:41 2014 New Revision: 260412 URL: http://svnweb.freebsd.org/changeset/base/260412 Log: MFC r260049: Add mibs for hastd(1) queue stats. Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:14:28 2014 (r260411) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:23:41 2014 (r260412) @@ -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/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:14:28 2014 (r260411) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:23:41 2014 (r260412) @@ -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/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:14:28 2014 (r260411) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:23:41 2014 (r260412) @@ -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) ) ) )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401072123.s07LNg6g003372>