title: how to find if the kernel being used is real time or not
body: <p>I have patched a linux kernel 3.2 with a rt patch and have then installed it. Now in the GRUB menu I am able to select the kernel and it also contains the suffix -rt. But I am still not sure if it actually has real time capabilities. Is there a way to find out if it is a real time kernel or an ordinary vanilla kernel?
  Further according to an example in rtwiki, which informs whether we are using a vanilla or a rt preempt kernel.   </p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;sys/utsname.h&gt;
  int main(int argc, char **argv)
  {
  struct utsname u;
  int crit1, crit2 = 0;
  FILE *fd;
  uname(&amp;u);
  crit1 = strcasestr (u.version, "PREEMPT RT");
  if ((fd = fopen("/sys/kernel/realtime","r")) != NULL) {
  int flag;
  crit2 = ((fscanf(fd, "%d", &amp;flag) == 1) &amp;&amp; (flag == 1));
  fclose(fd);
  }
  fprintf(stderr, "this is a %s kernel\n",
  (crit1 &amp;&amp; crit2) ? "PREEMPT RT" : "vanilla");
  }
  </code></pre>
  
  <p>This code access's a file named realtime from sys/kernel, but no such file was created when i patched my kernel with an rt patch.</p>