LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  cron and shell script

    Employee
    Posted 01-07-2014 04:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dialpemo

    Hi I have been working with Lavastorm for a few weeks now, I have been trying to run one of the graphs using cron but I am not sure what do I need to include in the shell script in order for the graph to actually run at specific times.

    Thank you


  • 2.  RE: cron and shell script

    Employee
    Posted 01-07-2014 07:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    When the cron daemon runs the shell script, it runs as the user but doesn't run any of the login shell scripts that set up the environment. So the first thing your shell script needs to run, actually "source", the login shell scripts that set up the LAE environment.

    You have to "source" the login shell scripts because, normally when you execute a Unix/Linux command it starts a separate process, executes the command and then exits that process. This way every environment variable or whatever created by that command goes away when that process exits and doesn't stay around to cause havoc with the next thing you do. So to make a shell script execute without losing all the environment variables you use the command "source" in front of the name of the shell script. The "source" statement is often shortened to just a period "." which means the same thing.

    When you log into a Unix environment using PuTTY there are shell scripts that are "source"ed automatically for you. One in particular can be found in the login directory named .bash_profile. That file probably contains the commands to "source" the .profile.lavastorm shell script that is in the LAE install directory.

    At minimum, the first thing the shell script should do is source either that .bash_profile or the .profile.lavastorm and it might look like this:
    LAE_HOME=/opt/lavastorm/lae/4.6.1/
    source $LAE_HOME/.profile.lavastorm

    As far as how to make the graph run at particular times, you do that information in the crontab file. I often refer to the Wikipedia article on configuring the crontab here, http://en.wikipedia.org/wiki/Crontab and even cut and paste the following table into the crontab itself for future reference. Every line begins with a "#" character which makes it a comment.

    # * * * * * command to execute
    # ┬ ┬ ┬ ┬ ┬
    # │ │ │ │ │
    # │ │ │ │ │
    # │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
    # │ │ │ └────────── month (1 - 12)
    # │ │ └─────────────── day of month (1 - 31)
    # │ └──────────────────── hour (0 - 23)
    # └───────────────────────── min (0 - 59)


  • 3.  RE: cron and shell script

    Employee
    Posted 01-08-2014 08:52

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dialpemo

    Thank you ejones, would I then add just the location of the brx to the shell script ??


  • 4.  RE: cron and shell script

    Employee
    Posted 01-08-2014 10:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: DanRosenblatt

    There's a little more to it than that, since you'll need to invoke the laeController and pass it some information.

    The line in your shell script to get the brx to run will look something like this:

    $LAE_HOME/bin/laeController -u YourUsername -p YourPassword -r NameOfYourRun /PathToYourGraph/Graph.brx

    For a more complete explanation, please see the attached document covering automated graph runs.

    How to Automate LAE Graph Execution.zip


  • 5.  RE: cron and shell script

    Employee
    Posted 01-09-2014 02:10

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dialpemo

    Thank you Dan, I will have a go at it and let you know if I have more questions on this topic.


  • 6.  RE: cron and shell script

    Employee
    Posted 01-14-2014 08:50

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dialpemo

    Thank you Dan it worked


  • 7.  RE: cron and shell script

    Employee
    Posted 01-14-2014 09:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: DanRosenblatt

    You're welcome! Stay tuned for improvements in the graph automation process-- a new interface which will allow users to schedule the automated execution of graphs is planned to be included in the release of the Lavastorm Analytics Engine 5.0 later this quarter.


  • 8.  RE: cron and shell script

    Employee
    Posted 03-18-2014 06:05

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: spalluru

    Originally posted by: DanRosenblatt
    					

    You're welcome! Stay tuned for improvements in the graph automation process-- a new interface which will allow users to schedule the automated execution of graphs is planned to be included in the release of the Lavastorm Analytics Engine 5.0 later this quarter.
    Hi ,
    May I know when are you planning to release version 5 ? any official announcements or release notes on the same ?
    -Sreekanth


  • 9.  RE: cron and shell script

    Employee
    Posted 03-18-2014 06:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: DanRosenblatt

    Hi Sreekanth-- we don't have any official announcements yet, but the target release date for LAE 5.0 is still around the end of this quarter.