Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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
share|improve this answer
    
Any idea if there's another way to get the stack usage information without recompiling with the CONFIG_DEBUG_STACK_USAGE option? –  user1789868 Nov 1 '12 at 19:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.