Skip to main content
Participating Frequently
January 11, 2010
Answered

Can FMS 3.5 to determine the amount of free space on hard drive?

  • January 11, 2010
  • 2 replies
  • 944 views

Hello. If you use FMS 3.5 as a DVR to record the live streams, whether it can determine that the hard disk has 100 megabytes? It is necessary that I live streams redirected to another server.

    This topic has been closed for replies.
    Correct answer

    Very good idea, but I did not understand exactly how I automatically generate this file with the data? (on Windows) need some kind of program?


    I am not a windows specialist, you should find someone who knows how to do that.

    you can start there with the scheluded tasks basics : http://support.microsoft.com/?scid=kb%3Ben-us%3B308569&x=9&y=6

    note that if you want your task to be executed more often than every hour you will need to use the advanced properties of the scheduled task.

    the task now. create somewhere a file, let's call it "checkDiskSpace.bat" for instance. This is the task that you will fire every five minutes (as you need it but not too often or you will load your server). This file can contain something very simple like that :

        dir d:\ > "C:\Program Files\Adobe\Flash Media Server\Applications\MyApplication\diskSize.txt"

    And... that's it !

    Each time it will be executed by the schedulded task the destination file will contain something like that (warning : french there !!!!) :

    Le volume dans le lecteur D s'appelle Data
    Le numéro de série du volume est C494-CB26

    Répertoire de D:\

    06/03/2007  11:31             8 321 AC_RunActiveContent.js
    16/07/2005  09:39             5 204 ArcticOverAll.swf
    16/07/2005  09:39             5 323 ClearExternalAll.swf
    04/11/2008  14:58    <REP>          DATAN
    27/03/2009  17:14    <REP>          Documents and Settings
    15/12/2008  15:23    <REP>          Eclipse
    08/01/2009  14:56       256 350 153 Eclipse_ganymede_3.4_SVN_LDAP.rar
    11/02/2008  15:40    <REP>          Install
    25/02/2009  15:02    <REP>          ldapplugin
    01/04/2009  10:48               553 Profil d'encodage FLV sans titre.xml
    25/11/2009  14:42    <REP>          Program Files
    31/12/2009  13:05    <REP>          Quest Lab
    25/11/2009  14:43    <REP>          TEMP
    12/03/2009  10:32    <REP>          Workspace_Eclipse_LDAP_Generic
                  11 fichier(s)      262 205 825 octets
                  11 Rép(s)   3 346 714 624 octets libres

    As you can guess the last line contains the exact left space size on the disk D:

    If you can contact someone who realy knows how to do things with MS systems ask him how to do that, i am pretty sure there is better ways to do it (like using the windows system scripting language that I don't know )

    Cheers,

    François

    2 replies

    January 14, 2010

    If you can use something like PHP and a web server on your system you can also use a LoadVar object to call a local URL pluged on a PHP script.

    This one will find out easily the remaining space on your disk and send the answer to your FMS application.

    You will however have to handle the fact that this process is asynchronous (the LoadVar.load() method).

    Hope this helps,

    IFZen

    RnSnowAuthor
    Participating Frequently
    January 14, 2010
    Thanks, but I would like to do Apache and FMS 3.5. Php increases the risk of breaking the server.
    January 14, 2010

    Eventually you can proceed with a schedulded task, wether it is on a Linux server (cron + shell) or windows (microsoft scripting system, whatever they call it).

    Imagine you have a task running on your system that generates a file with your disk space inside it. Then with FMS you can read this file and use the data as you wish.

    Very simple exemple for Linux, in your FMS running user crontab :

         0-59/5 * * * * df > /opt/adobe/fms/application/myApp/diskspace.txt

    This will generate the disk file system size report inside a text file that you will be abble to analyze inside your FMS Actionscripts, the value being renewed every 5 minutes.

    Ugly but workin'.

    January 12, 2010

    I'm fairly certain that there is no API for disk resources (definitely not in the server side actionscript API, and I don't see anything in the Admin service API docs either.

    I suppose you could use a local webservice to check disk space through another application.

    RnSnowAuthor
    Participating Frequently
    January 12, 2010

    Thank you. It is unfortunate that outsiders will have to use the facilities. Programmers FMS need to enter this possibility in the API server. In my view this is important. It can also restrict the length and volume of the recorded file in Application.xml> <StreamManager> <Recording> <MaxSize>.

    January 12, 2010

    Hi,

    You could use the Authorization Plugin code to handle your requirement. You could write C++ code there and authorize the publish/record events based on the disk space check.

    The documentation in flashmediaserver_3.5_plugin_dev.pdf might proove helpful on how to get started developing an authorization plug-in.

    Thanks

    Mamata