Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (46 sloc) 2.83 KB

Loading cvs files to master server

Upload status

If you get the new Raspberry Pi SD Cards the patche is already Applyed. The Bootable Linux USB memory stick is still dont have patch loaded.

This script uploads a cvs with 2 Million rows in 60 seconds.

Instructions :

  1. This files will load the CVS files one directory down to the master server. 
  2. The scripts will compress the data and upload it to mater server using username and password.
  3. You need to create a crotab entry as follows. 50 23 * * * /home/hfnoise/hf_noise/uploads/load_all_files.sh

TO DO
Archve loaded files so it dose not get reloaded.

  1. This files will load the CVS files one directory down to the master server.
     
  2. The scripts will compress the data and upload it to mater server using username and password.
  3. You need to create a crotab entry as follows.
  4. IF your country domain is za (Then z = 26 caracter in alphabet and a = 1 (total = 27) then the first digit of the Crontab must be replased with 27
    27 23 * * * /home/hfnoise/hf_noise/uploads/load_all_files.sh
  5. Create web admin page for Remote Station.

Patch for older Raspberry Pi and bootable stick hf_noise monitoring systems.(upload patch)

Run the following commands in the hf_noise directory as user hfnoise.
mkdir uploads
sudo apt-get install php-curl
cd uploads
Run the following Command
wget https://raw.githubusercontent.com/antonjan/hf_noise/master/uploads/compres_csv_file.php
wget https://raw.githubusercontent.com/antonjan/hf_noise/master/uploads/compres_csv_file_arg.php
wget https://raw.githubusercontent.com/antonjan/hf_noise/master/uploads/load_all_files.sh
wget https://raw.githubusercontent.com/antonjan/hf_noise/master/uploads/load_todayes_files.sh
You aslo need to download the admin folder and all its files if you have one of the first 4 hf_nose systems.
Then edit your cridensials username and password in the following files.
You will need to edit the following section in the file that was downloaded compres_csv_file.php and compres_csv_file_arg.php
Chnage the "Your ID" to your call sign and "Pass_Key" to your SMS details
//################Call Sign and Key ######################
//Change your station ID here.
$Call_sign="Your ID";
//Change your Key here
$Pass_Key="12345678901";
//Change your GPS details as well

//##########################################################

Add the following in the crontab. (This will run the daley data 10 to midnight)
50 23 * * * /home/hfnoise/hf_noise/uploads/load_todayes_files.sh

If you want to load all files that was created before then run the following command.

This can take a long time. (Depending on how long your history is this can take ouers.)
/home/hfnoise/hf_noise/uploads/load_all_files.sh