Valori di WCHAN in ps

5

Che cosa significa esattamente WCHAN (canale in attesa)? quale può essere il suo valore e cosa rappresentano questi valori? Ho provato a trovarli ma non ho ottenuto nulla.

    
posta Chirag Acharya 28.09.2015 - 11:45

1 risposta

1

Da man ps , sezione Standard Format Specifiers :

nwchan     WCHAN     address of the kernel function where the process
                     is sleeping (use wchan if you want the kernel
                     function name).  Running tasks will display a
                     dash ('-') in this column.
wchan      WCHAN     name of the kernel function in which the process
                     is sleeping, a "-" if the process is running, or
                     a "*" if the process is multi-threaded and ps is
                     not displaying threads.

Come si può vedere, sono le funzioni del kernel attualmente utilizzate dal processo. Inoltre:

-n namelist
      Set namelist file.  Identical to N.  The namelist file is needed
      for a proper WCHAN display, and must match the current Linux
      kernel exactly for correct output.  Without this option, the
      default search path for the namelist is:

              $PS_SYSMAP
              $PS_SYSTEM_MAP
              /proc/*/wchan
              /boot/System.map-$(uname -r)
              /boot/System.map
              /lib/modules/$(uname -r)/System.map
              /usr/src/linux/System.map
              /System.map

Puoi controllare /boot/System.map-$(uname -r) su Ubuntu per un elenco di funzioni:

$ sudo head /boot/System.map-$(uname -r)
0000000000000000 D __per_cpu_start
0000000000000000 D irq_stack_union
0000000000000000 A xen_irq_disable_direct_reloc
0000000000000000 A xen_save_fl_direct_reloc
00000000000001e0 A kexec_control_code_size
0000000000004000 d exception_stacks
0000000000009000 D gdt_page
000000000000a000 D espfix_waddr
000000000000a008 D espfix_stack
000000000000a020 D cpu_info
    
risposta data muru 28.09.2015 - 13:33

Leggi altre domande sui tag