From owner-freebsd-current Tue Oct 8 12:24:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76AC137B401 for ; Tue, 8 Oct 2002 12:24:15 -0700 (PDT) Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A91743E77 for ; Tue, 8 Oct 2002 12:24:15 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021008192022.EEHZ19524.rwcrmhc53.attbi.com@InterJet.elischer.org>; Tue, 8 Oct 2002 19:20:22 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA41301; Tue, 8 Oct 2002 12:02:12 -0700 (PDT) Date: Tue, 8 Oct 2002 12:02:12 -0700 (PDT) From: Julian Elischer To: "Vladimir B. Grebenschikov" Cc: freebsd-current@freebsd.org Subject: Re: DDB sysctl function In-Reply-To: <1034097697.1548.2.camel@vbook.express.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG VERY COOL! On 8 Oct 2002, Vladimir B. Grebenschikov wrote: > Hi > > Attached diff introduces new ddb interface - access to sysctl interface > > sysctl - read sysctl value > sysctlw - write sysctl value > > Example: > > Translate string to sysctl MIB: > > db> sysctlw 0.3 hw\.model > 0xcd1aaeec: 6 2 > db> > > Now get string by this MIB: > > db> sysctl 6.2 s > 0xcd1ab24: Pentium II/Pentium II Xenon/Celeron > db> > > Or get vm.kvm_free > db> sysctlw 0.3 vm\.kvm_free > 0xcd1aaeec: 2 2da > db> sysctl 2.2da > 0xcd1ab2f4: 3800000 > db> > > This interface useful to inspect/change data easy accessible through > sysctl and hard accessible directly (say dynamic sysctl-mapped data, or > sysctl-mapped fields in complex structures). > > Comments appreciated. > > -- > Vladimir B. Grebenschikov > vova@sw.ru, SWsoft, Inc. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message