1

I am trying to determine how much kernel stack is being used by processes on a server. I found a document that indicates that the output from sysrq-t shows the amount of unused stack in the 4th field of the line with the process name. The problem is, every machine I run the sysrq-t on except an old, 32-bit CentOS 5 box always has 0 for this field. Is there another way to determine the stack usage?

1 Answer 1

0

For that value to be populated the kernel must be compiled with CONFIG_DEBUG_STACK_USAGE. I suspect most production kernels do not set it.

# RHEL5
$ grep CONFIG_DEBUG_STACK_USAGE /boot/config-`uname -r`
# CONFIG_DEBUG_STACK_USAGE is not set

# Lucid
$ grep CONFIG_DEBUG_STACK_USAGE /boot/config-`uname -r`
# CONFIG_DEBUG_STACK_USAGE is not set

# Precise
$ grep CONFIG_DEBUG_STACK_USAGE /boot/config-`uname -r`
# CONFIG_DEBUG_STACK_USAGE is not set
1
  • Any idea if there's another way to get the stack usage information without recompiling with the CONFIG_DEBUG_STACK_USAGE option? Nov 1, 2012 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .