UNIX version check command

UNIX version check command

Post by p4 » Sun, 27 Jan 2002 10:29:58



A quick question.  What is the shell command to determine the version of
Xnix that is currently running?
 
 
 

UNIX version check command

Post by Tony Lawrenc » Sun, 27 Jan 2002 11:42:35



> A quick question.  What is the shell command to determine the version of
> Xnix that is currently running?

Usually some variant of uname, often "uname -a", but all sorts of other
possibilies: -v, -X .. who knows?  Depends on the flavor and in some
cases even the version of that flavor.

Sometimes /etc/issue has what you want..

--
Tony Lawrence
SCO/Linux Support Tips, How-To's, Tests and more: http://pcunix.com

 
 
 

UNIX version check command

Post by Tony Lawrenc » Sun, 27 Jan 2002 11:58:26




>> A quick question.  What is the shell command to determine the version of
>> Xnix that is currently running?

> Usually some variant of uname, often "uname -a", but all sorts of other
> possibilies: -v, -X .. who knows?  Depends on the flavor and in some
> cases even the version of that flavor.

> Sometimes /etc/issue has what you want..

Oh, and one more thing:

Even when the man page tells you that uname -v gives you the version, it can be an

entirely different interpretatioon of version than what you would think.

For example, on this 2.4 kernel Red Hat box, uname -r says 2.4.9-21. Thatt's good.

But uname -v gives "#1" and todays date (yes, I did build a new kernel today)

On the SCO system I'm trying to recover for a client to my left, uname -r says 3.2

and uname -v says "2", but uname -X says "Release=3.2v5.0.4"

On the BSD box to my right, uname -r says 4.1.1-STABLE and -v says that and more.

Can't trust it unless you already know how it works :-)

--
Tony Lawrence
SCO/Linux Support Tips, How-To's, Tests and more: http://pcunix.com

 
 
 

UNIX version check command

Post by Michael Heimin » Sun, 27 Jan 2002 15:29:39



Saturday 26 January 2002 03:58:



>>> A quick question.  What is the shell command to determine the
>>> version of Xnix that is currently running?

[SNIP]
.

Quote:

> Can't trust it unless you already know how it works :-)

Sure, best should be, checking 'man uname', case in doubt....;-)

Michael Heiming
--
Remove the +SIGNS case mail bounces.

 
 
 

UNIX version check command

Post by Tony Lawrenc » Sun, 27 Jan 2002 21:46:50




> Saturday 26 January 2002 03:58:



>>>>A quick question.  What is the shell command to determine the
>>>>version of Xnix that is currently running?

> [SNIP]
> .

>>Can't trust it unless you already know how it works :-)

> Sure, best should be, checking 'man uname', case in doubt....;-)

But as I showed in the examples you clipped, that doesn't necessarily
help you either.

The SCO man page says that uname -v gives the version.  It does warn
that it will always be "2", but  it's only in recent versions that it
goes on to explain that what you really want is obtained from uname -X.

Nothing in uname on this Redhat system returns "Redhat 7.1", which is
what many would consider the release- the specific kernel version is
perhaps the next thing you'd want to know.

I still say that even with the man page, if you aren't experienced with
the OS, you aren't necessarily going to get what you want without a
fight :-)

--
Tony Lawrence
SCO/Linux Support Tips, How-To's, Tests and more: http://pcunix.com

 
 
 

UNIX version check command

Post by Michael Heimin » Mon, 28 Jan 2002 02:50:48



at Saturday 26 January 2002 13:46:

[SNIP]

Quote:> I still say that even with the man page, if you aren't experienced
> with the OS, you aren't necessarily going to get what you want
> without a fight :-)

OK, agreed, 'cat /proc/version' should give additional info on Linux
2.4.x, I wouldn't expect uname telling me anything about the distro
on a Linux system, this is of course different with commercial *nix,
where the kernel and mostly whole OS is made by a single vendor...;-)

Michael Heiming
--
Remove the +SIGNS case mail bounces.

 
 
 

UNIX version check command

Post by Brian Hile » Tue, 29 Jan 2002 04:57:22



> A quick question.  What is the shell command to determine the version of
> Xnix that is currently running?

As you no doubt are aware by now, the method by which a person may
robustly determine the Unix and version is a system-dependent mess.
Best is to use the script tools available for automatic configuration
of the GNU tools: config.guess and config.sub in the autoconf
distribution . Either of these two scripts show configuration,
host, hardware, and version info in a canonical format.

They are lengthy, slow, and involved, but have the merit of being
scripted (and debugged!) by many others; if your application doesn't
merit this sophistication, I suggest perusing the code to see how
config.guess or config.sub extracts the system info for your system.

http://subversions.gnu.org/cgi-bin/cvsweb/autoconf/config/config.guess
http://subversions.gnu.org/cgi-bin/cvsweb/autoconf/config/config.sub

=Brian

 
 
 

UNIX version check command

Post by Harry Putna » Tue, 29 Jan 2002 08:49:03



> They are lengthy, slow, and involved, but have the merit of being
> scripted (and debugged!) by many others; if your application doesn't
> merit this sophistication, I suggest perusing the code to see how
> config.guess or config.sub extracts the system info for your system.

Brian,
Will that technique or any others you know of dig out the cpu clock
speed.  I recently needed to get that remotely from an older FreeBSD
installation and suddenly realized I had no clue how to get it.

I may have used the wrong terminology there but I mean the spec one
always sees on machines for sale in stores like :

For pc hardware:
Athlon 1.2ghz  Celeron 800mhz  etc.

 
 
 

UNIX version check command

Post by fred » Tue, 29 Jan 2002 12:11:23




> > They are lengthy, slow, and involved, but have the merit of being
> > scripted (and debugged!) by many others; if your application doesn't
> > merit this sophistication, I suggest perusing the code to see how
> > config.guess or config.sub extracts the system info for your system.

> Brian,
> Will that technique or any others you know of dig out the cpu clock
> speed.  I recently needed to get that remotely from an older FreeBSD
> installation and suddenly realized I had no clue how to get it.

> I may have used the wrong terminology there but I mean the spec one
> always sees on machines for sale in stores like :

> For pc hardware:
> Athlon 1.2ghz  Celeron 800mhz  etc.

From a friendly poster in a redhat newsgroup:

rpm -q redhat-release

maybe that will help you

fred

 
 
 

UNIX version check command

Post by Brian Hile » Wed, 30 Jan 2002 09:08:42



> Will that technique or any others you know of dig out the cpu clock
> speed.  I recently needed to get that remotely from an older FreeBSD
> installation and suddenly realized I had no clue how to get it.

I confess but that I am a bit confused as to the applicability of
what I _thought_ your were requesting insofar as you wanted a
_software_ report. uname(1) was mentioned, and since uname does not
give hardware info I figured that a standardized format was your
primary goal.

Perhaps Fred's submission will have been of some help.

=Brian

 
 
 

UNIX version check command

Post by Harry Putna » Wed, 30 Jan 2002 10:17:16




>> Will that technique or any others you know of dig out the cpu clock
>> speed.  I recently needed to get that remotely from an older FreeBSD
>> installation and suddenly realized I had no clue how to get it.

> I confess but that I am a bit confused as to the applicability of
> what I _thought_ your were requesting insofar as you wanted a
> _software_ report. uname(1) was mentioned, and since uname does not
> give hardware info I figured that a standardized format was your
> primary goal.

I just butted in here with my question but I thought uname gave some
hardware info too.  If not then what does? I guess is what I was
asking.  Sorry if it confused things in the thread.  Or displayed bad
manners.

On an older solaris uname -a
SunOS io 5.5.1 Generic_103640-24 sun4m sparc SUNW,SPARCstation-5

Isn't at least the entry `sparc' and the last one about hardware?

From an older FreeBSD machine:
 $ uname -a
FreeBSD HOST 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0:
Wed Jan 13 11:23:30 GMT 1999    

Doesn't i386 refer to hardware?

From the Solaris `man uname'

[...]
     -i              Print the name of the  hardware  implementa-
                    tion (platform).

     -m              Print the machine hardware name (class). Use
                    of  this  option is discouraged; use uname -p
                    instead.  See NOTES section below.
[...]

Does any thing tell about the cpu or clock speed, that you know of?
I mean something you can type at the command line and get that info.

 
 
 

UNIX version check command

Post by Arto Viitane » Wed, 30 Jan 2002 17:00:40


 Tony> Nothing in uname on this Redhat system returns "Redhat 7.1", which is
 Tony> what many would consider the release- the specific kernel version is
 Tony> perhaps the next thing you'd want to know.

Both Redhat and Mandrake (and maybe other Redhat-kind Linuxes) has file
/etc/redhat-release. My Mandrake gives

Mandrake Linux release 8.1 (Vitamin) for i586

--

University of Tampere, Department of Computer and Information Sciences
Tampere, Finland                                      http://www.cs.uta.fi/~av/

 
 
 

UNIX version check command

Post by R. DuFresn » Wed, 30 Jan 2002 19:18:12


AUTHOR
     MagniComp
     http://www.MagniComp.com

URL
     http://www.magnicomp.com/sysinfo

FILES
     /etc - Directory of config files
     /etc/sysinfo.cf - Master configuration file
     /etc/sysmodel  - Explicitly set the CPU model name

Works on nwer suns it seems, at least some I use, perhaps it's an addon tool.

For the linux folks;

SYNOPSIS
       /bin/linuxinfo

DESCRIPTION
       linuxinfo

       Displays  the system information about the system,
              including ker- nel version, number and type of pro-
              cessors
              in system,  version  of  system  library  (libc  or
              glibc).

again, an addon I think, have not seen it as a default in any dists:

do a google search for source.

Thanks,

Ron DuFresne



:>> Will that technique or any others you know of dig out the cpu clock
:>> speed.  I recently needed to get that remotely from an older FreeBSD
:>> installation and suddenly realized I had no clue how to get it.
:>
:> I confess but that I am a bit confused as to the applicability of
:> what I _thought_ your were requesting insofar as you wanted a
:> _software_ report. uname(1) was mentioned, and since uname does not
:> give hardware info I figured that a standardized format was your
:> primary goal.

: I just butted in here with my question but I thought uname gave some
: hardware info too.  If not then what does? I guess is what I was
: asking.  Sorry if it confused things in the thread.  Or displayed bad
: manners.

: On an older solaris uname -a
: SunOS io 5.5.1 Generic_103640-24 sun4m sparc SUNW,SPARCstation-5

: Isn't at least the entry `sparc' and the last one about hardware?

: From an older FreeBSD machine:
:  $ uname -a
: FreeBSD HOST 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0:
: Wed Jan 13 11:23:30 GMT 1999    

: Doesn't i386 refer to hardware?

: From the Solaris `man uname'

: [...]
:      -i              Print the name of the  hardware  implementa-
:                     tion (platform).

:      -m              Print the machine hardware name (class). Use
:                     of  this  option is discouraged; use uname -p
:                     instead.  See NOTES section below.
: [...]

: Does any thing tell about the cpu or clock speed, that you know of?
: I mean something you can type at the command line and get that info.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        admin & senior security consultant:  sysinfo.com
                        http://sysinfo.com

"Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
                -- Johnny Hart

testing, only testing, and damn good at it too!

 
 
 

UNIX version check command

Post by Brian Hile » Thu, 31 Jan 2002 10:43:28





>>> Will that technique or any others you know of dig out the cpu clock
> asking.  Sorry if it confused things in the thread.  Or displayed bad
> manners.

I didn't perceive that as an issue.

Quote:> Isn't at least the entry `sparc' and the last one about hardware?

Kind of. It's the "kernel hardware configuration" or "kernel hardware
implementation" info (I have heard both). The only significance
would be either for heterogenous-CPU machines (one of which I worked
on many years ago with both a Z8000 and a M68010) or cross-compiler
kernel development. One of the reasons for recommending config.guess
is that this script standardizes the reporting of such information,
which in most part (but not all!) is derived from uname(1).

Quote:> Does any thing tell about the cpu or clock speed, that you know of?
> I mean something you can type at the command line and get that info.

IRIX has hinv(1m) ("hardware inventory"). In all Unices, I suspect,
this information, when it is available at all through user-level
tools, is system dependent.

=Brian

 
 
 

UNIX version check command

Post by those who know me have no need of my nam » Mon, 04 Feb 2002 20:38:10



Quote:>Will that technique or any others you know of dig out the cpu clock
>speed.  

nothing portable.

--
okay, have a sig then