Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Also, You will need to create a folder named "fix-scripts" somewhere on your local machine. In my case I have had it under "C:\Users\Omar\projects\fix-scripts". This is the folder where all scripts will be loaded to.Log into prod-cacti01-fra-de

Steps to follow:


  1. Open Eclipse/IntelliJ and browse to "msr-cacti-utilisation" - As mentioned above, this is in Git https://gitlab.geant.net

...

change directory to /home/cactiuser/scripts

...

  1. /msr-automation/cacti-utilisation 
  2. Make sure to change the month and year in the "Main" class "cacti-utilisation\src\main\java\org\geant\msr\utilisation\Main.java" Lines 36 and 37
  3. Run the maven project (cacti utilisation) from Eclipse/IntelliJ. This will generate the script files and will save them in ""fix-scripts" folder.
  4. Copy the produced files (C:\Users\Omar\projects\fix-scripts) to

...

  1. your home directory on "prod-cacti01-fra-de.geant.net"

...

  1. . You can use WinSCP client

...

  1. from Windows machine.
  2. Log into prod-cacti01-fra-de.geant.net as yourself 
  3. Copy the scripts from your home directory to "/home/cactiuser/scripts" on "prod-cacti01-fra-de.geant.net"

...

  1. . To copy multiple files:  sudo cp fix_* /home/cactiuser/scripts/  

change directory to /home/cactiuser/scripts

** Are you able to sudo as cactiuser?  "sudo su cactiuser"

You will need to convert files from Dos to Unix - https://stackoverflow.com/questions/9374991/how-to-convert-files-from-dos-to-unix

  • Run "sudo dos2unix ./fix*" inside  "/home/cactiuser/scripts"
  • THEN Then, run "sudo ./fix_monthly_utilisation.sh -y 2017 -m 7"  ** Pay attention to the year and the month value in the command.

...