COMP 3000 2011 Report: Inquisitor

From Soma-notes
Revision as of 00:01, 9 December 2011 by Atchekan (talk | contribs)
Inquisitor Logo

Part 1

Background

Name

The name of the distribution is Inquisitor.

Goals and Target Audience

This distribution aims to provide an open-source hardware testing and certification system, that is:

  • Customizable: it is possible to pick and choose which modules and tests to include.
  • Modular: it is made up from a series of interchangeable modules; one can easily add new modules in order to add new test detections, production steps, etc. This will be described in greater detail in later parts of the report. Please stay tuned!
  • Flexible: it is possible to adjust virtually any parameter in analysis or testing process and customize the system to the widest extent possible.
  • Intelligent: it is server-based version includes a database that stores all the data on all computers that were tested by Inquisitor making easy to keep track of multiple systems/PCs. If some parts of the hardware were to change, 'clever scheduler' won't redo all the long testing, but only the tests that were relevant to the hardware changes.
  • Distributed: through its modular architecture, Inquisitor can be easily distributed across a cluster to distribute load or make a geographically distributed system.
  • Scalable: it is possible to test just one computer or all the computers in an organization.
  • Free: it is free, and that's always good!

Who Develops it

It is being developed by Mikhail Yakashin and another 5 guys, with various contributions from others, the full list of names can be found below:

Inquisitor team is:

  • Mikhail Yakshin
  • Pavel Melnikov
  • Maksim Bartenev
  • Sergey Matveev
  • Denis Borovikov
  • Andras Horvath

With contributions and suggestions from:

  • Anton Farygin
  • Anton Kachalov
  • Valery Inozemtsev
  • Alexandra Panyukova
  • Michail Pishchagin

How To Get It

Inquisitor may be obtained via the official website. Currently it seems that only a direct download is available, but there is a heading for BitTorrent, so who knows it may also be available as an option in the future. There are several 'flavors' to choose from; there is a standalone version, a live version, and an enterprise version.

  • Standalone version, installs into whatever Linux OS system you are currently running by modifying a configuration makefile with your current system parameters. This is probably the best for "demonstrating and learning Inquisitor" as stated by the people working on the distribution.
  • Live version, is a Linux Live CD option that allows you to boot straight from the CD/DVD. A good choice for those that are afraid to accidentally mess something up on their system when running destructive testing and for those that don't have a Linux OS installed on their machine.
  • Enterprise version, allows the user to setup a dedicated testing server that would allow any computer to boot from the network using the preboot execution environment (PXE) protocol in order to test multiple computers on a regular basis. The PXE protocol is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or the OS. This protocol broadcasts to the network a packet that will identify and find the locations of other computers on the network that need to be bootstrapped. Once done the machines at the various IP points will then be able to, via the trivial file transfer protocol (TFTP), download a network bootstrap program (NBP) into random-access memory (RAM) and run it.

How Large is it

The size of each of the aforementioned 'flavors' is relatively small and only took a couple of minutes to download via my connection at home. The distribution is zipped, and version 3.0 is under a megabyte in size. When unzipped it is just under 2 megabytes (1.95). The iso for the Live CD version of the distribution is 131 megabytes for 32-bit systems, and 135 megabytes for 64-bit systems.

Influences

ALT Linux is used as the base and starting point for Inquisitor.

Miscellaneous

Inquisitor uses an internal scheduling program that allows a user to schedule and run multiple tests, in a predefined order with varying parameters.

The following tests are available to run. Please refer to the API for further information and documentation on the various tests.

  • Array configurator
  • Boot from image
  • BYTEmark benchmark suite
  • CPU benchmark: Dhrystone
  • CPU benchmark: Whetstone
  • CPU burn
  • Database to Detects comparison
  • DD
  • FDD read/write
  • Firmware reflashing
  • HDD array stress
  • HDD benchmark: Bonnie
  • HDD benchmark: hdparm
  • HDD benchmark: IOzone
  • HDD passthrough
  • HDD SMART
  • Memory benchmark: STREAM
  • Memory test: Memtester
  • Mencoder in memory
  • Mencoder on hard drive
  • Network interface
  • ODD read
  • ODD write
  • Partimage
  • Reference-based detects comparison
  • Stress compression
  • Torrent upload
  • UnixBench benchmark suite
  • USB flash drive
  • USB GPRS modem
  • USB GPRS Modem Dialup
  • USB GPRS modem signal level
  • USB presence

Installation/Startup

Installation

I decided to go with the Live CD 'flavor' of this distribution as it is the one that would minimize my chances of doing something I would regret to my own PC via some of the write tests that were available as part of the default package. I used VirtualBox to mount the downloaded iso, this enabled me to do some testing and play around with creating my own test cases, and packages. This was easy and straight forward.

Live CD Installation Diagram

A few installation options are described below:

Live CD

Download and save the iso (Live CD) image that is suitable for your system from the Inquisitor website. Choose a virtualization software to use.

Oracle VM VirtualBox
  1. Download and install VirtualBox.
  2. Create a new Virtual Machine by following the point and click wizard.
  3. Mount the Inquisitor iso, previously downloaded.
  4. Start the Virtual Machine with the mounted image.
  5. Select one of the options and have fun...
VMware
  1. Download and install VMware.
  2. Create a new Virtual Machine by following the point and click wizard.
  3. Mount the Inquisitor iso, previously downloaded.
  4. Start the Virtual Machine with the mounted image.
  5. Select one of the options and have fun...

Problems Encountered

None encountered.

Basic Operation

Figure 1 - Main Menu
Figure 2 - A test in progress
Figure 3 - Test results

The setup used; Oracle VM VirtualBox running a mounted Live CD copy of Inquisitor v3.0.

The main menu that is presented to the user directly following boot-up is straightforward and easy to use (Figure 1). All of the options are grouped into categories. Selecting and running tests is straightforward, a test is selected and ran, after it is done, the results are saved and may be viewed at any time. Everything is automatic (Figure 2), you just 'point and click' with the outcome presented as 'DONE', 'FAILED', 'SKIP', 'PASSED', and 'CALLED' - the wording is fully customizable and can be changed via a configuration file if one so desires -. Some tests require the user to enter a set of parameters that are test specific, such as the number of iterations to run through or test duration. All of the parameters are entered via a TUI textfield. Once the desired test(s) are ran, results are saved and may be viewed at any time (Figure 3).

I did not encounter any problems. Although with some of the more time consuming tests it would have been nice to see some kind of an update on what is currently happening, in order to eliminate any suspicion that the system has hung. The only other gripe I had was with the 'View test results' constantly returning me not to the menu from which I came, but to the main menu. This forces the user to go back to wherever he/she was each and every single time. Having an option to 'Exit' once everything was done would have been nice.

During my time with Inquisitor I tried to stick to tests that were non-destructive (would not touch data on my HDD and possibly cause issues). A couple of the tests I had tried are outlined in a step-by-step basis below:

Trial Test Case 1

Figure 4 - Single test main menu
Figure 5 - 'bonnie' test results

This test involved running a test that would check how my system handles file transfers to and from the harddrive. This would be usefull for anyone working with a server as it could possibly point out and eliminate bottlenecks in a system. For this purpose Inquisitor uses the Bonnie benckmark, which allows it to measure the performance of Unix file system operations. I.e. the basic operations like reading (putc()), writing (write()), and rewriting which involves first reading some data, messing it up, and rewriting it again - this uses lseek() -. Which, in theory, test the effectiveness of the filesystem cache and the speed of data transfer. To do this in Inquisitor you simply need to select the "single" testing option from the main menu (Figure 1) by pressing "S" on the keyboard followed by enter. Then you would be presented with the "Run a single test" main menu (Figure 4). Here, simply make sure that the test named "bonnie" is selected and press enter. The test will begin and after it is done the results are displayed (Figure 5).

The results show that - in my case -:

  • The output character speed was 32962 bits per second. Tested by writing to a file using putc() stdio macro.
  • The output block speed was 33827 bits per second. Tested by writing to a file using write().
  • The rewrite speed was 95416 bits per second. Tested by rewriting a "corrupted" block using read(), write(), and lseek().
  • Bits are read from a file at a speed of 53328 bits per second. The file is read using getc().

Trial Test Case 2

Figure 6 - Dhrystone test results

This test case was a single test, that checked my CPU integer performance. For this purpose Inquisitor uses the Dhrystone benchmark. The C version. This benchmark tries to imitate the processor usage of some common set of programs. The result is output in terms of million instructions per second (MIPS). Which is useful to find out how the CPU is performing in comparison to how it should be performing based on information that can be found out from various chip manufacturer websites. To do this in Inquisitor you simply need to select the "single" testing option from the main menu (Figure 1) by pressing "S" on the keyboard followed by enter. Then you would be presented with the single test main menu (Figure 4). Here simply make sure that the test named "dhrystone" is selected and press enter. If you want, you can adjust the duration of the test in seconds. If you choose to do so the result will then have to be divided by the number of seconds to determine the number of instructions per second. The test will begin and after it is done the results are displayed (Figure 6). The results show that - in my case - the CPU is able to perform, roughly, 6 million instructions per second.

As you can see the test is useful, easy to run, and fast.

Usage Evaluation

From my experience I think that the distribution does everything that it had promised on it's website and then some. I found it very easy to install and come to terms with, and the ability to create and modify existing test cases was simple and fairly straight forward thanks to the provided documentation that kept things concise and not overly complicated. The basics are there, and are enough to lay the foundation for whatever test case module you may want to create provided you have some background experience in programming and know what it is that you want to do.

Part 2

Software Packaging

How is software packaged for this distribution?

Software is packaged using the RPM package management system. It's associated file format is .rpm. This format was intended primarily for GNU/Linux distributions and is the baseline package format of the Linux Standard Base. Repositories are used to contain applications, and they are required in order to maintain system integrity and stability. This was done because software packages often have one or more dependencies. If two programs A and B depend on C and upgrading A depends on upgrading C, then B will also have to be updated to be able to 'interact' with the upgraded version C. Therefore having repositories that contain different releases and versions of packages helps mitigate this issue.

Figure 4 - Synaptic

What packaging format and utilities are used?

There are 2 utilities that are used for package management:

  1. Synaptic is a graphical package management tool that comes pre-installed with the distribution. It allows the user to view, install, remove, and upgrade software packages (Figure 4).
  2. Advanced Packaging Tool (APT) is a command line terminal based packaging tool that has been modified to also work with RPM via APT-RPM.

How can you use these utilities to get a list of installed packages?

Synaptic will automatically list all of the packages installed on the system as soon as it is opened. Adding, upgrading or removing packages can be done in several ways:

  • Select the desired package and choose the action from the 'Package' menu.
  • Double click on the package name.
  • Choose an action from the context menu of the package.
  • Click on the status icon to open a menu that contains all possible actions.

APT has various commands that the user can use:

  • apt-cache - Will allow you to search the local package cache for packages.
  • apt-cache search [package name] - Will show packages with 'package name' that are installed.
  • apt-cache show [package name] - Will show information for 'package name'.
  • apt-cdrom - Can be used to add package archives to the list of sources that are defined in /etc/apt/sources.list.
  • apt-get - Is used to handle packages.
  • apt-get update - Should be run prior to installing or upgrading a software application as it will make sure that the package cache is up to date.
  • apt-get install [package name] - Will install the 'package name' package.
  • apt-get remove [package name] - Will remove 'package name' package from your machine.
  • ...along with many other less widely used commands. Please refer to man pages or online sources for all of the available commands.
Package Breakdown

How extensive is the software catalog for this distribution?

There is a good variety of applications that come with the distribution, from a wide variety of categories. All-in-all, there are 1300 packages pre-installed. There is a nice variety of games (for Tetris lovers, its in there!), Flash, Java JRE, Quicktime, a browser - Firefox -, document tools, calculator, etc, are all included. Wine is also in here. I am not a LInux user and have not yet tried it, but it sounds pretty cool as it supposedly lets you run Windows software on other operating systems.

Please see a more detailed breakdown of the pre-installed packages on the right.

Major package versions

Major Software Packages Included
Package Current Version (Size) Latest Version Modifications Rationale for inclusion
Kernel 3.0.3-alt0.M60P.1 (80.4 MB) 3.1.1 No evident modifications. It is a default 2.6.x kernel variant for ALT Linux distributions. It was most likely chosen because it is a proven kernel. Stable and reliable.
glibc 2.11.3-alt6 (2962 kB) 2.14 Some of the most recent modifications by the authors have been; some bug fixes, some solutions to localization issues, reversion of some broken commits, and a fixed nscd reload. Full list can be found in the changelog. It was most likely chosen because without these files a GNU/Linux system would not function.
X.org 1.10.3-alt0.M60P.1 (33 kB) 7.6 No evident modifications. It has most likely been included in order to provide access to the X Windows System.
JVM 1.6.0.26-alt1 (90.3 MB) 1.6 Some of the most recent modifications by the authors have been; some modifications for localization purposes and some font changes. It was most likely included to enable us - the users - to run Java applications.
Bash 3.2.51-alt1 (1066 kB) 4.2 No evident modifications. It was included to provide the user with a shell for typing various commands.
Grep 2.9-alt1 (876 kB) 2.8 No evident modifications. Grep is a command-line text searching tool which is probably why it was included.
RPM 4.0.4-alt100.24 (646 kB) 4.9.1.2 No evident modifications. It was included in order to provide a command line driven package management system capable of installing, uninstalling, verifying, querying, and updating software packages.
Firefox 5.0.1-alt0.M60P.2 (4931 kB) 8.0 Some of the most recent modifications by the authors have been; fixes of "Multiple WebGL crashes", "Stealing of cross-domain images using WebGL textures", and fixes to misc memory leaks. It was included in order to provide a browser component for this distribution and probably because it is a cross-platform browser unlike Internet Explorer.
Thunderbird 5.0-alt0.M60P.1 (39.1 MB) 8.0 Some of the most recent modifications by the authors have been; gnome-support subpackage was removed, an error was fixed that caused the client to crash due to a corrupted JPEG image, and fixes to "memory hazards". It is included to provide the user with an e-mail client that is safe and fast.
LibreOffice 3.4.2.3-alt0.M60P.1 (250 MB) 3.4.4 Some of the most recent modifications by the authors have been; KDE4 support was enabled, and some menu localization issues were solved. This package was included in order to offer the user a productivity suite (document editor) it is an off-shoot of openoffice, and it is largely compatible with other major office suites (including MS Office).

All information was gathered via the linked websites, and using the pre-installed package management utilities Synaptic and APT, along with their associated commands.

Initialization

The first things that starts running upon start up is the BIOS. The BIOS is the interface between the computer and it's various peripherals. It will load and execute the first 512 bytes off the disk (/dev/hda), the master boot record (MBR). The MBR then starts GRUB2. The boot loader, GRUB2, then loads and runs the kernel. The first thing the kernel does is 'execute' init. Init is the root/parent of all processes. It in turn will then start the /etc/rc.d/rc.sysinit script using run-level 5. Which is the default start up run-level for this version of the OS found out from /etc/inittab, which is the boot-time system configuration/initialization script.

rc.sysinit

- Below is a step by step break down of most of the major functions performed by rc.sysinit, gathered by looking through the script:

  • /sbin/initlog is ran.
  • network scripts are run via the /etc/sysconfig/network script.
  • The system will then print a welcome message and the OS banner on screen.
  • The /proc file system is then mounted.
  • The system will then check if it needs to load and use modules and set a flag accordingly.
    • If modules are to be used then the script /etc/rc.d/scripts/load_modules will be run.
  • The system clock is then set and started using /etc/adjtime and /etc/init.d/clock.
  • The file system is checked using fsck, which will return an exit code indicating the state of the FS. If all is well it proceeds. The message "No errors" is printed if the status is zero. The message "File system errors corrected" is printed if there were errors but they were corrected. If there were some other errors the specific error is printed, the user is dropped back into shell, when the user leaves the shell the system reboots.
  • A script, /etc/rc.d/scripts/lang is ran to correct some "language fixes" related to localization and user selection on boot-up.
  • Serial ports are initialized via the /etc/rc.d/rc.serial script.
  • The firewall is started via the /etc/rc.d/rc.firewall script as well as some others (what looks to be related to specific run-levels allthough I am not sure).
  • All of the kernel ring buffer messages are then dumped using the dmesg command.


Post Start-up Running Processes
Part - 1
Part - 2
Part - 3
Part - 4

Part 3

References

<references />

Inquisitor. (n.d.). Inquisitor. Retrieved October 10th 2011

Inquisitor News and Updates. (July 27th 2011). Distrowatch. Retrieved October 10th 2011

Inquisitor (hardware testing software). (July 11th 2011‎). Wikipedia. Retrieved October 10th 2011

RPM Package Manager. (December 4th 2011). Wikipedia. Retrieved November 11th 2011

Synaptic (software). (November 2nd 2011). Wikipedia. Retrieved November 11th 2011

Advanced Packaging Tool. (December 2nd 2011). APT. Retrieved November 11th 2011

Program Installation and Uninstallation (Package Management). (n.d.). ALTLinux Docs. Retrieved November 11th 2011

Debian APT Tutorial. (November, 2002). linuxgazette. Retrieved November 13th 2011

Package Management Cheatsheet. (2011). Distrowatch. Retrieved November 13th 2011

Quick HOWTO : Ch07 : The Linux Boot Process. (November 15th 2010). linuxhomenetworking. Retrieved November 13th 2011

Sisyphus repository. (December 6th 2011). sisyphus. Retrieved November 14th 2011

Preboot Execution Environment. (October 25th 2011). wikipedia. Retrieved November 14th 2011

initrd. (November 27th 2011). wikipedia. Retrieved November 14th 2011