Flash Media Server Resources
|
Checking server status
View server events in the Windows Event ViewerThe
Windows Event Viewer can be used for tracking Flash Media Server
activity and debugging server applications. The Event Viewer displays
a list of events that the server generates. (The following steps
are accurate if you are working directly on the server. To view
the events from another Windows machine, use Event Viewer to open
a remote connection to the server.)
From the Windows Start menu, select Settings >
Control Panel > Administrative Tools > Event
Viewer.
Select the Application panel.
Double-click an event generated by Flash Media Server to
view details.
Check server healthFMSCheck is a command line utility program
that can be used to diagnose and determine server status. The tool
is available for both Windows and Linux using different executable
files. As a command line tool, FMSCheck is completely scriptable
using the language of your choice, such as Cscript, bash, C shell,
or Python. FMSCheck provides information about whether the server
is running or not, what the response time is, and which fmscore
processes are not responding. A small video file for testing is
included. The Users.xml file must be configured to accept a connection
from this tool (this configuration is required to use --allapps and
its dependent commands).
When the tool connects to Flash Media Server, it does the following:
Checks the connection to any instance of an application
Checks all active instances of the server by connecting to
those applications
Can publish and play a stream
Can play the available server-side stream for an application
Note: Currently, FMSCheck only supports RTMP connections
and does not check for shared objects.
FMSCheck commands and options
Option
|
Description
|
--host <hostname>
|
Required; tells the program where to connect
the server. Example: --host localhost
|
--port <number>
|
Port number is optional. The default value
is 1935. Example: --port 1935
|
--app <app>
|
Allows the program to connect to an application.
Administrator must specify the application. Example: --app app1/inst1
|
--allapps
|
Queries the Administration Server for active
instances and makes a connection to each active instance. In this
case, the administrator must use the --auser, --apswd, and -- ahostport options
in order to log in to the Administration Server. The administrator
must configure Users.xml to accept connections from this program.
This command can take time to finish; verify that the timeout value
is adequate.
|
--help
|
Displays Help for using FMSCheck.
|
--logfile <file>
|
Allows the program to output a response
to a file. If this option is not specified, a result cannot be provided.
Example: --logfile output.log
|
--play <name> [start [duration]]
|
Instructs the program to play video files.
Options are start and duration.
Values
for start and duration must be
in positive numbers or 0 and represent the number of seconds. The
default value of start is any,
which plays the file from the beginning. The default value of duration is
1 second. You can specify all to play the entire
file. You cannot give the play and publish commands
at the same time.
Example: --play foo 10 5
|
--publish <name> <duration> [record|append]
|
Publishes files to the server. This command
must be used along with --pubfile.
The duration parameter
is required; only a positive number, zero, or all is
allowed.
Both record and append are
optional. If neither is specified, the default behavior is to record.
If the file already exists and record is used, the existing file
is overwritten. After the file is published, it is automatically
played to verify the success of the publish operation. Example: --publish foo -1
|
--pubfile <file>
|
Specifies a filename. This command must
be used with --publish. Specify the name of the input
video file residing on the client side, the name of the output file
to be created on server side, and the duration.
Example: --pubfile input.flv --publish output 10
|
--parallel [<max>]
|
Allows the program to play multiple applications
at the same time. This command is used with --allapps.
If there is more than one application, tests are run on each application
serially (connect to the first application, run test, connect to
the second application, run test, and so on). Running parallel without
specifying max tests every application in parallel.
However, if there is a large number of applications, running all
of them in parallel may not be desirable. Indicate the maximum number
of applications that can be run in parallel by specifying a value
for max. For example, to run 10 tests in parallel,
use the following:
--parallel 10
|
--stagger <sec>
|
Inserts a pause between tests. This command
is used along with --parallel. The value of <sec> is
in seconds, and the default value is 1 second. If you specify a
very long stagger time (longer than the duration of the test), then
you are effectively running in serial mode. Example: --stagger 2
|
--query <" ">
|
Allows you to input your own string for
special purposes, such as authentication. Example: rtmp://host/app/inst?foo=abcd
|
--timeout <sec>
|
Specifies a timeout value, in seconds. If
the program does not receive a response from the server within this
interval, an error is returned.
|
fmscheck -v
|
Prints a version string.
|
--auser <username>
|
Specifies a user name for the Administration
Server user. Example: --auser admin
|
--apswd <password>
|
Specifies a password for the Administration
Server. Example: --apswd admin
|
--ahostport <port>
|
Specifies the Administration Server port
number. If the port number is not specified in the command line,
the default port is 1111. Example: --ahostport 1111
|
Usage examples for Windows:
* fmscheck.exe --host localhost --app app1 --logfile output.txt
* fmscheck.exe --host localhost --app app1 --play foo 0 10 --logfile output.txt
* fmscheck.exe --host localhost --app app1 --pubfile foo.flv --publish bar 10 --logfile output.txt
* fmscheck.exe --host localhost --allapps --auser admin --apswd admin --parallel 10 --stagger 2 --timeout 100 logfile output.txt
All
of the Windows examples can be adapted to Linux by using * ./fmscheck instead
of * fmscheck.exe.
FMSCheck return codesReturn codes for
the FMSCheck tool report the status after the tool has been run.
Code
|
Status
|
0
|
Success.
|
-1
|
Invalid command line argument.
|
-2
|
File not found.
|
-3
|
Connection failed.
|
-4
|
Operation timed out.
|
-5
|
Play failed.
|
-6
|
Publish failed.
|
-7
|
At least one application failed.
|
|