...
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:
- 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
...
- /msr-automation/cacti-utilisation
- 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
- Run the maven project (cacti utilisation) from Eclipse/IntelliJ. This will generate the script files and will save them in ""fix-scripts" folder.
- Copy the produced files (C:\Users\Omar\projects\fix-scripts) to
...
- your home directory on "prod-cacti01-fra-de.geant.net"
...
- . You can use WinSCP client
...
- from Windows machine.
- Log into prod-cacti01-fra-de.geant.net as yourself
- Copy the scripts from your home directory to "/home/cactiuser/scripts" on "prod-cacti01-fra-de.geant.net"
...
- . 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.
...