Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* 0.99pl4 kernel patch for xsysinfo-1.1
@ 1993-01-28 18:51 Gabor Herr
  1993-01-31  0:50 ` Octave-0.66 binary uploaded at sunsite.unc.edu F.F. Yap
  0 siblings, 1 reply; 2+ messages in thread
From: Gabor Herr @ 1993-01-28 18:51 UTC (permalink / raw)


Hi,

the kernel patch included in the xsysinfo-1.1 archive doesn't work with
the new 0.99pl4 release of the Linux kernel. So here is a modified
patch relative to pl4.

I hope Linus will add these changes to the next kernel release, so
this patch will not be necessary in the future.

Gabor


diff -cr old/linux/fs/proc/array.c linux/fs/proc/array.c
*** old/linux/fs/proc/array.c	Tue Jan 26 23:07:32 1993
--- linux/fs/proc/array.c	Tue Jan 26 22:28:23 1993
***************
*** 46,51 ****
--- 46,62 ----
  	return sprintf(buffer,"%d\n",(jiffies+jiffies_offset)/HZ);
  }
  
+ /*
+  * the (absolute) idle time is the processing time of task 0, the unswappable
+  * idle task. The current ticks value is also returned, so the relative
+  * idle time can easily computed with two succesive reads of /proc/idle.
+  */
+ static int get_idle(char * buffer)
+ {
+ 	return sprintf(buffer,"%d %d\n",
+ 		task[0]->utime + task[0]->stime, jiffies + jiffies_offset);
+ }
+ 
  static int get_meminfo(char * buffer)
  {
  	struct sysinfo i;
***************
*** 306,311 ****
--- 317,325 ----
  			break;
  		case 6:
  			length = get_version(page);
+ 			break;
+ 		case 8:
+ 			length = get_idle(page);
  			break;
  		case 9:
  			length = get_env(pid, page);
diff -cr old/linux/fs/proc/root.c linux/fs/proc/root.c
*** old/linux/fs/proc/root.c	Tue Jan 26 23:07:32 1993
--- linux/fs/proc/root.c	Tue Jan 26 22:28:23 1993
***************
*** 57,63 ****
  	{ 4,7,"meminfo" },
  	{ 5,4,"kmsg" },
  	{ 6,7,"version" },
! 	{ 7,4,"self" }	/* will change inode # */
  };
  
  #define NR_ROOT_DIRENTRY ((sizeof (root_dir))/(sizeof (root_dir[0])))
--- 57,64 ----
  	{ 4,7,"meminfo" },
  	{ 5,4,"kmsg" },
  	{ 6,7,"version" },
! 	{ 7,4,"self" },	/* will change inode # */
!  	{ 8,4,"idle" }	
  };
  
  #define NR_ROOT_DIRENTRY ((sizeof (root_dir))/(sizeof (root_dir[0])))

-- 
############################################################################
Gabor Herr			Email: herr@iti.informatik.th-darmstadt.de
Computer Science Department
Technical University of Darmstadt, Germany

-- 
Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-01-31  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-01-28 18:51 0.99pl4 kernel patch for xsysinfo-1.1 Gabor Herr
1993-01-31  0:50 ` Octave-0.66 binary uploaded at sunsite.unc.edu F.F. Yap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox