Added more finegrained controll over kstat.
Merge branch 'test' into dev