The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
DNS Conflict thomi39 UNIX for Dummies Questions & Answers 1 04-05-2008 01:33 PM
invalid getconf output and Perl compile csross SUN Solaris 2 05-02-2007 06:03 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-10-2008
nosrednayduj nosrednayduj is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 1
getconf LONG_BIT and isainfo conflict

I wish to programmatically determine whether a solaris system is 32-bit or 64-bit. Investigation on the web suggested that the following commands were the right way to test this:

# isainfo -kv

# getconf LONG_BIT

Strangely, on all three of the solaris systems I have access to, isainfo returned
64-bit sparcv9 kernel modules
but getconf returned 32! Which is right? I had believed based on statements by a former coworker that one system was 32 bit and another was 64 (and I didn't know for the third), but then when I went to check, I got really confused.
  #2 (permalink)  
Old 06-10-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,125
A "solaris system" is a collection of things. You need to specify exactly what you want to measure. " isainfo -kv" is telling you that you have a 64 bit kernel. "getconf LONG_BIT" is an odd command to run. It is telling you that as the getconf program was being compiled, a "long" integer would have been allocated 32 bits. Here's why:
Code:
# file /usr/bin/getconf
/usr/bin/getconf:       ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
They are both right and do not conflict.
  #3 (permalink)  
Old 08-19-2008
Jes007 Jes007 is offline
Registered User
  
 

Join Date: Aug 2008
Location: New Mexico
Posts: 1
Another thing to try is

getconf -v POSIX_V6_LP64_OFF64 LONG_BIT

or

getconf -v XBS5_LP64_OFF64 LONG_BIT

The -v option specifies a 64 bit environment. I don't think the getconf command is returning 32 just because it was compiled as a 32 bit executable. I believe it is returning 32 because your default compiling environment is 32 bit. It should be getting its info from /usr/include/limits.h or /usr/include/unistd.h

I don't have access to a solaris machine, so I cannot test this out for you.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0