[orbit-user] Help with saving a shell command output in database

Shweta Sagari shsagari at eden.rutgers.edu
Tue Aug 25 11:49:43 EDT 2009


Hi,
Thanks Thierry for the help. The suggested solution should really help us a
lot. We will try to work with that.

Regards,
Shweta

On Tue, Aug 25, 2009 at 9:56 AM, Thierry Rakotoarivelo <
thierry.rakotoarivelo at nicta.com.au> wrote:

> Hi Shweta,
>
> To get the parts of the output of 'iwlist' into the measurement database,
> you will indeed have to write an small application in C to wrap around this
> command, capture/parse its output and send the result to the measurement
> collection.
>
> This is not a difficult task to do at all, in fact we do it already for
> some fields in the output of the 'wlanconfig' command. You can just
> cut-and-past this code and do the minor modification to support iwlist.
>
> You can view that code at:
>
>
> http://mytestbed.net/repositories/changes/oml/trunk/app/src/c/wlanconfig_oml.c
>
> Remember that you will have to compile your new application against the oml
> library. This should be easy if you check out the oml source tree:
> http://mytestbed.net/repositories/changes/oml/trunk/
>
> Also, you will have to call 'iwlist' through a prototype in your
> experiment, and not as a shell command as shown in the
> 'how-to-run-a-shell-command' tutorial. Again this is easy to do, have a look
> at the example here:
>
> Prototype definition:
>
> http://mytestbed.net/repositories/entry/omf/branches/release-1.3/nodeHandler/src/repository/test/proto/probelink.rb
>
> Application definition:
>
> http://mytestbed.net/repositories/entry/omf/branches/release-1.3/nodeHandler/src/repository/test/app/wlanconfig_oml2.rb
>
> Finally, you can find an example on its utilization here:
> http://mytestbed.net/wiki/omf/CaseStudy1
> (note the experiment script 'connectivity-monitor.rb' )
>
> Regards,
> Thierry.
>
> Shweta Sagari wrote:
>
>> Hi,
>>
>> I am trying to run experiment to run a shell command on the nodes which is
>> described on
>> http://mytestbed.net/wiki/omf/How_to_run_a_shell_command_on_the_node(s) <
>> http://mytestbed.net/wiki/omf/How_to_run_a_shell_command_on_the_node%28s%29>.
>> After execution of experiment, output is displayed on command window or it
>> can be saved in separate text file.
>>
>> But I was wondering how to create a table in database directly which
>> collects all measurement points rather than saving output in text file? Do I
>> need to write whole application for this? I am particularly interested to
>> save output of 'iwlist scan' in table in database.
>>
>> I am fairly new to omf/oml so would really appreciate any help with this.
>>
>> Regards,
>> Shweta
>>
>>
>> Shweta Sagari
>> Graduate Student
>> Electrical and Computer Engineering Dept.
>> Rutgers University
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://orbit-lab.org/pipermail/orbit-user/attachments/20090825/8790385d/attachment.htm>


More information about the orbit-user mailing list