<linux/kernel.h>

Marco van de Voort marcov at stack.nl
Sun Mar 12 19:00:14 UTC 2006


> > storage size of 's_info' isn't known
> >
> > Line 400 in the .c file are:
> > struct sysinfo s_info;
> >
> > All help appreciated!
> >
> > \\troback
> >   
> I'm not too much of a programmer, but if you let me know what source you 
> are trying to compile, I could possibly take a look at it when I have 
> some time. I'm sure we can figure something out. Otherwise I'm sure 
> there are some more friendly faces on this list that could assist you. I 
> think this is more of a -questions type of question, since it doesnt 
> have to deal with the ports infrastructure. Maybe try there? Send a link 
> to download the source you are trying to compile and related information 
> in your porting effort and I'll see what I can do.

IIRC sysinfo is an old syscall (function?) that gives some info like uptime,
load, memory, number of procs and a small string. (I only have an old pascal
source from the linux specific part of our port, but that should give you a
good idea of the type of fields:)

 TSysinfo = packed record
    uptime    : longint;
    loads     : array[1..3] of longint;
    totalram,
    freeram,
    sharedram,
    bufferram,
    totalswap,
    freeswap  : longint;
    procs     : integer;
    s         : string[18];  	// char c[19] probably.
  end;

Note this prototype is a bit old, there might be fields added.

I think all stuff that could be gotten using a few sysctls. However the
problem is what it does with that info. If it e.g. takes decisions based on
"ram" amounts it depends on how it counts. The same with "load".



More information about the freebsd-ports mailing list