Date: Tue, 2 Jul 2013 18:54:39 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252516 - head/usr.sbin/bsnmpd/modules/snmp_hast Message-ID: <201307021854.r62Isd20043711@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Tue Jul 2 18:54:39 2013 New Revision: 252516 URL: http://svnweb.freebsd.org/changeset/base/252516 Log: Add a mib for worker process ID. MFC after: 3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jul 2 18:45:37 2013 (r252515) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jul 2 18:54:39 2013 (r252516) @@ -57,6 +57,9 @@ begemotHast MODULE-IDENTITY REVISION "201304130000Z" DESCRIPTION "Initial revision." + REVISION "201307010000Z" + DESCRIPTION + "Added hastResourceWorkerPid." ::= { begemot 220 } begemotHastObjects OBJECT IDENTIFIER ::= { begemotHast 1 } @@ -116,7 +119,8 @@ HastResourceEntry ::= SEQUENCE { hastResourceReadErrors Counter64, hastResourceWriteErrors Counter64, hastResourceDeleteErrors Counter64, - hastResourceFlushErrors Counter64 + hastResourceFlushErrors Counter64, + hastResourceWorkerPid INTEGER } hastResourceIndex OBJECT-TYPE @@ -295,4 +299,12 @@ hastResourceFlushErrors OBJECT-TYPE "Count of resource local flush operations that failed." ::= { hastResourceEntry 21 } +hastResourceWorkerPid OBJECT-TYPE + SYNTAX INTEGER + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Worker process ID." + ::= { hastResourceEntry 22 } + END Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jul 2 18:45:37 2013 (r252515) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jul 2 18:54:39 2013 (r252516) @@ -78,6 +78,7 @@ struct hast_snmp_resource { uint64_t write_errors; uint64_t delete_errors; uint64_t flush_errors; + pid_t workerpid; }; static TAILQ_HEAD(, hast_snmp_resource) resources = @@ -343,6 +344,7 @@ update_resources(void) nv_get_uint64(nvout, "stat_delete_error%u", i); res->flush_errors = nv_get_uint64(nvout, "stat_flush_error%u", i); + res->workerpid = nv_get_int32(nvout, "workerpid%u", i); TAILQ_INSERT_TAIL(&resources, res, link); } nv_free(nvout); @@ -498,6 +500,9 @@ op_hastResourceTable(struct snmp_context case LEAF_hastResourceFlushErrors: value->v.counter64 = res->flush_errors; break; + case LEAF_hastResourceWorkerPid: + value->v.integer = res->workerpid; + break; default: ret = SNMP_ERR_RES_UNAVAIL; break; Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jul 2 18:45:37 2013 (r252515) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jul 2 18:54:39 2013 (r252516) @@ -59,6 +59,7 @@ (19 hastResourceWriteErrors COUNTER64 GET) (20 hastResourceDeleteErrors COUNTER64 GET) (21 hastResourceFlushErrors COUNTER64 GET) + (22 hastResourceWorkerPid INTEGER GET) ) ) )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307021854.r62Isd20043711>