Unix Technical Forum

i?86 variable?

This is a discussion on i?86 variable? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, I'm actually writing a series of scripts using checkinstall. Q: how do I find out which i?86 I ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 02:37 PM
Niki Kovacs
 
Posts: n/a
Default i?86 variable?

Hi,

I'm actually writing a series of scripts using checkinstall.

Q: how do I find out which i?86 I am on? My scripts are supposed to run on
different architectures, and I give the result of a source compilation over
to checkinstall, and I'd like to inform the --pkgrelease field with a
variable that is i686 on i686 systems, i486 on i486, and so on.

Any suggestions?

Niki Kovacs
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:37 PM
Thomas Ronayne
 
Posts: n/a
Default Re: i?86 variable?

Niki Kovacs wrote:
> Hi,
>
> I'm actually writing a series of scripts using checkinstall.
>
> Q: how do I find out which i?86 I am on? My scripts are supposed to run on
> different architectures, and I give the result of a source compilation over
> to checkinstall, and I'd like to inform the --pkgrelease field with a
> variable that is i686 on i686 systems, i486 on i486, and so on.
>
> Any suggestions?
>
> Niki Kovacs
>

uname -m

--
Everything works -- if you let it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 02:37 PM
William Hunt
 
Posts: n/a
Default Re: i?86 variable?

On Wed, 15 Feb 2006, Niki Kovacs wrote:
> Q: how do I find out which i?86 I am on? My scripts are supposed to run on
> different architectures, and I give the result of a source compilation over
> to checkinstall, and I'd like to inform the --pkgrelease field with a
> variable that is i686 on i686 systems, i486 on i486, and so on.
> Any suggestions?


maybe read /proc/cpuinfo ?

idunno but i'm guessing 'cpu family' is what you want.
a quick check here shows an Athlon and a P3 as '6' and
an ancient pentium 166 as '5'.


--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 02:37 PM
Niki Kovacs
 
Posts: n/a
Default Re: i?86 variable?

Thomas Ronayne wrote:


>>

> uname -m
>


echo "Thanks very much!"

Niki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 02:37 PM
Thomas Ronayne
 
Posts: n/a
Default Re: i?86 variable?

Niki Kovacs wrote:
>
> echo "Thanks very much!"
>
> Niki
>

print "Y'all are very welcome."

--
Everything works -- if you let it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 02:38 PM
LittleJohn
 
Posts: n/a
Default Re: i?86 variable?

Thomas wrote:

> Niki wrote:
>> Q: how do I find out which i?86 I am on?


> uname -m


I think you'll find that doesn't hold for all chips. I have one computer
with a VIA C3 which reports 686 under Slack 10.0 and hangs on some 686
instructions. It works fine after I set flags to i586. And I have another
AMD 64 bit cpu that reports x86_64 running Slamd64 10.2, which is a bit
confusing. (Why not 686_64 or higher...?)

LittleJohn
Madison, AL

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 02:38 PM
Grant
 
Posts: n/a
Default Re: i?86 variable?

On Wed, 15 Feb 2006 13:55:42 +0100, Niki Kovacs <mickey@mouse.com> wrote:

>Q: how do I find out which i?86 I am on? My scripts are supposed to run on


Have you done some benchmarking to discover how much difference
compiling applications for different i?86 makes?

Grant.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 02:38 PM
dieymir
 
Posts: n/a
Default Re:i?86 variable?

Try 'uname -m

Hope this helps

Message posted via
====================
www.linuxpackages.net/foru
www.linuxpackages.ne
Expanding the world of Slackwar
=====================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 02:39 PM
Sylvain Robitaille
 
Posts: n/a
Default Re: i?86 variable?

William Hunt wrote:

> maybe read /proc/cpuinfo ?
>
> idunno but i'm guessing 'cpu family' is what you want.
> a quick check here shows an Athlon and a P3 as '6' and
> an ancient pentium 166 as '5'.


Unfortunately that won't easily provide what I believe is being sought,
in all cases. On a system I have here, running Slackware-10.2:

: calliope[syl] ~; cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 47
model name : AMD Athlon(tm) 64 Processor 3500+
...
: calliope[syl] ~; uname -m
i686


I'm not sure where the uname(2) system call gets the machine type
information, but I suspect it may be compiled into either the kernel
(though that _has_ been customized with the proper processor
information), or the C library, for example.

--
----------------------------------------------------------------------
Sylvain Robitaille syl@alcor.concordia.ca

Systems and Network analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com