getconf LONG_BIT and isainfo conflict


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers getconf LONG_BIT and isainfo conflict
# 1  
Old 06-10-2008
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  
Old 06-10-2008
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  
Old 08-19-2008
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Different sizes with getconf DISK_SIZE and lspv

Hi all, when I issue a lspv <hdisk>, I get TOTAL PPs: 7199 (1842944 megabytes) When I issue a getconf DISK_SIZE /dev/<hdisk>, I get 1048576 Where do those additional ~800 GB come from the output of lspv.. anyone an idea? The volume is an EMC LUN provided by a VIOS and... (2 Replies)
Discussion started by: zaxxon
2 Replies

2. Ubuntu

NIS/RPCBind Conflict!

Hi I am trying to configure NIS client on my Ubuntu 12.04. But I could not put portmap without uninstalling rpcbind. Do I need to have rpcbind there on the server, or how can I have both portmap and rpcbind at same time there on the server, because it's having conflict. (1 Reply)
Discussion started by: nixhead
1 Replies

3. Solaris

i have conflict with memory utilization

dear all, kindly i want to check my server memory utilization i used alot of commands but i want to make sure that it is acurate let me explain i have a server which has 32GB RAM Total Memory = 33423360 kb Free Memory = 4172568 kb Utilized Memory = 29250792 kb Memory Utilization... (2 Replies)
Discussion started by: maxim42
2 Replies

4. Shell Programming and Scripting

Conflict with the operator in IF

I am using a script like this source=$1 if ; then echo "got it" else echo "lost it" fi But the script is giving th error like script.ksh: ==: unknown test operator Can i know , is the syntax iam using is correct or suggest me a good way. ... (3 Replies)
Discussion started by: nani1984
3 Replies

5. Solaris

IP address conflict

Hi, I am currently working on 2 SPARC-ENTREPRISE T5220 (cluster servers), named SERVER 3A and SERVER 3B. Both servers have their own Ip ADRESS and share 1 Virtual IP adress to share applications....... Both servers are available , but can't communicate together right now. For example, from... (8 Replies)
Discussion started by: feg
8 Replies

6. Solaris

Solaris 9 IP conflict

Hi Gurus I am in a strange situation. I have a SUN sparc server . The server was having an IP say X..... (this IP X is now being used by another server)..... I have just installed fresh solaris 9 OS on the same server and given new IP say Y. I also configured probe based IPMP with ce0 and... (2 Replies)
Discussion started by: ningy
2 Replies

7. Solaris

Conflict with PIDs

I am trying to determine the root cause of a java process that dies trying to startup during it's cron job. I did go ahead and change the time that it starts up in the cron file and now it starts successfully. However is there a way to determine what PID a process was attempting to get when... (5 Replies)
Discussion started by: vedder191
5 Replies

8. HP-UX

Conflict between df -k and du -sk...again

Hi, I know this has been discussed a number of time but i could not get the exact answer. So need help again. Issue: The two command for same file system shows different size. du -sk shows toatl size is 12780685 KB while df -k 45289229 used allocated Kb /oxt/mantran/bin $ du -sk... (8 Replies)
Discussion started by: malaya_17
8 Replies

9. UNIX for Dummies Questions & Answers

DNS Conflict

I host a few websites for friends and lately my server has been bogging down at times. I think that it is because of a dns conflict. Someone said that by doing a nslookup I should be able to see it and then do a pkill -9 in.named and then do in.named to get it going again. Any feedback on this... (1 Reply)
Discussion started by: thomi39
1 Replies

10. Solaris

invalid getconf output and Perl compile

I was compiling perl on a Solaris 10 server. The compile failed because the output of getconf is wrong (it indicates xarch is generic64 not v9. This is a known bug but I cannot find a fix. I wrote a script as suggested that changes it but when you run getconf again it goes back to generic64. ... (2 Replies)
Discussion started by: csross
2 Replies
Login or Register to Ask a Question