Prerequisites

Unix

Ruby 1.8.0 or later.

MS Windows

Ruby 1.8.2 or later.  Earlier versions segfault due to OLE bugs.
Active WMI service (normally on by default).

Installation

Unix

ruby extconf.rb
make
ruby test/tc_uname.rb (optional)
make site-install

MS Windows

ruby test\tc_uname.rb (optional)
ruby install.rb

Synopsis

require 'sys/uname'
include Sys

p Uname.uname

Solaris Notes

Folks building this package on SunOS get two extra methods: architecture()
and platform()

OS X Notes

OS X users get the extra method "model()".

HP-UX Notes

HP-UX users get the extra method "id()".  This is actually a String, not
a Fixnum, because that's how it's defined in the utsname struct.

MS Windows Notes

The C version for Windows has been completely scrapped in favor of an OLE
plus WMI approach.  It is pure Ruby.  Please see the MSDN documentation for
the Win32_OperatingSystem class for a complete list of what each of the
UnameStruct members mean.

Documentation

For more details, see the 'uname.txt' file under the 'doc' directory.