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 today)

When to run:

Nightly or Hourly

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 (Analyzes the logfile /var/streaming/logs/StreamingServer.*.log that corresponds to the current date or /var/streaming/logs/StreamingServer.log)

When to run:

Nightly or Hourly

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="eea55e30-b613-4983-b7d4-ac7b46cd172f"><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:

This script depends on the name Variations2 and will need to be changed whenever a name change occurs.

Changes to make for test sites:

Line 114: url of variationsURL.v2x script
Line 131: url of access.css stylesheet
Line 138: url of v2-logo.jpg
Line 146: "The Indiana University Digital Music Library"
Line 266-267: "IU Music Library"
Line 268: "Indiana University Cook Music Library"
Line 307: url of library catalog
Line 311: "View IUCAT ..."
Line 324: url of where page in the user's guide
Line 329: "IU Music Library computer"
Line 335: url of user's guide
Line 402: "Indiana University"
Line 416: url of support page in the user's guide

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:

This script depends on the name Variations2 and will need to be changed whenever a name change occurs.

Changes to make for test sites:

Line 30: url of variationsURL.v2x script
Line 44: url of access.css stylesheet
Line 52: url of v2-logo.jpg
Line 60: "The Indiana University Digital Music Library"
Line 168-169: "IU Music Library"
Line 170: "Indiana University Cook Music Library"
Line 211: url of library catalog
Line 214: "View IUCAT ..."
Line 227: url of where page in the user's guide
Line 233: "IU Music Library computer"
Line 239: url of user's guide
Line 251: url to html version of scores
Line 305: "Indiana University"
Line 322: url of support page in the user's guide

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="46ffc24a-8b1f-4c75-9608-d030e8fd3261"><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:

 

Database

setDB2Permissions.pl

Location:

/home/dmlserv/dml/bin/

Language:

Perl

Usage:

setDB2Permissions.pl ( grant | revoke ) <schema_name> <user_name>

Examples:

setDB2Permissions.pl grant RHS_CAT2 dmlrhs
setDBP2ermissions.pl revoke RHS_CAT2 dmlrhs

When to run:

After new Variations3 phase 1 test site schema and user account have been set up.

Notes:

This script is intended for use only at IU by the Variations group.
The grant option gives the specified user the necessary permissions to use the specified schema with Variations.
The revoke option takes away the users permissions to access the specified schema.

Changes to make for test sites:

NA

varGroup.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="79e66004-8845-4d82-8004-0200b6b24550"><ac:plain-text-body><![CDATA[

Usage:

varGroup.sh delete [-f] <group_name>
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6d79bbfa-5f2f-449f-8ceb-861bd5919738"><ac:plain-text-body><![CDATA[ | dump [-f] [-g <group_name>] <file_name> | -dir <dir_name>
]]></ac:plain-text-body></ac:structured-macro>
| list
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c267f39e-4c00-4319-a5e1-1a92611d4409"><ac:plain-text-body><![CDATA[ | load <file_name1> [<file_name2> ...]

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

When to run:

As needed.

Notes:

Command line utility for the Access Manager Database that is used for authorization. For more information see varGroup.sh

Changes to make for test sites: