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

Compare with Current View Page History

« Previous Version 9 Next »


The scripts are on test-msr.geant.net (62.40.104.162 83.97.92.151) 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:

cd to /opt/msr-reports/reports

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

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

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

*** run: "tail -f ./jul_msr.txt"  — This will give a live update of the bottom content of the file. Once the process is completed you will see a message like the below one:

*** report_generate.sh Complete *** Tue Jan 23 12:16:59 UTC 2018

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

** nohup means you can close the SSH window, without killing the process/session


  • No labels