PhpSysInfo - OS/2 Patch

phpSysInfo is a PHP script that displays information about the host being accessed. This is a patch to make it work with OS/2.

Description
phpSysInfo is a PHP script that displays information about the host being accessed.

It will displays things like Uptime, CPU, Memory, SCSI, IDE, PCI, Ethernet, Floppy, and Video Information.


 * You can grab the latest version of it here
 * Click here to view phpsysinfo's SourceForge Project Page

This is a quick and dirty update to allow phpSysInfo to display information about an OS/2 system. It only includes changed files and any extra files required for use in OS/2.

Displayed Data
The data displayed by phpSysInfo in each section:


 * Hostname and IP address are displayed as part of the heading of the page.
 * System Vital:
 * Cannonical Hostname - from the HOSTNAME environment variable. If this is not available, it is retrieved from Apache SERVER_NAME variable
 * Listening IP - retrieved from Apache SERVER_ADDR variable
 * Kernal Version - result of OS/2 "ver" command
 * Uptime - result of running [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#uptime uptime]
 * Current Usage - "N.A"
 * Load Average - "N.A"
 * Hardware Information
 * Processors - I don't know how to determine the number of processors, so I put: "At Least One"
 * Model - determined using [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuid3b.exe]
 * Chip MHz - I don't know how to determine this, so I'm putting: "N.A."
 * Cache Size - determined using [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuid3b.exe]
 * PCI Devices - again from [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuid3b.exe]
 * IDE Devices - from "RMVIEW"
 * SCSI Devices - from "RMVIEW"
 * Network UsageThis displays each network device in the system. The amount of data sent and received on the device is displayed, along with a count of the errors.
 * Memory Usage
 * Physical Memory is the amount of memory physically in the PC (using [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#countmem countmem]) and the used/free memory as determined using [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#Theseus Theseus]
 * Disk Swap in an analysis of the swapper file. It displays how much of the allocated SWAPPER.DAT is used. The memory used, free and swapped memory figures are calculated using a supplied Rexx script and [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#Theseus Theseus].
 * Mounted Filesystems is the result of running [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#df df]. It will display:
 * All local fixed drives
 * Mapped network drives
 * Any CD drive with a CD in it. Other empty removable drives will probably not be listed either (I can't test).

Package Contents
The package only contains file created for the OS/2 patch, or modified in some way from the original version. The following are the files included in this package:

Requirements
The following other packages are required to get this working:


 * [/web/20041024101633/http://phpsysinfo.sourceforge.net/ phpSysInfo] - As I am only supplying extra files, you need to get and install this. This package supports version 2.1.
 * [/web/20041024101633/http://silk.apana.org.au/apache/ Apache/2] or another OS/2 web server that will run PHP.
 * [/web/20041024101633/http://silk.apana.org.au/php/ PHP 4.1] or later for OS/2
 * cpuident.zip from [/web/20041024101633/http://www.os2warp.org/sysbench The OS/2 Benchmark Centre]
 * CountMem - [/web/20041024101633/http://hobbes.nmsu.edu/cgi-bin/h-search?key=countmem.zip countmem.zip on hobbes].
 * Uptime - [/web/20041024101633/http://hobbes.nmsu.edu/cgi-bin/h-search?key=uptime.zip uptime.zip on hobbes].
 * Merlin's PCI Hardware Sniffer from [/web/20041024101633/http://hobbes.nmsu.edu/cgi-bin/h-search?key=pci04 on hobbes]. I'm using 0.44. Only the PCIDEVS.TXT file is needed.
 * IP Monitors toolkit - [/web/20041024101633/http://www.os2usr.org/xcenter/tcpmon.zip tcpmon.zip]
 * Theseus 4 - from [/web/20041024101633/ftp://ftp.boulder.ibm.com/ps/products/os2/fixes/v4.5warp/theseus4 IBM]
 * EMX Runtime - from [/web/20041024101633/http://hobbes.nmsu.edu/cgi-bin/h-search?key=emxr emxrt.zip on hobbes]
 * df - [/web/20041024101633/http://www.tavi.co.uk/os2pages/df.html Bob Eager's version]

Many thanks to the authors or porters of these packages.

Installation
Installation is reasonably easy, especially if all the requirements are already installed. Here's the steps:


 * 1) Install Apache/2 or other OS/2 web server that will do PHP.
 * 2) Install PHP for you web server
 * 3) Install the standard phpSysInfo package
 * 4) Replace the following phpSysInfo files with the ones supplied in this package:
 * 5) * index.php
 * 6) * include\common_functions.php
 * 7) Put class.OS2.inc.php into the include\os directory
 * 8) Put the rest of the contents of this package into the same directory as the phpSysInfo package
 * 9) Make sure that the following DLLs and executables are available. The DLLs should either be in the phpSysinfo directory or a directory on the LIBPATH. Similarly, the executables should be in the phpSysinfo directory or a directory on the PATH.
 * 10) * [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#countmem countmem.exe]
 * 11) * theseus0.dll and theseus1.dll from [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#Theseus Theseus]
 * 12) * [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#df df.exe]
 * 13) * [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#uptime uptime.exe]
 * 14) * [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuid3b.exe]
 * 15) * [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#rxtcpmon rxtcpmon.dll]
 * 16) Make sure the following files are available. It is probably simplest if you put these in the phpSysInfo directory.
 * 17) * pcidevs.txt from the [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#pcidevs PCI hardware sniffer]
 * 18) * supplied cpuid.dat (replaces that from [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuident.zip])
 * 19) Start a browser, and point it at.
 * 20) Boast to the world about your system!

Version History

 * 0.1.0 - 10/03/2002 - Initial release
 * 0.2.0 - 13/03/2002
 * Replaced RxNetstat.cmd and GetMemory.cmd with phpSysInfo.cmd.
 * Changed version of df being used. Mounted network drives and file system types are now displayed.
 * Displaying SCSI details.
 * 0.2.1 - 17/03/2002
 * Improved code that handled SCSI and IDE devices. This fixes bug where SCSI devices where being displayed twice - with the SCSI and IDE devices.
 * Fixed uptime display when the machine has been up for 10 days or more. This hasn't been very well tested as my machines aren't staying up at the moment. I didn't know cats could turn computers off.
 * 0.3.0 - 08/07/2002
 * Updated to phpSysInfo 2.1
 * Host name now comes from HOSTNAME environment variable if this is set.
 * Added phpSysInfo2Test.cmd to collect data that is displayed. This is for problem debugging.
 * 0.3.1 - 24/07/2002
 * Removed a debugging statement (whoops)
 * Added six CPUs to CPUID.DAT - Athlons, Durons and PIII Tualatin. Thanks to Thorolf.
 * 0.3.2 - 25/11/2002
 * class.OS2.inc.php had a reference to RxNetstat.cmd which had been removed from the package.
 * Small amount of code cleanup.
 * I have a new e-mail address.

Known Problems
The following are problems that I know of:


 * The list of CPUs in [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuident.zip] is out of date. I have added a couple of newer CPUs, but, it's a pain to get the details from the Intel documentation. I'll add more as I have time. If you want your CPU listed, either add it yourself and send me the update, or, tell me what it is and I'll add it.

Bug Reporting
If you find any bugs, please tell me at the contact address below. Tell me:


 * Version of phpSysInfo and the OS/2 patches
 * OS/2 Version and fixpack level
 * Details of what is displayed incorrectly, and, if possible, output of the program used to display this
 * Output from running phpSysInfo2Test.cmd.
 * If your machine is visible on the internet, the URL to get to it or a saved copy of the page generated. If not, save the page as an HTML file and send that.
 * Anything else you think is important

Links
Here are some links that you might find useful:


 * phpSysinfo home
 * Apache for OS/2 - The Apache and PHP4 ports for OS/2 are available here.
 * PHP - Home for PHP

Licence
See the original phpSysInfo package for the licence.

WARNING!
This software is provided as is. No warranty is given by the author, expressed or implied. Use this software at your own risk. The author assumes no responsibility for any damage from the use of this software.

Contacts
If you find any bugs, have any suggestions or simply want to say how wonderful or terrible this is, drop me an e-mail