[lkml]   [2001]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Hai
Naveen Kumar Pagidimarri wrote:
> Hai All,
> I am trying to display the detailes of freeram and ramfilled
> and number of current processes running thru a programme I don't want to
> use system calls and getting info from proc files.I want to display
> these detailes by accessing from sysinfo.Is it possible.Otherwise
> suggest me where i can get related source.
> Thank u all in advance
#include <linux/kernel.h>
#include <linux/sys.h>

struct sysinfo {
long uptime;
unsigned long loads[3]; //machin's load during last minute, last five
min, and last 15 min.
unsigned long totalram;
unsigned long freeram;
unsigned long sharedram;
unsigned long bufferram;
unsigned long totalswap;
unsigned long freeswap;
unsigned short procs; //number of process
char[22] _f; //padding to reach 64 bytes length

int sysinfo(struct sysinfo *info);

To browse the source code of open systems is the key :-)

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

Julien Laganier
Student Intern
Sun Microsystem Laboratories
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:56    [W:0.038 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site