Monday 23 August 2021

Raspberry Pi OS on QEMU raspi2b - System Information

Raspberry Pi OS

The popular Raspberry Pi (Wikipedia) is often used with a tuned Linux distribution: Raspberry Pi OS (formerly Raspbian), which is based on Debian Linux.

QEMU

The system emulator QEMU provides machine profiles for a selection of Raspberry Pi models:

The 32-bit ARM models, ARMv6 & ARMv7:

$ qemu-system-arm -machine help | grep rasp
raspi0               Raspberry Pi Zero (revision 1.2)
raspi1ap             Raspberry Pi A+ (revision 1.1)
raspi2               Raspberry Pi 2B (revision 1.1) (alias of raspi2b)
raspi2b              Raspberry Pi 2B (revision 1.1)

The 64-bit ARM models, ARMv8:

$ qemu-system-aarch64 -machine help | grep rasp
raspi0               Raspberry Pi Zero (revision 1.2)
raspi1ap             Raspberry Pi A+ (revision 1.1)
raspi2               Raspberry Pi 2B (revision 1.1) (alias of raspi2b)
raspi2b              Raspberry Pi 2B (revision 1.1)
raspi3ap             Raspberry Pi 3A+ (revision 1.0)
raspi3               Raspberry Pi 3B (revision 1.2) (alias of raspi3b)
raspi3b              Raspberry Pi 3B (revision 1.2)

The 64-bit emulation presumably includes the 32-bit models in order to allow for hypothetical upgraded versions of these systems by swapping the ARM processor core. This also provides support for the revisions of the Raspberry Pi 2B, the original board used a BCM2836 SoC with a 32-bit ARM v7 processor, but later versions of the 2B board used a BCM2837 with a 64-bit ARM v8 processor.

These options cover three processors:

  • Broadcom BCM2835 SoC in the Zero and A+
    • ARM1176JZF-S @ 700 Mhz core, 32-bit ARMv6
  • Broadcom BCM2836 SoC in the 2B
    • ARM Cortex-A7 @ 900 MHz, quad-core, 32-bit ARMv7
  • Broadcom BCM2837 SoC in the 3A+ and 3B
    • ARM Cortex-A53 @ 1.2 GHz or 1.4 GHz, quad-core, 64-bit ARMv8

That is three generations of the ARM architecture and coverage of the older models.

Sunday 15 August 2021

NetBSD/hppa on QEMU - System Information

NetBSD on PA-RISC

Originally inspired by OpenBSD/hppa the current NetBSD/hppa started as a port for HP 9000/700 systems and carried the name NetBSD/hp700. An initial experimental source release with NetBSD 2.0 in 2004, was followed by a binary release with NetBSD 3.0 in 2005. For NetBSD 7.0 in 2021 the port adopted the 'hppa' architecture name. The port now covers most PA-RISC HP 9000 systems, albeit in 32-mode.

Platform

HP developed the Precision Architecture (HP-PA or PA-RISC) RISC processor during the early 1980s in order to consolidate its compute platforms on to two architectures: Intel x86 and HP PA-RISC. The PA-RISC based HP 9000 series 700 entered the market in 1991

Emulator and Platform

The QEMU system emulator provides a 32-bit PA-RISC emulation based on the HP Visualize B160L (9000/778), a 1996 HP-UX workstation. From HP Visualize B132L, B160L, B180L PA-RISC Workstations - OpenPA.net the B160L system specifications are:

  • CPU: PA-7300LC 160 MHz
  • RAM: 32 MiB to 1.5 GiB max.
  • Bus: GSC, EISA, PCI
  • Storage controllers:
    • NCR 53C710 narrow SCSI-2
    • NCR 53C720 Fast-Wide HVD SCSI-2
  • Network interface: Intel 82596CA 10 Mb/s ethernet
  • Graphics: Visualize-EG (Graffiti) 2MB
  • Audio: Harmony

The emulated system doesn't implement the audio, ethernet or SCSI controllers (yet), instead replacing the SCSI controllers and ethernet interface with PCI devices to provide the same functionality:

  • CPU: one (or more) PA-7300LC at 250 MHz
  • RAM: 512 MiB default, up to 3.0 GiB
  • Bus: GSC, EISA, PCI
  • Storage controllers: Symbios Logic 53c895 Fast Wide LVD SCSI-2, PCI
  • Network interface: DEC Tulip 21142/43 100 Mb/s ethernet, PCI
  • Graphics: HPA208LC1280 aka. Artist

The addition of multi-processor (SMP) support diverges from the source workstation, but provides an alternative means for increasing the system performance.

Sunday 8 August 2021

Slackware Linux 3.0 on QEMU

Slackware

Established back in 1993, Slackware (The Slackware Linux Project; Wikipedia) is the oldest surviving Linux distribution...

Slackware Linux 3.0 was the first Slackware release to have an official CD-ROM distribution and support installation from CD-ROM. Released in November 1995, the same month as the Pentium Pro, it doesn't have support for a lot of the more modern hardware emulated by QEMU...


QEMU

The default QEMU i386 system emulation ('pc') is based on Intel's "Natoma" (Intel 440FX & PIIX3) chipset for Pentium Pro and Pentium II processors, which was released in 1996 (List of Intel chipsets - Wikipedia):

  • Model: "pc" - Intel 440FX & PIIX3 "Natoma"
  • CPU: "qemu32" - QEMU Virtual CPU (default)
  • RAM: 128 MiB default, 2 GiB max.
  • Bus: PCI and ISA
  • Storage controller: IDE (PIIX3)
  • Network interface: "e1000" - Intel 82540EM Gigabit Ethernet Controller, 1,000 Mb/s ethernet
  • Graphics: "std" - Standard VGA (with Bochs VBE)

Since the kernels included with Slackware 3.0 are older than this, they don't recognize the hardware and use generic methods to run on the system. Distributions based on the Linux 2.0 series or later kernels would be a better choice for the 'pc' machine (Linux Version 2.0 | Linux Journal).

Fortunately QEMU has a generic ISA based PC system profile ('isapc') which provides an option that is more in keeping with the hardware available when Slackware 3.0 was released:

  • Model: "isapc" - ISA bus PC
  • CPU: "486" - Intel i486DX/4
  • RAM: 128 MiB default, 2 GiB max.
  • Bus: ISA
  • Storage controller: IDE
  • Network interface: "ne2k_isa" - NE2000 ISA, 10 Mb/s ethernet (IRQ 9, I/O 0x300)
  • Graphics: "cirrus" - Cirrus GD-5446 VGA ISA
This isn't ideal, given that PCI based 486 and Pentium based systems existed at the time, but QEMU doesn't provide the appropriate chipsets for those systems, so exploration of those options will have to be on real hardware, or using other emulators (e.g. Bochs, PCem, etc.).

Wednesday 4 August 2021

BeOS - System Information

BeOS

The BeOS operating system (Wikipedia) is a multimedia operating system from the late 1990s...

BeOS 5 Pro in VirtualBox

Platform

BeOS Release 5.0 Professional supported two system architectures (see BeOS Ready Hardware List):

  1. PowerPC - BeBox and various pre-G3 Power Macintosh systems and compatibles
  2. x86 - various systems based on Intel Pentium, Pentium Pro, Pentium II, Pentium III & Celeron processors and compatibles (e.g. AMD K6, K6-2, K6-III & Athlon; Cyrix 686mx, 686GXm, & M II; IDT WinChip C6 & WinChip 2).

The hardware that can run BeOS is aging and can be difficult to obtain, so there is a need to consider emulation/virtualization options as alternatives to sourcing hardware.

Sunday 25 July 2021

HP-UX 11i v1 (32-bit PA-RISC) on QEMU - System Information

HP 9000 Family

In the early 1980s Hewlett-Packard (HP) introduced the HP 9000 family (Wikipedia), the initial offerings were re-badges of existing workstation lines featuring machines based on the Motorola 68000 and HP FOCUS processors. In 1991 the HP 9000/700 series was introduced, based on HP's Precision Architecture RISC processor (HP-PA or PA-RISC) (Wikipedia). The earlier 32-bit PA-RISC 1.0 processors had appeared in HP's mainframe and server systems back in the mid-1980s, but this was the first appearance of PA-RISC in a workstation line, and used the improved PA-RISC 1.1 processors. This marked the final stage in the consolidation of HP's non-x86 computer lines on to a single processor architecture. In 1996 HP introduced its first systems using the 64-bit PA-RISC processors, including the HP Visualize C160 and C180 workstations (both model 9000/780).

HP-UX 11i CDE logon screen in QEMU

Other than some early systems, and some systems based on the acquired technologies from Apollo Computers (these could also run Apollo Domain/OS), the HP 9000 line shipped running versions of HP's UNIX operating system: HP-UX (Wikipedia). Initially based on AT&T UNIX System III, and later UNIX System V, HP-UX was a major commercial UNIX from the 1980s through the 2000s. The rise of the open source UNIX-like operating systems and the market reception of Itanium (IA-64) servers would ultimately see HP-UX relegated to a maintenance role, with the last release being HP-UX 11i v3 in 2007, the last update in 2020, and support ending on PA-RISC in 2021 and on IA-64 in 2025.

QEMU

Emulates a HP 9000/778/B160L , normally known as a HP Visualize B160L workstation (HP Visualize B132L, B160L, B180L PA-RISC Workstations - OpenPA.net).

Emulated system specification:

  • CPU: 1x PA-7300LC at 250 MHz (32-bit PA-RISC)
  • RAM: default 512 MiB, up to 3.0 GiB (hardware supported up to 1.5 GiB)
  • Disk controller(s): SCSI C895 Fast Wide LVD (Symbios Logic 53c895 chipset)
  • Network controller(s): Ethernet (DEC Tulip 21142/43)
  • Graphics: HPA208LC1280 aka. Artist.

Since the B160L is based on a 32-bit PA-RISC 1.1 processor, the latest version of HP-UX that can be used is HP-UX 11i v1 (see HP-UX Unix Operating System for PA-RISC - OpenPA.net), later versions only support 64-bit PA-RISC and Itanium systems.

Monday 5 July 2021

Linux for PA-RISC (32-bit) on QEMU - System Information

HP PA-RISC

In the mid-1980s Hewlett-Packard (HP) introduced the first version of its Precision Architecture RISC processor (HP-PA or PA-RISC) (Wikipedia) in its mainframe and server product lines. In 1991 the HP 9000/700 series was introduced based on the improved PA-RISC 1.1 processors. In 1996 HP introduced its first systems using the 64-bit PA-RISC 2.0 processors, including the HP Visualize C160 and C180 workstations (both model 9000/780).

In the 1990s PA-RISC was one of the main RISC processors seen in UNIX workstations, along with AXP Alpha, PowerPC/POWER, SPARC and MIPS. The phasing out of the PA-RISC systems, in favor of Itanium (IA-64) based HP Integrity systems (Wikipedia) during the 2000s mean there is an interest in replacing ageing hardware with emulation options.

As well as the proprietary UNIX from HP (HP-UX), PA-RISC systems can also run the Linux, NetBSD and OpenBSD open source operating systems.

Linux on PA-RISC

The Linux on PA-RISC project added support for PA-RISC system starting with Linux 2.6, and the Debian and Gentoo Linux distributions have support for PA-RISC.

While official support for PA-RISC ended with Debian Linux 5 (lenny), the Debian for PA-RISC port does provide an un-official  network installation CD image for the current release. However the current Debian Linux for PA-RISC ports repository is for Debian Linux "unstable" (sid), which can cause problems with installation.

For the purposes of this exploration I'm going to use the Debian Linux 5 (lenny) distribution DVD, this means the results presented here will be easily reproducible. For those curious about PA-RISC Debian Linux 10, there is a pre-made disk image at Qemu - Linux PARISC Wiki that might help.

Sunday 27 June 2021

HP Tru64 UNIX on AlphaVM-Free - System Information

AlphaVM-Free

A commercial Alpha AXP system emulator from EmuVM, the AlphaVM family of system emulators provide a means to emulate members of the Tsunami family of Alpha based systems from Compaq and HP. Mainly targeted at providing a migration option for existing Alpha systems running OpenVMS or Tru64 UNIX, allowing existing applications to be moved to newer, and potentially more efficient, hardware. A free version of AlphaVM (AlphaVM-Free) was offered as an evaluation and hobbyist product complementing the supported commercial offering (AlphaVM-Pro). Apparently due to licence abuse (see The sad state of Alpha emulators (for OpenVMS) - Raymii.org) the free version has been since replaced with a low cost option (AlphaVM-Basic).

To have a look at the emulator's capabilities and how well it manages to run HP Tru64 UNIX, I've setup a legacy AlphaVM-Free system in a Debian Linux 10 (buster) virtual machine and installed HP Tru64 UNIX 5.1B. Since all versions of AlphaVM are related the other versions will show similar behavior, although there is some additional flexibility with tuning the emulation available in the commercial product.

Note that AlphaVM requires the CMPXCHG16B instruction to be available on the host. In my case this meant I had to update the VirtualBox configuration for the Debian Linux 10 host virtual machine to allow access to this instruction (see virtualbox.org: View topic - hot to enable CMPXCHG16B instruction).

Friday 25 June 2021

Linux for SPARC64 on QEMU sun4u - System Information

Linux for SPARC

The SPARC processor (Wikipedia) was the third processor to be supported in the Linux kernel (after x86 and Alpha) back in the mid 1990s. In his 1997 M.Sc. thesis: "Linux: a Portable Operating System", Linus Torvalds discussed the integration of Alpha and SPARC into the Linux kernel and the challenges of developing a portable operating system.

Looking for early Linux distributions supporting SPARC finds:

  • RedHat Linux 4.0 released 3-Oct-1996: 2.0.18 kernel supporting sun4c and sun4m.
  • RedHat Linux 6.0 released 26-Apr-1999: 2.2.5 kernel supporting sun4c, sun4m and sun4u
  • Debian Linux 2.1 (slink) released 9-May-1999: 2.0.35 kernel for sun4c and sun4m, and 2.2.1 kernel for sun4u

These Linux distributions were targeted at Sun's SPARC systems and did not support SPARC systems from other vendors, unless they were clones of Sun's systems.

In 1987 Sun Microsystems introduced its first 32-bit based SPARC systems, and Sun introduced its first 64-bit SPARC (UltraSparc) systems in late 1995 with the Ultra 1 and Ultra 2 workstations and their server variants, the Ultra Server 1 and Ultra Server 2.

The 64-bit SPARC specification had been released by SPARC International in 1993 and HAL Computer Systems (Wikipedia), a subsidiary of Fujitsu, brought the first SPARC64 workstations to market in 1995, with the release of the HALstation 300 series systems.

Monday 21 June 2021

Linux for Alpha on AlphaVM-Free - System Information

AlphaVM-Free & Alpha Linux

The AlphaVM family of system emulators from EmuVM, provide a means to emulate members of the Tsunami family of Alpha based systems from Compaq and HP. Mainly targeted at providing a migration option for existing Alpha systems running OpenVMS or Tru64 UNIX, this emulator is also capable of running Linux for Alpha.

The Alpha (Wikipedia) was the first non Intel x86 platform to have support integrated into the Linux kernel back in the mid 1990s. Linus Torvalds discusses the integration of Alpha and SPARC into Linux and the challenges of developing a portable operating system in his 1997 M.Sc. thesis: "Linux: a Portable Operating System". While the retirement of Alpha systems by Compaq and HP means the remaining hardware is aging, and Linux has been ported to many more systems since, there are still some use cases for Linux on Alpha. But moving away from potentially unreliable and increasingly uncommon hardware has become very desirable. One option for accomplishing this is using a system emulator.

The AlphaVM system emulator is one such possibility and a free version of AlphaVM (AlphaVM-Free) was offered as an evaluation and hobbyist product. This complemented the supported commercial offering (AlphaVM-Pro) which provides increased capabilities and full support. Apparently due to licence abuse (see The sad state of Alpha emulators (for OpenVMS) - Raymii.org) the free version has been since replaced with a low cost option (AlphaVM-Basic).

To have a look at the emulator's capabilities and how well it manages to run Linux, I've setup a legacy AlphaVM-Free system in a Debian Linux 10 (buster) virtual machine and installed Debian Linux 5 (lenny) from the distribution DVD.

Note that AlphaVM requires the CMPXCHG16B instruction to be available on the host. In my case this meant I had to update the VirtualBox configuration for the Debian Linux 10 host virtual machine to allow access to this instruction (see virtualbox.org: View topic - hot to enable CMPXCHG16B instruction).

Monday 14 June 2021

HP Tru64 on FreeAXP - System Information

FreeAXP

Migration Specialties International, Inc. provide a services for the maintenance and migration of OpenVMS and Tru64 operating system environments. Part of their offering uses system emulation to provide an option to migrate from aging hardware on to modern systems. As an evaluation and hobbyist tool, they also provide a free version of their system emulator system: FreeAXP which emulates a DEC Alpha (AXP) based AlphaServer 400 with the specification:

  • RAM: 32MB to 128MB
  • Up to 7 SCSI disks
  • Up to 2 network interfaces
  • 2 serial ports (used for system console)
  • Capable of running OpenVMS or Tru64

So having downloaded and installed the emulator, I've configured a emulated system for testing with Tru64:

  • CPU: a DECchip 21064 (EV4) Alpha processor
  • RAM: 128 MB
  • SCSI controller: KZPAA (53c810) - narrow SCSI, max. 7 devices
    • Id 0: RZ40L SCSI Hard disk - 8 GB
    • Id 6: RRD42 SCSI CD-ROM drive - mapped to system optical drive
  • Network interface: DE500 (21143)

FreeAXP uses a version of the SRM firmware from the AlphaServer 400, which can tell us a bit about the system before we install an operating system.

Monday 7 June 2021

Linux for Alpha on QEMU - System Information

Linux for Alpha

A long time ago, the Digital Equipment Corporation's (DEC) Alpha processor aka. Alpha AXP (Wikipedia) looked to be the future. It dominated the super computer listings, spawned a number of workstation, server and OEM systems, and there was even a MS Windows port. In those heady days it also happened to find itself the target of the first non-x86 port of the Linux kernel. A porting effort at DEC was described by Jim Paradis in a series of Linux Journal Articles (1, 2, 3) back in 1995, and Linus Torvalds in his 1997 M.Sc. thesis: "Linux: a Portable Operating System", discusses the portability of the Linux kernel using the challenges encountered in adding support for Alpha and SPARC as examples.

The Alpha ultimately lost out to the joint HP & Intel Itanium business case when Compaq bought DEC in 1998, with the Alpha IP being sold to Intel in 2001. Compaq merged with HP in 2002, and HP continued marketing Alpha based systems until 2007 and supported the hardware until 2012.

As such there is a desire to replicate Alpha environments on more modern hardware. For some this is a way to run applications that were built for Alpha, and may even be exclusive to that platform. For others its a way to explore the behaviours of older systems and maybe learn from the differences. The QEMU system emulator provides an emulation of an Alpha based system capable of running Linux. Currently there are few Linux distributions that support Alpha...

Saturday 29 May 2021

Linux for SPARC64 on QEMU

Linux for SPARC64

Linux is an open source UNIX-like operating system kernel that supports a wide range of platforms. This includes the 64-bit SPARC platforms (sparc64), commonly seen in Sun Microsystems UNIX workstations and servers.

Since SPARC64 processors support both 32-bit and 64-bin SPARC binaries, Linux distributions for SPARC based systems can come in three broad classes:

  1. 32-bit kernel with 32-bit user-land - 32-bit & 64-bit SPARC processors
  2. 64-bit kernel with 32-bit user-land - 64-bit SPARC processors
  3. 64-bit kernel with 64-bit user-land - 64-bit SPARC processors

The Debian Linux distribution has provided for all three of these scenarios with its 'sparc' and 'sparc64' ports:

Since the 'sparc64' in-official port provides the most recent Linux version, and is fully 64-bit and thus provides more of a contrast with the 32-bit Linux environment used in Linux for SPARC (32-bit) on QEMU (sun4m) - System Information, it's our selected target.

Friday 28 May 2021

NetBSD/sparc64 9.2 on QEMU - System Information

NetBSD

A member of the open source family of Berkeley Software Distribution (BSD) UNIX-like operating systems, along with FreeBSD and OpenBSD, NetBSD is available for a wide range of hardware platforms (Platforms supported by NetBSD), including support for many systems of historical interest.

SPARC64

Released in 1993 the SPARC Version 9 specification added 64-bit support to the SPARC processor architecture. The first workstations to market were the HAL SPARC64 (Wikipedia) based Fujitsu HALstation Model 300 series in October 1995, followed by the Sun UltraSPARC based Sun Ultra workstations (Wikipedia) in November 1995.

Thursday 27 May 2021

NetBSD - System Information

NetBSD

A member of the open source family of Berkeley Software Distribution (BSD) UNIX-like operating systems, along with FreeBSD and OpenBSD, NetBSD is available for a wide range of hardware platforms (Platforms supported by NetBSD), including support for many vintage systems.

System Note

The sample results below are taken from a NetBSD system running in a VirtualBox VM on a Intel i7-860 system running MS Windows 10. So some of the hardware information will look a little different from the results running on actual hardware. For example the the processor identification and the number of cores won't match.

Tuesday 25 May 2021

NetBSD/sparc 9.2 on QEMU - System Information

NetBSD

A member of the open source family of Berkeley Software Distribution (BSD) UNIX-like operating systems, along with FreeBSD and OpenBSD, NetBSD is available for a wide range of hardware platforms (Platforms supported by NetBSD), including support for many systems of historical interest.

QEMU and SPARC

The user-space and system emulator QEMU provides emulation of a number of 32-bit SPARC systems. The emulated Sun Microsystems machines are Mbus based 'sun4m' systems, which are widely supported by many operating systems. The first of the 'sun4m' systems, the SPARCserver 600MP series, was launched in 1991, with smaller servers and workstations following. The last of the 'sun4m' line left regular support from Sun back in 2000, but support remained in Solaris 9, which left support in 2014. As such these systems were in common use for well over a decade, and were sufficiently common to be used in control systems as well as in server rooms and as desktops.

The default 32-bit SPARC system emulated in QEMU is the Sun Microsystems SPARCstation 5 (Wikipedia), which is a mid-range UNIX workstation of the mid-1990s. The emulation provides:

  • CPU: microSPARC II
  • RAM: default 128 MiB, max. 256 MiB
  • Disk controller: SCSI Sun esp
  • Network controller: Sun LANCE ethernet (le)
  • Graphics: Sun tcx

For its time these specs are quite respectable, and the server emulations provide alternatives supporting more memory (up to 1,856 MiB in my tests) and additional processors. Since the emulation isn't subject the the limitations of the actual hardware and its connections, processor, disk and network performance often exceed that of the originals.

Note: it is easier to install NetBSD/sparc on QEMU when using the OpenBIOS firmware (QEMU default) than when using Sun's OpenBoot. This suggests that there may be some specific support in NetBSD and QEMU for this configuration.

Saturday 22 May 2021

Solaris 2.6 for SPARC (sun4m) on QEMU - System Information

Solaris 2.6

In 1992 Sun Microsystems (Wikipedia) released the first version of their System V release 4 based UNIX operating system, named Solaris 2.0 (Wikipedia). Over the next few years Solaris 2 releases replaced SunOS (Wikipedia), Sun's earlier BSD based UNIX, for new systems. By the last release of the Solaris 2.x line in 1997 (Solaris 2.6 aka. SunOS 5.6), Solaris was well established as the operating system on Sun's SPARC systems. However a reminder of the pedigree of the operating systems was left, in the use of "SunOS" as the internal name of the operating system, appearing in the output of various commands.

QEMU and SPARC

QEMU supports emulation of 32-bit SPARC and 64-bit UltraSAPRC systems suitable for running Solaris for SPARC.

Many examples can be found online, of installing Solaris on QEMU emulated SPARC systems:

It readily apparent, from the volume of Solaris on QEMU descriptions and tutorials, that QEMU is a popular solution for running older version of SunOS and Solaris on SPARC platforms. Given the popularity of Solaris back in the 1990s and the amount of software developed for the platform, it is unsurprising that there is an interest in having a reliable way to run such systems, without having to deal with the ageing hardware.

So can we tell if a Solaris system is running on QEMU? Well there are various commands to get information about the system in Solaris (see UNIX System Information - Sun Solaris), so do any of them give hints?

Sunday 16 May 2021

SunOS 4.1.4 for SPARC on QEMU (sun4m) - System Information

SunOS 4.1.4

Sun Microsystems used the name SunOS (Wikipedia) for its BSD (Wikipedia) based UNIX operating system starting with the Motorola 68000 powered Sun-1 (Wikipedia) launched in 1982 through the Sun-2, Sun-3 and Sun-4 based workstations and servers up to the final SunOS release (SunOS 4.1.4) in 1998. With the release of the System V release 4 based Solaris 2.x in 1992, SunOS versions from 4.1.1 were re-branded as Solaris 1.x while retaining their BSD flavor.

Since SunOS 4 and Solaris 2+ are a bit different I'll look at them separately, to see how they handle and report on running under QEMU.

By default the 32-bit SPARC system emulation in QEMU creates a Sun SPARCstation 5 system (Wikipedia):

  • Buses: Mbus & Sbus
  • CPU: microSPARC II
  • RAM: 128 MB (max. 256 MB)
  • SCSI controller: Sun esp (Emulex SCSI Processor)
  • Network controller: Sun LANCE (based on AMD Lance)
  • Graphics: Sun TCX

So using the commands from the generic and SunOS system information posts let's see what's what.

Friday 14 May 2021

UNIX System Information - SunOS

Introduction

Early versions of Sun's UNIX operating system were known as SunOS (Wikipedia), and were based on the Berkley Software Distribution (BSD) (Wikipedia). SunOS was used on the Motorolla 68000 based Sun workstations (Sun-1, Sun-2 & Sun-3) and most 32-bit SPARC based systems (Sun-4; architectures sun4, sun4c, sun4e and sun4m, but not sun4d or sun4u).

The 32-bit SPARC sun4d systems and 64-bit UltraSPARC sun4u systems where supported from Solaris 2.x, which reports itself as SunOS 5.x, for those and later systems see my previous post on UNIX System Information - Solaris.

While the first release of Solaris was being developed a decision was made to retroactively call the last SunOS 4.1.x releases Solaris 1.x. So the last SunOS 4 release in 1994, as identified as SunOS 4.1.4 or Solaris 1.1.2.

Since I don't have a physical SunOS 4 machine to hand, the following examples are from an emulated SPARCstation 5 running SunOS 4.1.4, thus there may be a few things that would appear slightly different on real hardware.

At some point I'll refresh this with output from a physical system for comparison.

Thursday 13 May 2021

Linux for SPARC (32-bit) on QEMU (sun4m) - System Information

Introduction

The system emulator QEMU provides a way to run old SunOS/Solaris for SPARC software on modern systems. A number of sites provide tutorials on how to do this, including pointers to archives of the operating system media and software sites, for example:

Having set up a couple of emulated SPARCstation 5 (Wikipedia) systems running:

  • Debian Linux 4.0 (etch) for SPARC
  • SunOS 4.1.4 aka. Solaris 1.4
  • Solaris 2.6 aka. SunOS 5.6

I figure it would be interesting to see the QEMU system has to tell us about itself when using the commands from previous UNIX System Information posts.

Let's start with Linux...

Wednesday 12 May 2021

UNIX System Information - Sun Solaris

Introduction

Sun Solaris was formerly known as SunOS (Wikipedia) and a open source version is now available called OpenSolaris.

UNIX System Information - SGI IRIX

OS Version

On SGI IRIX systems uname supports an extra option to give a more readable form of the operating system revision:

% uname -R
6.5 6.5.11m
% uname -aR
IRIX alnus 6.5 6.5.11m 01101246 IP32

Hardware Summary

On SGI IRIX the hinv command provides a description of the current hardware configuration:

% hinv
CPU: MIPS R10000 Processor Chip Revision: 2.7
FPU: MIPS R10010 Floating Point Chip Revision: 0.0
1 195 MHZ IP32 Processor
Main memory size: 640 Mbytes
Secondary unified instruction/data cache size: 1 Mbyte on Processor 0
Instruction cache size: 32 Kbytes
Data cache size: 32 Kbytes
FLASH PROM version 4.16
Integral SCSI controller 0: Version ADAPTEC 7880
  Disk drive: unit 2 on SCSI controller 0
  CDROM: unit 4 on SCSI controller 0
Integral SCSI controller 1: Version ADAPTEC 7880
On-board serial ports: tty1
On-board serial ports: tty2
On-board EPP/ECP parallel port
CRM graphics installed
Integral Ethernet: ec0, version 1
Iris Audio Processor: version A3 revision 0
Video: MVP unit 0 version 1.4
 with no AV Card or Camera.
Vice: TRE

Note that for some SGI systems the IRIX reported 'IP' number does not directly correspond to the hardware 'IP' number (see sgistuff.net : Hardware : Tables. In particular the SGI Indy reports as an 'IP22' (which corresponds to the R4x00 based SGI Indigo 2 hardware), but the hardware is an 'IP24'.

Further Sources


UNIX System Information - Linux

OS Version

A more complete operating system version string can be found in /proc/version. For example, on a Mandrake Linux 9.1 system:

$ cat /proc/version
Linux version 2.4.21-0.33mdkenterprise (qateam@updates.mandrakesoft.com) (gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)) #1 SMP Wed Aug 11 10:09:17 MDT 2004

On many distributions the name and version of the distribution can be found in a file under /etc/:

  • Generic: /etc/os-release
  • Red Hat and derivatives: /etc/redhat-release
  • Debian and derivatives: /etc/debian_version
  • SuSE: /etc/SuSE-release

For example, on a Mandrake Linux 9.1 system:

$ cat /etc/redhat-release
Mandrake Linux release 9.1 (Bamboo) for i586

Another possibility is to look at /etc/issue. For example for a Ubuntu 8.04 (Hardy) system:

$ cat /etc/issue
Ubuntu 8.04.1 \n \l

Generally the most portable method to get distribution information is to use one of the Linux Standard Base tools: lsb_release.

For example for a Mandrake Linux 9.0 system:

$ lsb_release -a
LSB Version:    1.2
Distributor ID: Mandrake
Description:    Mandrake Linux
Release:        9.0
Codename:       dolphin

Or for a Ubuntu 8.04 (Hardy) system:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 8.04.1
Release:	8.04
Codename:	hardy

If the lsb_release tool is not installed, equivalent information may be available in /etc/lsb-release.

Installed Packages

For deb/apt based distributions (e.g. Debian and Ubuntu) dpkg is used to list the installed packages. For example, on a Ubuntu 8.04 (Hardy) system:

$ dpkg --list
 Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                                Version                             Description
+++-===================================-===================================-======================================================================================
ii  acl                                 2.2.45-1                            Access control list utilities
ii  acpi                                0.09-3ubuntu1                       displays information on ACPI devices
ii  acpi-support                        0.109                               a collection of useful events for acpi
ii  acpid                               1.0.4-5ubuntu9                      Utilities for using ACPI power management
...
ii  zip                                 2.32-1                              Archiver for .zip files
ii  zlib1g                              1:1.2.3.3.dfsg-7ubuntu1             compression library - runtime
ii  zlib1g-dev                          1:1.2.3.3.dfsg-7ubuntu1             compression library - development

For RPM based distributions (e.g. RedHat, CentOS and Mandriva) the rpm command is used. For example, on a CentOS 4.7 system:

$ rpm -q -a
basesystem-8.0-4
pyxf86config-0.3.19-1
prelink-0.3.3-0.EL4
dump-0.4b39-3.EL4.2
finger-0.17-26.EL4.1
...
xorg-x11-xdm-6.8.2-1.EL.52
gnome-utils-2.8.0-7.el4
mod_ssl-2.0.52-41.ent.centos4
kdebase-devel-3.3.1-11.el4.centos
kernel-2.6.9-78.0.5.EL

CPU

Details of the installed processors can be found in /proc/cpuinfo:

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 7
model name      : VIA Samuel 2
stepping        : 3
cpu MHz         : 599.723
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips        : 1196.03

On SMP kernels (the default in most distributions) each processor and logical core is reported, which can make the output a bit large and repetitive. For example an Intel Atom N270 reports two logical cores due to hyper-threading:

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 28
model name	: Intel(R) Atom(TM) CPU N270   @ 1.60GHz
stepping	: 2
microcode	: 0x212
cpu MHz		: 1600.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm
bugs		:
bogomips	: 3199.95
clflush size	: 64
cache_alignment	: 64
address sizes	: 32 bits physical, 32 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 28
model name	: Intel(R) Atom(TM) CPU N270   @ 1.60GHz
stepping	: 2
microcode	: 0x212
cpu MHz		: 1600.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 1
initial apicid	: 1
fdiv_bug	: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm
bugs		:
bogomips	: 3199.95
clflush size	: 64
cache_alignment	: 64
address sizes	: 32 bits physical, 32 bits virtual
power management:

For more compact output use lscpu instead:

$ lscpu
Architecture:        i686
CPU op-mode(s):      32-bit
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  2
Core(s) per socket:  1
Socket(s):           1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               28
Model name:          Intel(R) Atom(TM) CPU N270   @ 1.60GHz
Stepping:            2
CPU MHz:             1600.000
CPU max MHz:         1600.0000
CPU min MHz:         800.0000
BogoMIPS:            3199.95
L1d cache:           24K
L1i cache:           32K
L2 cache:            512K
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm

Update: recent versions of lscpu have explicit reporting on processor vulnerabilities. For example for an Intel i7-860:

$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   36 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           30
Model name:                      Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
Stepping:                        5
CPU MHz:                         2808.710
BogoMIPS:                        5617.42
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        512 KiB
L3 cache:                        16 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni ssse3 cx16 sse4_1 sse4_2 x2apic hypervisor lahf_lm pti flush_l1d

Since this is on a VirtualBox VM some of the reported information is a different from running native (e.g. 'Thread(s) per core' would normally be '2').

Memory

Details of the memory configuration can be found in /proc/meminfo:

$ cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  489811968 410542080 79269888        0 56160256 177897472
Swap: 1069244416 21245952 1047998464
MemTotal:       478332 kB
MemFree:         77412 kB
MemShared:           0 kB
Buffers:         54844 kB
Cached:         168512 kB
SwapCached:       5216 kB
Active:          78072 kB
Inactive:       229604 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       478332 kB
LowFree:         77412 kB
SwapTotal:     1044184 kB
SwapFree:      1023436 kB

Showing the physical memory (512 MiB minus shared and reserved regions) and swap (approx. 1 GB).

Update: on modern kernels the /proc/meminfo information has gotten much larger as more details have been added:

$ cat /proc/meminfo
MemTotal:        4023648 kB
MemFree:          972316 kB
MemAvailable:    3173592 kB
Buffers:           72604 kB
Cached:          2289744 kB
SwapCached:            0 kB
Active:           318200 kB
Inactive:        2504312 kB
Active(anon):       1132 kB
Inactive(anon):   471544 kB
Active(file):     317068 kB
Inactive(file):  2032768 kB
Unevictable:          96 kB
Mlocked:              96 kB
SwapTotal:        999420 kB
SwapFree:         999420 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        458244 kB
Mapped:           208872 kB
Shmem:             12512 kB
KReclaimable:     109196 kB
Slab:             154320 kB
SReclaimable:     109196 kB
SUnreclaim:        45124 kB
KernelStack:        6080 kB
PageTables:        12388 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     3011244 kB
Committed_AS:    3011364 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       37844 kB
VmallocChunk:          0 kB
Percpu:             1416 kB
HardwareCorrupted:     0 kB
AnonHugePages:    206848 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      137152 kB
DirectMap2M:     4057088 kB

So lsmem has been introduced to give a simpler summary:

$ lsmem
RANGE                                  SIZE  STATE REMOVABLE BLOCK
0x0000000000000000-0x00000000dfffffff  3.5G online       yes  0-27
0x0000000100000000-0x0000000127ffffff  640M online       yes 32-36

Memory block size:       128M
Total online memory:     4.1G
Total offline memory:      0B

Although this is a little brief when looking for installed RAM and configured swap.

Devices

The /proc file system contains various files that can be used to obtain information about the hardware present in a system.

PCI Devices

On Linux 2.4 and earlier kernels examining /proc/pci will provide all the information on the PCI bus you could ever want:

$ cat /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
    Host bridge: PCI device 1106:3123 (VIA Technologies, Inc.) (rev 0).
      Master Capable.  Latency=8.  
      Prefetchable 32 bit memory at 0xd0000000 [0xd7ffffff].
  Bus  0, device   1, function  0:
    PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP] (rev 0).
      Master Capable.  No bursts.  Min Gnt=12.
  Bus  0, device  13, function  0:
    FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 128).
      IRQ 12.
      Master Capable.  Latency=32.  Max Lat=32.
      Non-prefetchable 32 bit memory at 0xde000000 [0xde0007ff].
      I/O at 0xd000 [0xd07f].
  Bus  0, device  16, function  0:
    USB Controller: VIA Technologies, Inc. USB (rev 128).
      IRQ 11.
      Master Capable.  Latency=32.  
      I/O at 0xd400 [0xd41f].
  Bus  0, device  16, function  1:
    USB Controller: VIA Technologies, Inc. USB (#2) (rev 128).
      IRQ 12.
      Master Capable.  Latency=32.  
      I/O at 0xd800 [0xd81f].
  Bus  0, device  16, function  2:
    USB Controller: VIA Technologies, Inc. USB (#3) (rev 128).
      IRQ 10.
      Master Capable.  Latency=32.  
      I/O at 0xdc00 [0xdc1f].
  Bus  0, device  16, function  3:
    USB Controller: VIA Technologies, Inc. USB 2.0 (rev 130).
      IRQ 5.
      Master Capable.  Latency=32.  
      Non-prefetchable 32 bit memory at 0xde001000 [0xde0010ff].
  Bus  0, device  17, function  0:
    ISA bridge: VIA Technologies, Inc. VT8233A ISA Bridge (rev 0).
  Bus  0, device  17, function  1:
    IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE (rev 6).
      Master Capable.  Latency=32.  
      I/O at 0xe000 [0xe00f].
  Bus  0, device  17, function  5:
    Multimedia audio controller: VIA Technologies, Inc. VT8233 AC97 Audio Controller (rev 80).
      IRQ 10.
      I/O at 0xe400 [0xe4ff].
  Bus  0, device  18, function  0:
    Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 116).
      IRQ 11.
      Master Capable.  Latency=32.  Min Gnt=3.Max Lat=8.
      I/O at 0xec00 [0xecff].
      Non-prefetchable 32 bit memory at 0xde002000 [0xde0020ff].
  Bus  1, device   0, function  0:
    VGA compatible controller: PCI device 1106:3122 (VIA Technologies, Inc.) (rev 3).
      IRQ 11.
      Master Capable.  Latency=32.  Min Gnt=2.
      Prefetchable 32 bit memory at 0xd8000000 [0xdbffffff].
      Non-prefetchable 32 bit memory at 0xdc000000 [0xdcffffff].

On Linux 2.6 kernel systems the PCI device descriptions are no longer compiled into the kernel by default. So to get the descriptions use the lspci command:

$ lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8623 [Apollo CLE266]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
00:0d.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233 AC97 Audio Controller (rev 50)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics (rev 03)

The -v option can be used to get more detailed output similar to the old /proc/pci information.

USB Devices

On Linux 2.4 and earlier kernels examining /proc/bus/usb/devices will provide all the information on the USB devices you could ever want:

$ cat /proc/bus/usb/devices 
T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.04
S:  Manufacturer=Linux 2.4.21-0.33mdk ehci-hcd
S:  Product=VIA Technologies, Inc. USB 2.0
S:  SerialNumber=00:10.3
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=067b ProdID=3507 Rev= 1.00
S:  Manufacturer=Prolific Technology Inc.
S:  Product=Mass Storage Device
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=dc00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

On 2.6 kernels use the lsusb command instead:

$ lsusb
Bus 010 Device 002: ID 2040:9950 Hauppauge 
Bus 010 Device 001: ID 0000:0000  
Bus 011 Device 002: ID 2040:9950 Hauppauge 
Bus 011 Device 001: ID 0000:0000  
Bus 009 Device 001: ID 0000:0000  
Bus 008 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 007 Device 001: ID 0000:0000  
Bus 006 Device 001: ID 0000:0000  
Bus 005 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  

In this version the root hub devices provided by the driver don't display a name. In more recent versions the root hubs are named and the USB version stated:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

For more detailed information about the devices use lsusb -v (this generates a lot of output), for a summary giving a connection tree use lsusb -t:

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M

This loses the device names, however the verbose tree (lsusb -tv) addresses that problem:

$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 80ee:0021 VirtualBox USB Tablet

Giving a topology for the USB devices.

Firewire Devices

To get details of Firewire (IEEE-1394) devices see /proc/bus/ieee1394/devices:

$ cat /proc/bus/ieee1394/devices 
Node[01:1023]  GUID[0040635000009d72]:
  Vendor ID: `Linux OHCI-1394' [0x004063]
  Capabilities: 0x0083c0
  Bus Options:
    IRMC(1) CMC(1) ISC(1) BMC(0) PMC(0) GEN(0)
    LSPD(2) MAX_REC(2048) CYC_CLK_ACC(0)
  Host Node Status:
    Host Driver     : ohci1394
    Nodes connected : 2
    Nodes active    : 2
    SelfIDs received: 2
    Irm ID          : [01:1023]
    BusMgr ID       : [01:1023]
    In Bus Reset    : no
    Root            : yes
    Cycle Master    : yes
    IRM             : yes
    Bus Manager     : yes
Node[00:1023]  GUID[0050770e00071002]:
  Vendor ID: `Prolific PL3507 Combo Device' [0x005077]
  Capabilities: 0x0083c0
  Bus Options:
    IRMC(0) CMC(0) ISC(0) BMC(0) PMC(0) GEN(0)
    LSPD(0) MAX_REC(64) CYC_CLK_ACC(255)
  Unit Directory 0:
    Vendor/Model ID: Prolific PL3507 Combo Device [005077] / (1394-ATAPI rev1.10) [000001]
    Software Specifier ID: 00609e
    Software Version: 010483
    Length (in quads): 8

From Linux 2.6.33 a "new" Firewire stack is used, which changes the kernel modules used (see LKML: Linus Torvalds: Linux 2.6.33-rc3). This also moves the Firewire files into the /sys/ tree. For simple cases the contents of the vendor_name and model_name files may be enough:

$ cat /sys/bus/firewire/devices/fw*/vendor_name 
Linux Firewire
Shecom
Prolific PL3507 Combo Device
$ cat /sys/bus/firewire/devices/fw*/model_name 
Juju
ikebana
(1394 ATAPI,Rev 1.00)

When more information is required the lsfirewire script from cladisch/linux-firewire-utils: Linux FireWire bus inspection and configuration tools will help:

$ lsfirewire
fw0: Linux Firewire Juju
fw1: Shecom ikebana
fw2: Prolific PL3507 Combo Device (1394 ATAPI,Rev 1.00)
$ lsfirewire -v
device fw0:
  vendor ID: 0x001f11
  model ID: 0x023901
  vendor: Linux Firewire
  model: Juju
  guid: 0x0011060000007427
device fw1:
  vendor ID: 0x00d04b
  hardware version ID: 0x00f911
  vendor: Shecom
  hardware version: OXFW911
  guid: 0x00d04b0000003382
  units: 0x00609e:0x010483
  unit fw1.0:
    model ID: 0x000001
    model: ikebana
    specifier ID: 0x00609e
    version: 0x010483
device fw2:
  vendor ID: 0x005077
  vendor: Prolific PL3507 Combo Device
  guid: 0x0050770e00000001
  units: 0x00609e:0x010483
  unit fw2.0:
    model ID: 0x000001
    model: (1394 ATAPI,Rev 1.00)
    specifier ID: 0x00609e
    version: 0x010483

In this case 'fw0' is the system generated device for the Firewire interface. In this case that is being provided by a PCI card, and so lspci provides more information about that device.

Virtual Machine

Using a Virtual Machine (VM) to host the operating system will often be evident by the presence of unusual hardware or configurations that would not be possible when running on native hardware.

VMware

Various devices are handled as virtual devices by VMware and are named accordingly.

For example: running the lspci command on a Linux guest system running under VMware will report various virtual devices with names containing "VMware":

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev 02)
00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)

Similar indications can be found in the boot messages, available via dmesg:

> dmesg | grep 'VMware'
DMI: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/22/2012
hda: VMware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM drive
  Vendor: VMware    Model: Virtual disk      Rev: 1.0 
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware memory control driver initialized
VMware memory control driver unloaded
VMware PVSCSI driver - version 1.0.2.0
VMware memory control driver initialized

VirtualBox

Various devices are handled as virtual devices by VirtualBox and are named accordingly.

For example: running the lspci or lshal commands on a Linux guest system running under VirtualBox will report various virtual devices with names containing "VirtualBox" or "VBOX":

$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0d.0 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 02)
$ lshal | grep -iE '(VBOX)|(VirtualBox)'
  system.firmware.version = 'VirtualBox'  (string)
  system.hardware.product = 'VirtualBox'  (string)
  info.product = 'VirtualBox mouse integration'  (string)
  input.product = 'VirtualBox mouse integration'  (string)
  scsi.model = 'VBOX HARDDISK'  (string)
udi = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  info.product = 'VBOX HARDDISK'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  storage.model = 'VBOX HARDDISK'  (string)
  storage.serial = 'VBOX_HARDDISK_VBaf369ac6-e504000b'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_VBOX_HARDDISK_VBaf369ac6_e504000b'  (string)
  info.vendor = 'VirtualBox'  (string)
  usb_device.vendor = 'VirtualBox'  (string)
  usb.vendor = 'VirtualBox'  (string)
  info.product = 'VirtualBox USB Tablet'  (string)
  input.product = 'VirtualBox USB Tablet'  (string)
  info.product = 'VirtualBox Guest Service'  (string)
  pci.product = 'VirtualBox Guest Service'  (string)
  info.product = 'VirtualBox Graphics Adapter'  (string)
  pci.product = 'VirtualBox Graphics Adapter'  (string)
  scsi.vendor = 'VBOX'  (string)
  info.vendor = 'VBOX'  (string)
  storage.vendor = 'VBOX'  (string)

Similar indications can be found in the boot messages, available via dmesg:

$ dmesg | grep -iE '(VBOX)|(VirtualBox)'
[    0.000000] ACPI: RSDP 00000000000e0000 00024 (v02 VBOX  )
[    0.000000] ACPI: XSDT 00000000dfff0030 0003C (v01 VBOX   VBOXXSDT 00000001 ASL  00000061)
[    0.000000] ACPI: FACP 00000000dfff00f0 000F4 (v04 VBOX   VBOXFACP 00000001 ASL  00000061)
[    0.000000] ACPI: DSDT 00000000dfff0470 01B96 (v01 VBOX   VBOXBIOS 00000002 INTL 20100528)
[    0.000000] ACPI: APIC 00000000dfff0240 0005C (v02 VBOX   VBOXAPIC 00000001 ASL  00000061)
[    0.000000] ACPI: SSDT 00000000dfff02a0 001CC (v01 VBOX   VBOXCPUT 00000002 INTL 20100528)
[    0.521175] ata2.00: ATAPI: VBOX CD-ROM, 1.0, max UDMA/133
[    0.523518] scsi 1:0:0:0: CD-ROM            VBOX     CD-ROM           1.0  PQ: 0 ANSI: 5
[    0.962765] ata3.00: ATA-6: VBOX HARDDISK, 1.0, max UDMA/133
[    0.963028] scsi 2:0:0:0: Direct-Access     ATA      VBOX HARDDISK    1.0  PQ: 0 ANSI: 5
[    8.483161] input: VirtualBox USB Tablet as /devices/pci0000:00/0000:00:06.0/usb1/1-1/1-1:1.0/input/input5
[    8.483284] generic-usb 0003:80EE:0021.0001: input,hidraw0: USB HID v1.10 Mouse [VirtualBox USB Tablet] on usb-0000:00:06.0-1/input0
[    8.729986] vboxguest: major 0, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)
[    8.729989] vboxguest: Successfully loaded version 4.1.18 (interface 0x00010004)
[   10.164395] vboxsf: Successfully loaded version 4.1.18 (interface 0x00010004)
[   11.733809] [drm] Initialized vboxvideo 1.0.0 20090303 for 0000:00:02.0 on minor 0

The VirtualBox Guest Additions kernel modules show up in lsmod:

$ lsmod | grep -i vbox
vboxsf                 90112  1
vboxvideo              49152  0
vboxguest             413696  6 vboxsf
ttm                   114688  2 vmwgfx,vboxvideo
drm_kms_helper        278528  2 vmwgfx,vboxvideo
drm                   618496  7 vmwgfx,drm_kms_helper,vboxvideo,ttm

However not all VirtualBox hosted VMs have these installed.


UNIX System Information - HP-UX

HP-UX

Hewlett Packard's (HP) UNIX for their HP 9000 (Wikipedia) line of workstations and servers. While HP-UX (Wikipedia) was originally based on System III, modern versions are more akin to System V.

Probably best known for its use on HP's PA-RISC (Wikipedia) based systems.

UNIX System Information - HP Tru64

Introduction

HP Tru64 UNIX, also known as OSF/1, Digital UNIX or Compaq Tru64. See Wikipedia for more details.

UNIX System Information - Apple MacOS X

Apple MacOS X

While most users are familiar with the desktop environment, the underlying operating system for Apple MacOS X (Wikipedia) is the Darwin UNIX variant (Wikipedia). As such there is a wealth of information that can be obtained about the system from the command prompt.

UNIX System Information - Generic

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).