Subject: Show sysctl activity in ktrace
To: None <tech-kern@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 09/20/2006 22:59:41
Hello

ktrace tends to be useless when dealing with sysctl calls. I made a patch
that traces sysctl activity, like this:

   108      1 sysctl   CALL  __sysctl(0xbfbfecb0,3,0xbfbfdad0,
0xbfbfdacc,0,0)
   108      1 sysctl   MIB   1.1118.1120
   108      1 sysctl   GIO   read 7 bytes
       "amdpm0\0"
   108      1 sysctl   RET   __sysctl 0

Or, with a write operation:
   303      1 sysctl   CALL  __sysctl(0xbfbfec30,3,0xbfbfebf0,
0xbfbfebd4,0xbfbfebec,4)
   303      1 sysctl   MIB   10.764.4
   303      1 sysctl   GIO   read 4 bytes
       "\0\0\0\0"
   303      1 sysctl   GIO   wrote 4 bytes
       "\0\0\0\0"
   303      1 sysctl   RET   __sysctl 0


Here is the patch: http://ftp.espci.fr/shadow/manu/mib2.patch

Is it okay to commit?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@netbsd.org