Skip to contentSkip to conversation

process wait channel (WCHAN) and alarm?

DISCUSSION Herta Van den Eynde 2 participants 4 messages Jun 3, 2003

lore
Share & tools
lore
#0 lore raw

Where can I find the meaning of the different channels a process can be waiting in? And what do the alarm values represent? (Rightmost colums in 'ps -eo pid,user,cmd,alarm,wchan')

Hert

Signature · 4 lines
Herta Van den Eynde       -=- Toledo system management
K.U. Leuven - Ludit       -=- phone: +32 (0)16 322 166

"For something fulfilled this hour, loved or endured." (W.H. Auden)
#1 lore raw
Quoted 2 lines · Herta Van den Eynde

Where can I find the meaning of the different channels a process can be waiting in?

The WCHAN value is the name of the kernel function in which the process is currently blocked.

Quoted 1 line

And what do the alarm values represent?

The delay (in seconds) of an outstanding timer, as set by alarm() or setitimer().

Signature · 1 line
Glynn Clements <[email protected]>
#2 lore raw

Fine. I can see how alarm works.

Can you give me more details on how to find out what kernel functions such as rt_sigsuspend, pause, ... imply?

Herta

Quoted 22 lines · Glynn Clements
Quoted 3 lines · Herta Van den Eynde

Where can I find the meaning of the different channels a process can be waiting in?

The WCHAN value is the name of the kernel function in which the process is currently blocked.

Quoted 3 lines

And what do the alarm values represent?

The delay (in seconds) of an outstanding timer, as set by alarm() or setitimer().

Signature · 4 lines
Herta Van den Eynde       -=- Toledo system management
K.U. Leuven - Ludit       -=- phone: +32 (0)16 322 166

"For something fulfilled this hour, loved or endured." (W.H. Auden)
#3 lore raw
Quoted 4 lines · Herta Van den Eynde

Fine. I can see how alarm works.

Can you give me more details on how to find out what kernel functions such as rt_sigsuspend, pause, ... imply?

In many cases, the name is related to a system call, which will have a manual page (in section 2). E.g. rt_sigsuspend suggests the sigsuspend() system call; "man 2 sigsuspend" says (amongst other things):

int sigsuspend(const sigset_t *mask);

...

The sigsuspend call temporarily replaces the signal mask for the process with that given by mask and then suspends the process until a signal is received.

Similarly, do_select() is related to select() etc.

In other cases, you might have to refer to the kernel's source code to determine the nature of a function.

Signature · 1 line
Glynn Clements <[email protected]>