Novell Server Volume manager Stats in PHP

Posted on 2007-07-19
Last Modified: 2012-06-27
Basics, Novell 6.5 apache tomcat PHP 5

I Want to create an php page that connects to 35 servers polls server and volumes for drivespace writes to a display page and writes to a mysql database to update server info (database already exists)

this will run on a single server and create html page, one page for all 35 servers would be nice but a multi framed page opening up the php from all 35 servers was one way I can see the info


<title>Server Statistics</title>



<?php // Create an HTML table based on the values from the db ?>
<table border><TD>
<tr><B><th>Volume Name</th><th>Total Space</th><th>Free Space</th></tr>


$vol = new UCS('UCX:volumemgr') or die("<font color=red><b>Unable to create the Volume Manager object</b></font><br>");

$db = $vol->{"Volumes"};
$retVal1 = $db->reset();
$retVal1 = $db->hasMoreElements();

while ($retVal1)
    $retVal2 = $db->Next();
    $retVal3 = $retVal2->{"Name"};
    $tb      = $retVal2->{"TotalSpace"};
    $fb      = $retVal2->{"FreeSpace"};
   <?php echo $retVal3; ?>
   <?php echo $tb; ?>
   <?php echo $fb; ?>
   $retVal1 = $db->hasMoreElements();


Question by:Zen8Master
    LVL 42

    Expert Comment

    by:Rob Jurd, EE MVE
    Where are you at with the project? what seems to be the problem / where are stuck?

    Author Comment

    I would like to view as a html summary page and send all data for all servers to a mysql server database to allow me to set up trending stats.
    this works fine and kicks back stats on the server it is on but I would like to run against all my servers from one server
    LVL 42

    Expert Comment

    by:Rob Jurd, EE MVE
    The first thing that comes to mind with this is setup a SOAP interface on each of your servers that when called will return the stats that you want in an xml structure:

    for example:

    a SOAP request may just call a common function that does what you've detailed in your code above and returns the data to the calling page

    So the following is running on one server gathering the information.  It is asking each server for the stats using the following code

    (note: this is just conceptual and doesn't document any real functions just for design purposes)

    $server1 = SOAP_REQUEST('');
    $server2 = SOAP_REQUEST('');
    $server3 = SOAP_REQUEST('');

    you can then enter this into a database quite easily but lets work out this first

    Author Comment

    I am just a newbie though..goot at putting other thing together from other sources...(not yet good enough to be creative yet,  except on a small scale)
    It seems SOAP is supported on novell apache 2/tomcat I can not find any clear cut examples to use or copy...
    What I have done so far is to put a link field in my database to run the vstats.php in a child window from the server in question and write to the other fields (free space ect.) when the vstats.php is run...
    it would be nice to run from one place...
    I can not seem to find any way to call the
    "$vol = new UCS('UCX:volumemgr')" from another server than the one it is on...
    LVL 42

    Accepted Solution

    "I can not seem to find any way to call the $vol = new UCS('UCX:volumemgr') from another server than the one it is on..."

    I wonder if you can get this connection script to work:

     // Create NWDir UCX object
     $nds = Perl2UCS->new("UCX:NWDir");
     // Set tree and context to login
     $nds->{"FullName"} = "nds:\\tree\\context";
     // Enter the NDS login name and password
     $nds->login ("username", "password");
     // Print short name of current context
     print "Short Name : " . $nds->{"ShortName"} . "\n";
     // Logout of NDS tree
     $nds->logout ();

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now