title: extracting task_struct attributes
body: <p>I'm trying to build a kernal module that can extract attributes of task_struct. I tries the task_struct members <a href="http://www.tldp.org/LDP/tlk/ds/ds.html" rel="nofollow">here</a> and the stat members <a href="http://man7.org/linux/man-pages/man5/proc.5.html" rel="nofollow">here</a>. However when I make the module using the <code>make</code> command, I got this error for most of the member is, </p>
  
  <pre><code>‘struct task_struct’ has no member named ‘priority’
  </code></pre>
  
  <p>here is how I do it:</p>
  
  <pre><code>printk(KERN_INFO " process Information:\ncomm: %s \npid: %d \nppid: %d \nstate: %c \nprio: %d \nnice: %ld \npgrp: %d \nutime: %ld \npriority: %d \nprocessor: %d\nvsize: %lu \nrss: %lu \ntext (code): %ld\n", 
                  pTask-&gt;comm, pTask-&gt;pid, pTask-&gt;pptr-&gt;ppid, pTask-&gt;state, pTask-&gt;prio, pTask-&gt;nice, task_pgrp_vnr(pTask), pTask-&gt;utime, pTask-&gt;priority, pTask-&gt;processor, pTask-&gt;Vsize, pTask-&gt;rss, pTask-&gt;text);
  </code></pre>
  
  <p>Here is the libraries included in my code:</p>
  
  <pre><code>#include &lt;linux/module.h&gt; 
  #include &lt;linux/kernel.h&gt; 
  #include &lt;linux/init.h&gt; 
  #include &lt;linux/list.h&gt;     
  #include &lt;linux/sched.h&gt; 
  #include &lt;linux/cred.h&gt;     
  #include &lt;linux/pid.h&gt;
  </code></pre>
  
  <p>Hints? from where I can get these members? what libraries I need to include?</p>