From: Steve McMillen <[EMAIL PROTECTED]>
Subject: Re: Get Info on RealServer

Sorry for the long post.  This attempts to answer the question of how to
monitor encoders using the RealServer Administration system.

You can monitor the following properties of encoders.

 > > LiveConnections = null
 > > LiveConnections.Index = 5
 > > LiveConnections.Entry3 = null
 > > LiveConnections.Entry3.IsEncoded = 1
 > > LiveConnections.Entry3.FileName = null
 > > LiveConnections.Entry3.LongName = null
 > > LiveConnections.Entry3.Bandwidth = 211952
 > > LiveConnections.Entry4 = null
 > > LiveConnections.Entry4.FileName = null
 > > LiveConnections.Entry4.Bandwidth = 336264
 > > LiveConnections.Entry4.IsEncoded = 1
 > > LiveConnections.Entry4.LongName = null
 > > LiveConnections.Count = 2


Unfortunately, the FileName and LongName currently report as null always
because of a bug (they are implemented as buffers instead of strings).
You can still write a monitor plugin using the RealSystem G2 SDK but you
will just have to read these as buffers instead of strings.  The
interface from the RealSystem Administrator should be fixed in a later
release.

Below is the server side javascript I use to report all encoders
currently connected.  This should be an HTML file placed in the
RealServer Administrator directory.  If you want to put this file in a
directory that is not authenticated, please look further below for
instructions on modifying the RealServer configuration file
(rmserver.cfg) to set this up.


----------- begin of encoders.html -------------------
function DoProps(a)
{
     value = RMAGetPropertyValue(a);
     if (value != null)
     {
         RMAOutput(a);
         RMAOutput(" = ");
         RMAOutput(value);
         RMAOutput("<br>");
     }
     else
     {
         // Print the names/values even if they are null
         RMAOutput(a);
         RMAOutput(" = ");
         RMAOutput(value);
         RMAOutput("<br>");

         var x = 0;
         b = RMAGetNthProperty(a, x)
         while (b)
         {
             DoProps(b);
             x++;
             b = RMAGetNthProperty(a, x);
         }
     }
}

//DoProps("client");
//DoProps("server");
DoProps("liveconnections");

</server>
------------- end of encoders.html ----------------

You can just place this script in the RealServer Administration files
directory if you want to test it out.  You may want to create a new
server side include directory which would allow you to either use
different username/passwords or allow general access to this html file.
To do this, perform the following:

Add the following the the FSMounts section of the Configuration file

     <List Name="RealSystem Monitor Files">
         <Var MountPoint="/monitor/"/>
         <Var ShortName="pn-admin"/>
         <Var BaseMountPoint="/monitor/includes/"/>
         <Var Realm="image.MonitorRealm"/>
     </List>
     <List Name="Real System SSI">
         <Var ShortName="pn-xmltag"/>
         <Var MountPoint="/monitor/includes/"/>
         <Var BaseMountPoint="/monitor/files/"/>
         <List Name="TagHandlers">
             <Var h1="pn-includer"/>
             <Var h2="pn-vsrctaghdlr"/>
         </List>
     </List>
     <List Name="RealSystem Monitor">
         <Var MountPoint="/monitor/files/"/>
         <Var ShortName="pn-local"/>
         <Var
BasePath="/usr/local/rmserver/RealAdministrator/JavaMonitor"/>
     </List>


And add the following toe the HTTPDeliverable List

  <Var Path_3="/monitor"/>

And add the following toe the AuthenticationRealms List (only if pages
are to be authenticated)

     <List Name="SecureMonitor">
         <Var Realm="image.AdminMonitor"/>
         <List Name="BasicAuthenticator">
             <Var PluginID="rn-auth-basic"/>
             <Var DatabaseID="Monitor_Basic"/>
         </List>
     </List>


And add the following toe the Databases List (only if pages are to be
authenticated)

     <List Name="Monitor_Basic">
         <Var PluginID="rn-db-flatfile"/>
         <Var Path="/usr/local/rmserver/mon_b_db"/>
     </List>


Please note that the above code is provided 'as is' in hopes that it
helps get folks interested in doing this a head start.  I may also put
up a mini example of this online.  If I do it will be at
http://demos.real.com/tools and labeled as "RealServer Administrator
Customization".

Good Luck.

RealForum wrote:
 >
 > From: "Forums" <[EMAIL PROTECTED]>
 > Subject: RE: Get Info on RealServer
 >
 > Hi,
 > Really good stuff about the getting info from the Real Server!
 > Using that same Javascript
 > --- begin page ---
 > <server language="JavaScript">
 > RMAOutput( RMAGetPropertyValue("Server.ClientCount") );
 > </server>
 > --- end page ----
 >
 > Can you monitor Encoders.. and which command, if so. And what Encoders are
 > online, ie the name of the encoder?
 >
 > Alan Poole
 > [EMAIL PROTECTED]
 > 

*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites.  Archives of RealForum can
be found at http://realforum.real.com

If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:

    unsubscribe realforum

or from another account, besides the address you subscribed with:

    unsubscribe realforum <[EMAIL PROTECTED]>

Reply via email to