Introduction
UNIX and UNIX-like platforms provide tools to get information about the operating system, hardware configuration and installed software from the command-line. These can be useful for casual investigation of a system, or for producing programs which can modify their behavior depending on the platform or available hardware.
While some of these commands are generic and are present on most systems, the tools capable of getting the most detailed information are often system specific. Detailed below are commands for obtaining details about a selection of UNIX and UNIX-like platforms.
For more details about the commands and the available options see the system manual pages (e.g. man uname).
OS Version
On POSIX compatible operating systems, including most UNIX and UNIX-like systems, the uname command can be used to get some information about the operating system and platform. The simplest option is to display all the information available by using the "-a" (all) option.
- Apple MacOS X 10.3.9 on a PowerPC system:
$ uname -a Darwin pyrus.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc
- HP Tru64 UNIX 5.1B on an Alpha system:
$ uname -a OSF1 laurus.woods V5.1 2650 alpha
- HP-UX 11i v1, B.11.11 on a PA-RISC system:
$ uname -a HP-UX ulmus B.11.11 U 9000/785 2011398448 unlimited-user license
- IBM AIX - to check
- Linux 2.6 for Ubuntu 8.04 LTS (Hardy Heron) on x86:
$ uname -a Linux ubuntu 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i586 GNU/Linux
- Microsoft Windows XP using Cygwin:
$ uname -a CYGWIN_NT-5.1 salix 1.5.3(0.90/3/2) 2003-09-01 13:15 i686 unknown unknown Cygwin
- SGI IRIX 6.5.11m on an SGI O2:
% uname -a IRIX alnus 6.5 01101246 IP32
- Sun Solaris 2.6 (SunOS 5.6) on a SPARC system:
$ uname -a SunOS hieracium 5.6 Generic_105181-03 sun4m sparc sun4m
- OpenSolaris 2009.06 on a x86_64 system:
$ uname -a SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris
The uname - Wikipedia page details uname output for a wide range of platforms.
Some other platforms implement a UNIX-like command-line environment, but are not entirely POSIX compliant:
- BeOS 5 Professional for Intel:
$ uname -a BeOS beos5-vm 5.0 1000009 BePC unknown
- QNX RTOS 6.1.0 for x86:
# uname -a QNX crataegus 6.1.0 2001/06/25-15:31:48edt x86pc x86
Boot/System Messages
On most UNIX systems the system log contains information about hardware detection. This is usually logged to /var/log/messages. On some systems the dmesg command can be used to get this information, as a normal user.
Virtual Memory
To get information on virtual memory use the vmstat command:
$ vmstat procs memory page disk faults cpu r b w swap free re mf pi po fr de sr f0 s0 s3 -- in sy cs us sy id 0 0 0 268512 4968 2 27 50 50 60 0 4 0 0 10 0 41 562 36 78 3 19
Resources
- Google :-)
- A Sysadmin's Unixersal Translator (ROSETTA STONE)
- UNIXguide.net ( AIX, FreeBSD, HP-UX, LINUX, SOLARIS & Tru64)
- Solaris versus HP-UX
- HP-UX Commands to Display Server Info
- Re: [osol-discuss] Solaris vs HP-UX vs AIX
- HP-UX-Common Unix Commands
- Back to Basics With Unix: Stranger In a Strange Variant
- UnixPorting's Unix Sysadmin Cross Reference
- IBM - Collecting Data for a Failed Information Server Installation on Linux or Unix
No comments:
Post a Comment