How do I upload a peak usage log to SideFX?

SideFX provides a Python script that will upload your peak usage log file to www.sidefx.com. This script will work with any sesinetd version and does not require you to upgrade sesinetd in order to upload this log. The script will only upload data that has not yet been uploaded to SideFX, to minimize the data transferred.

  1. Make sure you have Python installed with the requests module.

    Python 3.6 and up is preferred, though Python 2.7 will also work. To check if requests is installed, launch a Python shell and enter import requests in it. If it is not installed you can install it on Linux by running sudo pip install requests

  2. Create an API key for sidefx.com.

    Follow the instructions to generate API credentials and have your client id and client secret handy.

  3. Navigate to your sesinetd installation directory.

    The default locations vary by platform:

    • Linux: /usr/lib/sesi/
    • Windows: C:\Windows\keys
    • Mac: /Library/Preferences/sesi/
  4. Enter your client id and client secret into sesinetd.ini.

    Edit sesinetd.ini in the sesinetd installation directory and enter the lines:

    ClientID=your-client-id
    ClientSecret=your-client-secret
    
  5. Download the upload_peak_usage_log.py Python script to the sesinetd installation directory.

    The script is available here.

  6. Run the script to test the upload.

    From the sesinetd installation directory run:

    python3 upload_peak_usage_log.py sesinetd_peak_usage.bin
    

    If the script succeeded you will see no output.

  7. Create an automated task that uploads new log data once per day at an hour of your choosing, at 15 minutes past the hour.

    Sesinetd appends to the log on the hour, so uploading at 15 minutes past the hour will avoid partially-written log entries. For example, on Linux, the following cron entry will perform the upload at 12:15pm.

    15 12 * * * python3 /usr/lib/sesi/upload_peak_usage_log.py /usr/lib/sesi/sesinetd_peak_usage.bin