![]() |
HowTo.ProbingTheKernel HistoryHide minor edits - Show changes to markup August 15, 2008, at 11:47 AM
by -- /proc/sys/sunrpc/*_debug doesn\'t do hex
Changed line 66 from:
Clearly, these numbers can be 'or'ed together, and if in doubt to:
Clearly, these numbers can be 'or'ed together, and if in doubt July 29, 2008, at 02:41 PM
by -- Initial Version complete
Changed lines 13-15 from:
The kernel contains many maps and caches most of whose contents can be inspected if only you can discover the correct incantation. In particular the various caches maintained for services accessed through RPC can be inspected through the "files" to:
The kernel contains many maps and caches most of whose contents can be inspected if only you can discover the correct incantation. In particular the various caches maintained for services accessed through RPC can be inspected through the "files" /proc/net/rpc/*/content. For example, on my own slug, ' Added line 25:
Changed line 38 from:
@@NFSDDBG_EXPORT 0x0004 to:
NFSDDBG_EXPORT 0x0004 Changed lines 66-67 from:
Clearly, these numbers can be 'or'ed together, and if in doubt to:
Clearly, these numbers can be 'or'ed together, and if in doubt echo 4 > /proc/sys/sunrpc/nfsd_debug (i.e. July 29, 2008, at 02:27 PM
by --
Changed lines 9-10 from:
to:
Changed lines 14-21 from:
-> Syslog and printkto:
/proc/net/rpc/*/content For example, on my own slug, ' /media/sda1 clerew(rw,no_root_squash,sync,wdelay)
/ clerew(ro,no_root_squash,sync,wdelay,fsid=0)
Syslog and [d]printkChanged lines 25-70 from:
For nfs_debug NFSDBG_VFS 0x0001 NFSDBG_PAGECACHE 0x0008 NFSDBG_PROC 0x0010 NFSDBG_XDR 0x0020 NFSDBG_FILE 0x0040 NFSDBG_ROOT 0x0080 NFSDBG_CALLBACK 0x0100 NFSDBG_CLIENT 0x0200 For nfsd_debug NFSDDBG_FH 0x0002 NFSDDBG_EXPORT 0x0004 NFSDDBG_SVC 0x0008 NFSDDBG_PROC 0x0010 NFSDDBG_FILEOP 0x0020 NFSDDBG_XDR 0x0100 NFSDDBG_LOCKD 0x0200 For nlm_debug (the lockd) NLMDBG_SVC 0x0001 NLMDBG_CLIENT 0x0002 NLMDBG_SVCLOCK 0x0008 NLMDBG_MONITOR 0x0010 NLMDBG_SVCSUBS 0x0040 NLMDBG_HOSTCACHE 0x0080 NLMDBG_XDR 0x0100 For rpc_debug RPCDBG_XPRT 0x0001 RPCDBG_CALL 0x0002 RPCDBG_AUTH 0x0010 RPCDBG_PMAP 0x0020 RPCDBG_SCHED 0x0040 RPCDBG_TRANS 0x0080 RPCDBG_SVCSOCK 0x0100 RPCDBG_SVCDSP 0x0200 RPCDBG_MISC 0x0400 RPCDBG_CACHE 0x0800 Clearly, these numbers can be 'or'ed together, and if in doubt THIS WIKI STILL UNDER CONSTRICTION :-( to:
For nfs_debug
NFSDBG_VFS 0x0001
NFSDBG_PAGECACHE 0x0008
NFSDBG_PROC 0x0010
NFSDBG_XDR 0x0020
NFSDBG_FILE 0x0040
NFSDBG_ROOT 0x0080
NFSDBG_CALLBACK 0x0100
NFSDBG_CLIENT 0x0200
For nfsd_debug
NFSDDBG_FH 0x0002
@@NFSDDBG_EXPORT 0x0004
NFSDDBG_SVC 0x0008
NFSDDBG_PROC 0x0010
NFSDDBG_FILEOP 0x0020
NFSDDBG_XDR 0x0100
NFSDDBG_LOCKD 0x0200
For nlm_debug (the lockd)
NLMDBG_SVC 0x0001
NLMDBG_CLIENT 0x0002
NLMDBG_SVCLOCK 0x0008
NLMDBG_MONITOR 0x0010
NLMDBG_SVCSUBS 0x0040
NLMDBG_HOSTCACHE 0x0080
NLMDBG_XDR 0x0100
For rpc_debug
RPCDBG_XPRT 0x0001
RPCDBG_CALL 0x0002
RPCDBG_AUTH 0x0010
RPCDBG_PMAP 0x0020
RPCDBG_SCHED 0x0040
RPCDBG_TRANS 0x0080
RPCDBG_SVCSOCK 0x0100
RPCDBG_SVCDSP 0x0200
RPCDBG_MISC 0x0400
RPCDBG_CACHE 0x0800
Clearly, these numbers can be 'or'ed together, and if in doubt All the output produced by this debugging appears in the Syslog. If you normally connect with your slug using tail -f /var/log/messages permanently running in it, and then you will be able to follow events as they happen. Other facilitiesI am sure there must be lots more handles to cause the kernel to reveal its internal workings just waiting to be discovered, so I hope that others will add them to this Wiki as time goes by. July 29, 2008, at 01:55 PM
by --
Changed lines 1-4 from:
{:title Probing the Kernel:} When operations involving the Kernel don't go as expected, and attempts to find what is happening by studying the Kernel Source Code simply get you into a mire of confusion, what tools are available to guide you through the jungle? to:
When operations involving the Kernel don't go as expected, and attempts to find what is happening by studying the Kernel Source Code simply get you into a mire of confusion, what tools are available to guide you through the jungle? Changed lines 24-26 from:
However, if you look closely you will also spot calls of to:
However, if you look closely you will also spot calls of For nfs_debug NFSDBG_VFS 0x0001 NFSDBG_PAGECACHE 0x0008 NFSDBG_PROC 0x0010 NFSDBG_XDR 0x0020 NFSDBG_FILE 0x0040 NFSDBG_ROOT 0x0080 NFSDBG_CALLBACK 0x0100 NFSDBG_CLIENT 0x0200 For nfsd_debug NFSDDBG_FH 0x0002 NFSDDBG_EXPORT 0x0004 NFSDDBG_SVC 0x0008 NFSDDBG_PROC 0x0010 NFSDDBG_FILEOP 0x0020 NFSDDBG_XDR 0x0100 NFSDDBG_LOCKD 0x0200 For nlm_debug (the lockd) NLMDBG_SVC 0x0001 NLMDBG_CLIENT 0x0002 NLMDBG_SVCLOCK 0x0008 NLMDBG_MONITOR 0x0010 NLMDBG_SVCSUBS 0x0040 NLMDBG_HOSTCACHE 0x0080 NLMDBG_XDR 0x0100 For rpc_debug RPCDBG_XPRT 0x0001 RPCDBG_CALL 0x0002 RPCDBG_AUTH 0x0010 RPCDBG_PMAP 0x0020 RPCDBG_SCHED 0x0040 RPCDBG_TRANS 0x0080 RPCDBG_SVCSOCK 0x0100 RPCDBG_SVCDSP 0x0200 RPCDBG_MISC 0x0400 RPCDBG_CACHE 0x0800 Clearly, these numbers can be 'or'ed together, and if in doubt July 23, 2008, at 11:32 AM
by --
Changed lines 1-2 from:
Probing the Kernelto:
{:title Probing the Kernel:} Changed lines 15-18 from:
The kernel contains many maps and caches most of whose contents can be inspected if only you can discover the correct incantation. In particular the various caches maintained for services accessed through RPC can be inspected through the "files" to:
The kernel contains many maps and caches most of whose contents can be inspected if only you can discover the correct incantation. In particular the various caches maintained for services accessed through RPC can be inspected through the "files" -> /proc/net/rpc/*/contentFor example, on my own slug, more /proc/net/rpc/nfsd.export/content gives me-> #path domain(flags) /media/sda1 clerew(rw,no_root_squash,sync,wdelay) / clerew(ro,no_root_squash,sync,wdelay,fsid=0) Syslog and printkMost Syslog messages that you see ( However, if you look closely you will also spot calls of July 22, 2008, at 06:30 PM
by -- New Page
Added lines 1-20:
Probing the KernelWhen operations involving the Kernel don't go as expected, and attempts to find what is happening by studying the Kernel Source Code simply get you into a mire of confusion, what tools are available to guide you through the jungle? Kernel DebuggersAlthough there are packages available such as KDB, KGDB and LTT, they all require the kernel itself to be patched before they can be used. Slugos includes no such patches (and maybe they would occupy more space in the Slug Flash than there is room for), but if someone is prepared to do the necessary groundwork, TPTB might well be prepared to incorporate them. So, in the meantime, let us see what other tools are available. Strace
Maps and CachesThe kernel contains many maps and caches most of whose contents can be inspected if only you can discover the correct incantation. In particular the various caches maintained for services accessed through RPC can be inspected through the "files" THIS WIKI STILL UNDER CONSTRICTION :-( Page last modified on August 15, 2008, at 11:47 AM
|