PHP
  Home arrow PHP arrow Page 2 - Retrieving System Information With pat...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Retrieving System Information With patSysinfo
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 19
    2004-02-16

    Table of Contents:
  • Retrieving System Information With patSysinfo
  • Plug and Play
  • What's in a Name?
  • Up and at 'Em
  • Carrying the Load
  • A Nifty Device
  • Running Out of RAM
  • Mounting Up
  • Link Zone

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Retrieving System Information With patSysinfo - Plug and Play


    (Page 2 of 9 )

    patSysinfo is a PHP-based tool designed, in the author's words, to "retrieve a lot of information about the system your HTTP server is running on." Developed by Gerd Schaufelberger, it is freely available for download and is packaged as a single PHP class which can be easily included in your application.

    Very simply, patSysinfo provides application developers with a set of APIs that ease the task of reading system information. This information includes the system's name and IP address, kernel version and CPU specification; it also includes data on the numbers and types of devices connected to the system, and real-time statistics on memory usage. At any given instant, patSysinfo can tell you which processes are running, and how much memory each one is consuming, together with the system's load average and number of connected users. If the system has built-in hardware sensors, patSysinfo can go even deeper, interfacing with these sensors via the lm_sensors package at http://secure.netroedge.com/~lm78/ to help you monitor the status of your hardware.

    Now, there's nothing very novel or unique about patSysinfo, nor does it do anything you wouldn't be able to do yourself, given sufficient time and motivation. Its true value lies in its robust implementation of common UNIX commands (like "top", "ps", "uptime", and "uname") in PHP, thereby making it possible to integrate the output of these commands into a Web application with minimal time and fuss. Written as a PHP class, patSysinfo can substantially reduce the amount of time you spend manipulating and reading system data - especially when you have a specialized application like the one I described earlier.

    Once caveat, though: patSysinfo only works with Linux systems, as it uses the special Linux /proc filesystem to obtain runtime information on the system's state. If you were planning to use this class on Windows, you should probably stop reading right now.

    Before proceeding further, you should visit the patSysinfo home page at http://www.php-tools.de/ and download a copy of the latest version (1.7 at the time of writing). The package contains the main class file, documentation outlining the exposed methods and variables, and some example scripts.

    More PHP Articles
    More By icarus, (c) Melonfire


     

       

    PHP ARTICLES

    - Using Aliases and the Autoload Function with...
    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Sub Classing Exceptions in PHP 5
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT