PhpSysInfo - OS/2 Patch

From OS2World.com Wiki
Jump to: navigation, search

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

Features

phpSysInfo displays the following details

  • Hostname and IP address
  • OS/2 version
  • System Uptime
  • CPU Model and Cache Size
  • List of PCI Devices and IDE Devices
  • Network Usage
  • Physical Memory and used swap space
  • Partitions and the amount of space used

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:


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:

Readme.OS2 That file you didn't read
COPYING Licence file (standard GNU license) - the second file you didn't read
cpuid.dat

Modified cpuid.dat file from [/web/20041024101633/http://www.os2world.com/djfos2/phpSysInfo2/phpSysInfo2.html#cpuident cpuident.zip]

phpSysInfo.cmd Wrapper for Rexx utilities and other programs that need some sort of manipulation that I can't do with PHP. determine the used, free and swapped memory details
phpSysInfo2.html This file
index.php Modified version of the index.php from phpSysInfo.
common_functions.php Modified version of the common_functions.php from phpSysInfo.
class.OS2.inc.php Class file definition for all the OS/2 specific things.
phpSysInfo2Test.cmd This is Rexx program the runs phpSysInfo.cmd with all possible parameters. The details are shown on the screen and can be used to debug the info displayed by phpSysInfo.

Requirements

The following other packages are required to get this working:

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:
    • index.php
    • include\common_functions.php
  5. Put class.OS2.inc.php into the include\os directory
  6. Put the rest of the contents of this package into the same directory as the phpSysInfo package
  7. 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.
  8. Make sure the following files are available. It is probably simplest if you put these in the phpSysInfo directory.
  9. Start a browser, and point it at http://your_hostname/your_phpSysInfo_directory/index.php.
  10. Boast to the world about your system!

Other Stuff

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

Changelog

Updated on 06/02/2002. Changes include:

  • 0.4.0 - 19/05/2004 This version was never released.
    • Updated to phpSysInfo 2.2.
    • Updated to latest CPUID.DAT.
    • Added link to latest pcidevs.txt.
  • 0.5.0 - 01/09/2004
    • Updated to phpSysInfo 2.3.
    • Better information for "Kernel Version", "Distro Name", "Load Average" and "Cache Size" thanks to code from Biro Timas.

Author

Links

Here are some links that you might find useful:

Licence

Freeware

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