You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


The scripts are on test-msr.geant.net (62.40.104.162) and in the /opt/msr-reports/reports directory.

The main script is called report_generate.sh which in turn calls other MySQL Stored procedures and other Bash Shell Scripts.

The definitions for the MySQL Stored Procedures can be reviewed in the reporting-ddl.sql and reporting-dml.sql files.

The scripts use a configuration file called config.inc to define MySQL connection information.

A tree structure for the main script, report_generate.sh is as follows:

report_generate.sh

dashboard_import.sh

opsdb_import_new.sh

msr_migration.php

find_parent.sh

report_calculate_utilisation.sh

report_calculate_availability_part1.sh

Switch to root (sudo su)

Run the report_generate.sh with relevant year and month

Example of running the report generator script for July 2017:

nohup ./report_generate.sh -y 2017 -m 7 >jul_msr.txt &

The script takes approximately 10 minutes to run, when complete the last line of the output file will read:

*** report_generate.sh Complete *** Date / time

Once the above script has completed, then run the following script:

nohup ./report_calculate_availability_part2.sh -y 2017 -m 7 >jul_msr_part2.txt &

** The above script can take at least 4 hours to run


  • No labels