Linux Debugging 2 - System Profiling

1. The /proc filesystem

 

一个表示进程的虚拟文件系统,每个进程一个目录,名字是进程号,里面存有关于一个进程的各种信息,可以监管一个进程,依据map和fd信息做出诊断。同时/proc也可用于控制和诊断核心以及硬件。

 

1) kernel and hardware 诊断信息

refer : http://blog.chinaunix.net/u/31/showart_602243.html

例如: APM(advanced power management), execdomains(registered execution domains), fb(frame buffer information).

2) kernel tunable parameters /proc/sys 例如,

3) 进程诊断信息

 

2. 中断

the following table shows the IRQ#, number of interrupts, responsible PIC, and registered handler.

 

/proc/stat的内容如下,

 

 

interrupts are per-process, and in SMP, multiple interrupts can be handled concurrently by the different CPUs.

 

3. /proc/kallsyms : all expoted module symbols from the kernel, and module name is in []

 

 

the symbols are entry points, which are used primarily by insmod when modules are inserted, and another use of ksyms is to map kernel structures when peeking into the kernel memory, by using /dev/kmem.

 

4. Dmesg (print or control the kernel ring buffer)

 

kernel messages may be rerouted to user mode via klogd.

 

in /var/log,

 

5. Devices

/sys for devices/modules just like /proc for processes.

 

6. 2 kind processes

migration(runqueue -> idle) and watchdog(make sure cpu active)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值