Skip to content
 
 

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmfRcShm

An extension to OmfRc provides support for structure health monitoring project

Installation

Install it as:

$ gem install omf_rc_shm

Setup startup script

$ install_omf_rc -c -i

Configure OmfRc to load SHM extension, simply modify '/etc/omf_rc/config.yml' to something like this:

---
:uri: xmpp://<%= "#{Socket.gethostname}-#{Process.pid}" %>:<%= "#{Socket.gethostname}-#{Process.pid}" %>@srv.mytestbed.net
:environment: production

:resources:
- :type: shm_node
  :uid: <%= Socket.gethostname %>
  :app_definition_file: <path_to_app_definition_file>
:add_default_factories: false
:factories:
- :require: omf_rc_shm

Define applications

app_definition_file for shm_node simply defines the applications it runs.

Example:

App.define(
  "otr2", {
    schedule: "* * * * *",
    timeout: 20,
    binary_path: "/usr/bin/otr2",
    use_oml: true,
    parameters: {
      udp_local_host: { cmd: "--udp:local_host", value: "0.0.0.0" }
    },
    oml: {
      experiment: "otr2_#{Time.now.to_i}",
      id: "otr2",
      available_mps: [
        {
          mp: "udp_in",
          fields: [
            { field: "flow_id", type: :long },
            { field: "seq_no", type: :long },
            { field: "pkt_length", type: :long },
            { field: "dst_host", type: :string },
            { field: "dst_port", type: :long }
          ]
        }
      ],
      collection: [
        {
          url: "tcp://0.0.0.0:3003",
          streams: [
            {
              mp: "udp_in",
              interval: 3
            }
          ]
        }
      ]
    }
  }
)

Usage

OmfRc with SHM extension should start up automatically during boot.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors