whatami - prints a string describing the system type
whatami [-t] [-n] [-r] [-m] [-a] [-help] [-l]
[-v] [-h] [--help] [--version]
By default, whatami prints a string that identifies the operating system that is being run. The
string is intended to be specific enough to differentiate systems that need
to have different types of binaries, (i.e. solaris vs. irix vs. linux) but
not so specific as to know give all of the details of the operating system
(such as cpu type, minor version of the os, and so on).
whatami can take a single command line argument, most of which add more data to the
single line that is printed.
Lists the architecture strings that whatami knows about.
Prints the machine type, as if no option has been used.
Prints the name of the operating system, as specified by the vendor.
Prints the name and release of the operating system, separated by a space.
These are as specified by the vendor, and may or may not be useful.
Prints the hardware string for the machine. This is of dubious value, and
depends primarily on the vendor's implementation of uname. For example, on older Suns, it differentiates between sun4m and sun4c,
which is sometimes important for programs that know about kernel types.
All. Prints the type, hardware, os, and versions, separated by a space.
- -h, --help
Prints the usage message.
- -v, --version
Prints the version of whatami.
You'd think this program wouldn't be necessary, as UNIX should provide
something that does this... but it is.
One way we use this it to differentiate between sets of compiled binaries
that work for different types of computers. In our global NFS space, you
can get to all of the software in our envrionment, and these are organized
by whatami string:
New architecture strings will be needed when a new architecture has been
defined, which usually happens when a new set of software has to be built
for a new operating system / CPU combination. (This can be very tricky when
operating systems support backwards compatibility but not forwards
compatibility.) In general, whatami tries to provide enough information to differentiate between possible
architectures but not so much to confuse scripts that call it.
New architecture strings can easily be added as needed, which is why the
program can be queried to find out what architectures it knows about.
If you would like more strings added to the canonical release of whatami
please send mail with the string name, relevant system details, and
possible code updates to firstname.lastname@example.org.
If whatami can't figure out what's going on, it will print ``unknown'' and exit with
an error status of 1.
whatami is part of the Msys Systems Administrator Toolkit, http://www.mcs.anl.gov/msys/ .
Copyright (c) University of Chicago 1999. See the COPYRIGHT file in the
distribution or on the web page for details.