sysinfo()
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > sysinfo()




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    sysinfo()  
seand


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-07-04 01:37 AM

Hi all,

On a gnu/linux system, sysinfo()(3) and free(1) return diff result(i don't
think printf() with %u format caused this, but not sure):
/* sysinfo() result */
loads: 65536 66144 65824  totalram: 965817  freeram: 124591  sharedram:
247432  bufferram: 68788  totalswap: 524110  freeswap: 524110

# free result
total       used       free     shared    buffers     cached
Mem:       3863268    3341292     521976     989728     275152    1523100
-/+ buffers/cache:    1543040    2320228
Swap:      2096440          0    2096440

and how to convert load average value 65536 to 1.** format?


TIA

-s







[ Post a follow-up to this message ]



    Re: sysinfo()  
Martin Blume


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-04 10:44 PM

"seand" schrieb
> Hi all,
>
> On a gnu/linux system, sysinfo()(3) and free(1) return diff
> result ...
>

hard to say, without the source code, but
(1) did you take the trouble to have a look at the man-page
(2) did you take into account that sysinfo
.. Since Linux 2.3.23(i386), 2.3.48 (all architectures)
the structure is
struct sysinfo {
..
unsigned long totalram;
..
unsigned int mem_unit;
..
and the sizes are given as multiples of
mem_unit bytes. ...
(according to man sysinfo)

Perhaps this can be a start towards the explanation.

HTH
Martin









[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:02 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register