vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| 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 |
| |||
| 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. |
| |||
| Try 'uname -m Hope this helps Message posted via ==================== www.linuxpackages.net/foru www.linuxpackages.ne Expanding the world of Slackwar ===================== |
| ||||
| 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 ---------------------------------------------------------------------- |