LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2005, 01:06 PM   #1
sarunya
LQ Newbie
 
Registered: Aug 2005
Posts: 7

Rep: Reputation: 0
sysinfo on 64bits machine with 32 bits kernels


I tested the simple program
***************************************************************************************************
int main(int argc, char ** argv)
{
struct sysinfo si;

if(sysinfo(&si) != 0) {
perror("ERROR: SYS_INFO FAIL\n");
exit(1);
}

printf("freeram (%luB), freeswap (%luB), totalram (%luB), totalswap (%luB)\n",
si.freeram, si.freeswap, si.totalram, si.totalswap);

return 0;
}

****************************************************************************************************

and run this program on a intellistation 64bits machine
currently there are 12 installed distros (various versions of RedHats and NLDs where each version RedHat and NLD, i have both 32bits version and 64 bits version) on each partitions. (currently with this machine i have partitioned it into 22 (partitions for distro with 6g for each partition), + 1 swap, +2 (/home and /grubsys)


It seemed that when I tested the program on 64bits distro version, the program gives the right memory values from sysinfo. BUT when i tried it on 32 bits distro version, it doesn't.
for 32 bits distro versions, I got :
freeram (489KB), freeswap (635KB), totalram (506KB), totalswap (641KB)

throughout various distros I installed but using 32 bits version of that distro.


seemed that somehow when running the program on 32bits distro it might have only grabs the lower 32 bits of a 64bits machine...
perhaps someone have any idea why this happen???
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java 64 bits and applications of 32 bits RGB_mdk Linux - Software 3 06-13-2005 10:05 AM
Sysinfo ?????? Linuxfrog Linux - Software 1 05-14-2005 09:55 PM
Mandrake for a 64Bits system Dreamcatcher Linux - Software 1 08-19-2004 05:06 PM
JDK 1.3.1 on RHEl v3 (64bits!) namgor Linux - Software 0 08-18-2004 03:05 PM
SYSINFO for Linux.... lnxkido Linux - Newbie 4 11-19-2003 06:51 PM


All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration