Server Scripts

The Location for each of these scripts is both where they should live, but also where the most recent copies can currently be found.

Statistics

Note: These scripts are dependent on the timestamp scheme currently being used (MMM dd yyyy HH:mm:ss.SSS). These scripts assume that administrators will want to break down usage into the groups In Music Library, On Campus, Off Campus, and Totals which are specified by IP addresses. These scripts only deal with UI and Darwin Streaming Server log processing and analyzing.

generateStats.pl

Location:

/home/dmlserv/dml/bin/

Language:

Perl

Usage:

generateStats.pl Mmm dd yyyy filename (Analyze only specified date)
generateStats.pl filename (Analyze an entire file)
generateStats.pl (Analyze yesterday)

When to run:

Nightly

Notes:

 

Changes to make for test sites:

Line 75: sortedlogfiles - filesystem path to Darwin log files
Line 82: logfile - filesystem path to Darwin log file
Line 88: filepath - filesystem path to output directory where statistics live
Line 565: music_ip_file - full filesystem path to file containing IPs of Music Library computers
Line 569: oncampus_ip_file - full filesystem path to file containing IPs of On Campus computers

generateQTStats.pl

Location:

/home/dmlserv/dml/bin/

Language:

Perl

Usage:

generateQTStats.pl filename (Analyze an entire file)
generateQTStats.pl (Analyze all logfiles /var/streaming/logs/StreamingServer.*.log or /var/streaming/logs/StreamingServer.log)

When to run:

Nightly

Notes:

 

Changes to make for test sites:

Line 33: filepath - filesystem path to output directory where statistics live
Line 34: logfilepath - filesystem path to where logfiles live
Line 499: music_ip_file - full filesystem path to file containing IPs of Music Library computers
Line 502: oncampus_ip_file - full filesystem path to file containing IPs of On Campus computers
Line 965: cmd - contains full filesystem path to ID translation script

viewStats.cgi

Location:

/var/www/cgi-bin/

Language:

Perl

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1e6cabad-2149-4b78-8a55-00413d96ac8d"><ac:plain-text-body><![CDATA[

Usage:

viewStats.cgi?[current][year=yyyy][month=Mmm][day=dd][location=In+Music+Library|On+Campus|Off+Campus|Totals][view=yearly|monthly|daily]

]]></ac:plain-text-body></ac:structured-macro>

When to run:

Whenever an administrator wants to view statistics

Notes:

For this script to work the filepath directory should be linked into an apache viewable directory that is specified with urlpath.
This script now displays both UI and Darwin statistics.

Changes to make for test sites:

Line 28: filepath - filesystem path to statistics files generated by generateStats.pl and generateQTStats.pl
Line 29: v2URL - url of access page rendering script
Line 30: urlPath - url where comma delimited files and generated images can be found
Line 31: homepage - url of statistics about page
Line 282: CSS link is specified as urlPath/dml1.css

Reference Movie Generation

generate-ref-movie.mov

Location:

/var/www/cgi-bin/

Language:

Perl

Usage:

generate-ref-movie.mov?path=leasedir/mediafile

When to run:

Whenever an user wants to access a media file

Notes:

This script is adapted from the generate-ref-movie shell script and called Java code.
No checks are done to ensure that the mediafile is located at the path specified.
The script currently generates a reference movie only containing the 192k file. This should be changed for varying bitrates supported by reference movies.
The script does not check that QTAtom children added to a QTAtom are of the allowable types.
Line 127: Uses an assumption that is currently true and is potentially always true (but unverified)

Changes to make for test sites:

Line 9: baseurl - RTSP url that specifies the path to the lease directory under Darwin

V2X Generation

variationsURL.v2x

Location:

/var/www/cgi-bin/

Language:

Perl

Usage:

variationsURL.v2x?type=timeline&ref=urlthatholdsv2xfile
variationsURL.v2x?type=opus&instatiation_id=LIB/Instantiation/xxx=&start_offset=xxx&work_start=xxx&work_end=xxx&work_id=LIB/Work/xxx
variationsURL.v2x?type=anything&container_id=LIB/Container/xxx&start_offset=xxx

When to run:

When a link is clicked on from an access page or when directed to from another source

Notes:

Most references to Variations1 has been deleted and support dropped for simplicity.
Query string parameters vary widely as can be seen in the usage above and thus are currently gathered into a hash from $ENV{'QUERY_STRING'} as opposed to using $cgi->param('paramname]) like in the other scripts. This may want to be changed for standardization or to be used under mod_perl.
MIME types are set to application/x-variations2-* and might want to be generalized if there is a name change to Variations 3 or any other name.

Changes to make for test sites:

Line 104-121: Usage information is specific to Variations 2 and to IU.

Access Pages

access.pl

Location:

/var/www/cgi-bin/

Language:

Perl

Usage:

access.pl?id=notisSyleID

When to run:

When a link is clicked on from a catalog page or from another source

Notes:

Depends on access.xsl and score-access.xsl which have entries below as well as access.css and v2-logo.jpg.
This script depends on Notis style identifiers.

Changes to make for test sites:

Line 27: audio_access_dir - filesystem directory where audio access pages are stored
Line 28: score_access_dir - filesystem directory where score access pages are stored
Line 29: audio_xsl_file - path to audio access xslt file
Line 30: score_xsl_file - path to score access xslt file

access.xsl

Location:

/home/content/access/

Language:

XSLT

Usage:

 

When to run:

When called by access.pl for rendering an audio access page

Notes:

 

Changes to make for test sites:

 

score-access.xsl

Location:

/home/content/access/

Language:

XSLT

Usage:

 

When to run:

When called by access.pl for rendering an audio access page

Notes:

 

Changes to make for test sites:

 

generateAccessPage.sh

Location:

/home/dmlserv/dml/bin/

Language:

sh calling Java

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e92e88f5-892d-4ccc-92c1-b2a9a9ff099e"><ac:plain-text-body><![CDATA[

Usage:

generateAccessPage.sh service_name [variationsID | variationsID_file] out_directory

]]></ac:plain-text-body></ac:structured-macro>

When to run:

Whenever a new Container is created or updated (not currently setup)

Notes:

Calls v2run on edu.indiana.dml.util.AccessPageGenerator.
variationsIDs (notis-style) passed to this script must be for Containers

Changes to make for test sites: