On 03/24/2011 10:45 AM, Yu wrote: > Hi, All, > > I would like to expose some monitoring metrics from kernel and store > them in a circular table for debugging. > > In traditional linux, this might be possible through kvm. > > But is it possible for me to read this kernel data structure in > android?
The traditional way to doing this is to expose kernel data through either the /proc fs or debugfs. An android program can then read the data through normal read/write operations on the filesystem. Even if you're doing something binary and complex, you could expose it through ioctls, or your own char driver, and, again, read these from Java. What data are you trying to get? There's a lot of data already published through /proc that's available. Also, with more recent kernel versions (2.6.35 and above) you can turn on trace instrumentation and retrieve system information with ftrace. -- Tim ============================= Tim Bird Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Network Entertainment ============================= -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
