H. Peter Anvin <hpa@transmeta.com> wrote:
> I *do* want a unified tool. Unfortunately, I sometimes want that
> unified tool to be snmpd. There is *NO* other reason, and I would like
> the sysctl() system call to go away.
Why not (assuming we have a string based sysctl_s()) assign
the MIB numbers to strings? Ie, a MIB <-> sysctl_s() database like:
1.2.3.4.1 /kernel/vm/free_pages
1.2.3.4.2 /kernel/vm/swap_max
...
1.2.7.6.2 /kernel/bus/pci
1.2.7.6.2.768.4634.3 /kernel/bus/pci/0300/121A:0003 # Voodoo 3
1.2.7.6.2.?.?.?.1 /kernel/bus/pci/%.4X/%.4X:%.4X/irq # Any PCI device
1.2.7.6.2.?.?.?.2 /kernel/bus/pci/%.4X/%.4X:%.4X/ioport # Any PCI device
...
And the (proposed) sysctl_s would be like:
... C code ...
int val;
double parm=4.56;
sysctl_s("/kernel/vm/free_pages",SYSCTL_GET,&val);
sysctl_s("/kernel/vm/page_hiwatermark",SYSCTL_SET,&parm);
...
... Shell code ...
$ cat /kernel/vm/free_pages
12
$ echo 4.56 >/kernel/vm/page_hiwatermark
-- Jason McMullan, Senior Linux Consultant, Linuxcare, Inc. 412.422.8077 tel, 412.656.3519 cell, 415.701.0792 fax jmcmullan@linuxcare.com, http://www.linuxcare.com/ Linuxcare. Support for the revolution.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:11 EST