* [meta-realtime][PATCH 0/1] create a script directory and add a script to run test program and collect data
@ 2013-03-19 11:14 Insop Song
2013-03-19 11:14 ` [meta-realtime][PATCH 1/1] " Insop Song
0 siblings, 1 reply; 4+ messages in thread
From: Insop Song @ 2013-03-19 11:14 UTC (permalink / raw)
To: insop.song, bruce.ashfield, dvhart, linux-yocto, yocto
create a script directory and add a script to run test program and
collect data
- test scripts will help to run and collect the data, automate the test and re-producible by others
- run_rt-app.py runs rt-app on the target machine and collects the
output log to host
- how to run:
$ fab -f run_rt-app.py run_app
Note: requires fabric (python program) on the host
--------------
Run example
--------------
$ fab -f run_rt-app.py run_app
[root@192.168.1.78] Executing task 'run_app'
===========================================================
1. Conecting remote : root@192.168.1.78
===========================================================
running script on host [fri2], OS[Linux fri2 3.8.1-yocto-standard #1 SMP PREEMPT Sat Mar 16 03:20:59 PDT 2013 i686 GNU/Linux]
===========================================================
2. Running rt-app 1 times..
===========================================================
[root@192.168.1.78] run: echo "test log (period = 100000, execution time 20000) run 1 times on each 10 sec
" > /home/root/rt-app_run_log-2013-03-19-03-52.txt
[root@192.168.1.78] run: /usr/bin/rt-app -t 100000:20000:d -D 10 >> /home/root/rt-app_run_log-2013-03-19-03-52.txt
[root@192.168.1.78] out: [rt-app] <notice> [0] Using SCHED_DEADLINE policy:
[root@192.168.1.78] out: [rt-app] <notice> [0] starting thread with period: 100000, exec: 20000,deadline: 100000, priority: 10
[root@192.168.1.78] out: [rt-app] <notice> [0] Locking pages in memory
[root@192.168.1.78] out: [rt-app] <notice> [0] Exiting.
[root@192.168.1.78] out:
[localhost] local: /usr/bin/scp root@192.168.1.78:/home/root/rt-app_run_log-2013-03-19-03-52.txt .
rt-app_run_log-2013-03-19-03-52.txt 100% 7552 7.4KB/s 00:00
==============================================================================
3. Run finished, and log file rt-app_run_log-2013-03-19-03-52.txt is copied to host.
==============================================================================
Done.
Disconnecting from root@192.168.1.78... done.
--------------
Log file output
--------------
cat /home/root/rt-app_run_log-2013-03-19-03-52.txt
test log (period = 100000, execution time 20000) run 1 times on each 10 sec
#idx period min_et max_et rel_st start end deadline dur. slack Budget Used Budget
0 100000 20000 20000 33061 1859244267 1859264275 1859344264 20008 79989
0 100000 20000 20000 133176 1859344382 1859364389 1859444264 20007 79876
0 100000 20000 20000 233177 1859444383 1859464391 1859544264 20009 79873
0 100000 20000 20000 333174 1859544380 1859564389 1859644264 20009 79875
0 100000 20000 20000 433186 1859644392 1859664402 1859744264 20010 79862
...
0 100000 20000 20000 9533182 1868744388 1868764398 1868844264 20009 79867
0 100000 20000 20000 9633185 1868844391 1868864400 1868944264 20010 79864
0 100000 20000 20000 9733182 1868944388 1868964398 1869044264 20010 79867
0 100000 20000 20000 9833141 1869044347 1869064356 1869144264 20009 79908
0 100000 20000 20000 9933162 1869144368 1869164375 1869244264 20007 79889
$
Insop Song (1):
create a script directory and add a script to run test program and
collect data
docs/00-INDEX | 4 +--
docs/00-README | 6 ++--
scripts/README | 1 +
scripts/run_rt-app.py | 88 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 94 insertions(+), 5 deletions(-)
create mode 100644 scripts/README
create mode 100644 scripts/run_rt-app.py
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread* [meta-realtime][PATCH 1/1] create a script directory and add a script to run test program and collect data 2013-03-19 11:14 [meta-realtime][PATCH 0/1] create a script directory and add a script to run test program and collect data Insop Song @ 2013-03-19 11:14 ` Insop Song 2013-03-19 18:41 ` [linux-yocto] " Bruce Ashfield 0 siblings, 1 reply; 4+ messages in thread From: Insop Song @ 2013-03-19 11:14 UTC (permalink / raw) To: insop.song, bruce.ashfield, dvhart, linux-yocto, yocto - run_rt-app.py runs rt-app on the target machine and collects the output log to host - how to run: $ fab -f run_rt-app.py run_app Note: requires fabric (python program) on the host Signed-off-by: Insop Song <insop.song@gmail.com> --- docs/00-INDEX | 4 +-- docs/00-README | 6 ++-- scripts/README | 1 + scripts/run_rt-app.py | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 scripts/README create mode 100644 scripts/run_rt-app.py diff --git a/docs/00-INDEX b/docs/00-INDEX index 41d83a5..878e5d0 100644 --- a/docs/00-INDEX +++ b/docs/00-INDEX @@ -1,4 +1,4 @@ -This is a brief list of all the files in meta-virtualization/docs and what +This is a brief list of all the files in meta-realtime/docs and what they contain. If you add a documentation file, please list it here in alphabetical order as well. @@ -6,5 +6,5 @@ alphabetical order as well. - this file. 00-README - - info on the goals of meta-virtualization and this docs subdir + - info on the goals of meta-realtime and this docs subdir diff --git a/docs/00-README b/docs/00-README index 6fea112..f20baca 100644 --- a/docs/00-README +++ b/docs/00-README @@ -1,6 +1,6 @@ -meta-virtualization: docs +meta-realtime: docs ========================= -The docs subdirectory is a holding tank for meta-virtualization related +The docs subdirectory is a holding tank for meta-realtime related READMEs, documentation, testing information, configuration and other -notes that help the users of meta-virt. +notes that help the users of meta-realtime. diff --git a/scripts/README b/scripts/README new file mode 100644 index 0000000..48034e6 --- /dev/null +++ b/scripts/README @@ -0,0 +1 @@ +This directory contains Various useful scripts for working with meta-realtime diff --git a/scripts/run_rt-app.py b/scripts/run_rt-app.py new file mode 100644 index 0000000..3beb20c --- /dev/null +++ b/scripts/run_rt-app.py @@ -0,0 +1,88 @@ +# +# run rt-app on remote machine and collect the data +# +# note: +# +# 0. install fabric 1.6 on the develop host +# - $ pip install fabric +# +# 1. copy ssh public key (copy and paste host's "~/.ssh/id_rsa.pub" to the remote's ~/.ssh/authorized_keys) +# +# 2. update the "env.hosts" with your remote system +# +# 3. run the script from the host +# - $ fab -f run_rt-app.py run_app +# + +from __future__ import with_statement +from fabric.api import * +from fabric.contrib import * +from fabric.contrib.console import confirm + +import socket +import getpass +import datetime +import time +import datetime + + +env.hosts = ['root@192.168.1.78'] +remote_ip = env.hosts[0] + +now = datetime.datetime.now() + +YES = "/usr/bin/yes" +KILLALL = "/usr/bin/killall" +SCP = "/usr/bin/scp" + +RTAPP = "/usr/bin/rt-app" + +period_t = 100000 +run_t = 30000 + +num_run = 10 +sec_run = 100 + +dir_name = "/home/root" +f_name = "rt-app_run_log-%s.txt" % now.strftime("%Y-%m-%d-%H-%M") +file_name = "%s/%s" % (dir_name, f_name) + +def pre(): + print "\n===========================================================" + print "1. Conecting remote : %s" % env.hosts[0] + print "===========================================================\n" + + # scripts that runs on the remote + un = run("uname -a", quiet=True) + hn = run("hostname", quiet=True) + print "running script on host [%s], OS[%s]" % (hn, un) + +# +# run the app on the remote and collect the data into log +# +def main(): + print "\n===========================================================" + print "2. Running rt-app %s times.." % num_run + print "===========================================================\n" + + run('echo \"test log (period = %s, execution time %s) run %s times on each %s sec \n\n\" > %s' % \ + (period_t, run_t, num_run, sec_run, file_name)) + for i in range(0, num_run): + run("%s -t %s:%s:d -D %s >> %s" % \ + (RTAPP, period_t, run_t, sec_run, file_name)) + +# +# bring the data log to the host +# +def post(): + # running this from local host + local("%s %s:%s ." % (SCP, remote_ip, file_name)) + + print "\n==============================================================================" + print "3. Run finished, and log file ""%s"" is copied to host." % f_name + print "==============================================================================\n" + +def run_app(): + pre() + main() + post() -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [linux-yocto] [meta-realtime][PATCH 1/1] create a script directory and add a script to run test program and collect data 2013-03-19 11:14 ` [meta-realtime][PATCH 1/1] " Insop Song @ 2013-03-19 18:41 ` Bruce Ashfield 2013-03-19 20:16 ` Insop Song 0 siblings, 1 reply; 4+ messages in thread From: Bruce Ashfield @ 2013-03-19 18:41 UTC (permalink / raw) To: Development list for the linux-yocto*.git Linux kernel repositories Cc: yocto, dvhart On 13-03-19 07:14 AM, Insop Song wrote: > - run_rt-app.py runs rt-app on the target machine and collects the > output log to host > > - how to run: > $ fab -f run_rt-app.py run_app > > Note: requires fabric (python program) on the host > > Signed-off-by: Insop Song <insop.song@gmail.com> > --- > docs/00-INDEX | 4 +-- > docs/00-README | 6 ++-- > scripts/README | 1 + > scripts/run_rt-app.py | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 94 insertions(+), 5 deletions(-) > create mode 100644 scripts/README > create mode 100644 scripts/run_rt-app.py > > diff --git a/docs/00-INDEX b/docs/00-INDEX > index 41d83a5..878e5d0 100644 > --- a/docs/00-INDEX > +++ b/docs/00-INDEX > @@ -1,4 +1,4 @@ > -This is a brief list of all the files in meta-virtualization/docs and what > +This is a brief list of all the files in meta-realtime/docs and what > they contain. If you add a documentation file, please list it here in > alphabetical order as well. > > @@ -6,5 +6,5 @@ alphabetical order as well. > - this file. > > 00-README > - - info on the goals of meta-virtualization and this docs subdir > + - info on the goals of meta-realtime and this docs subdir Something strange is happening here, I had cherry picked my meta-virt README structure over to meta-realtime, and fixed the references .. but the changes didn't get pushed out. I've done that now. So I'll drop these chunks of the patch. Thanks for catching this. The rest looks good, and I've merged the changes. Bruce > > diff --git a/docs/00-README b/docs/00-README > index 6fea112..f20baca 100644 > --- a/docs/00-README > +++ b/docs/00-README > @@ -1,6 +1,6 @@ > -meta-virtualization: docs > +meta-realtime: docs > ========================= > > -The docs subdirectory is a holding tank for meta-virtualization related > +The docs subdirectory is a holding tank for meta-realtime related > READMEs, documentation, testing information, configuration and other > -notes that help the users of meta-virt. > +notes that help the users of meta-realtime. > diff --git a/scripts/README b/scripts/README > new file mode 100644 > index 0000000..48034e6 > --- /dev/null > +++ b/scripts/README > @@ -0,0 +1 @@ > +This directory contains Various useful scripts for working with meta-realtime > diff --git a/scripts/run_rt-app.py b/scripts/run_rt-app.py > new file mode 100644 > index 0000000..3beb20c > --- /dev/null > +++ b/scripts/run_rt-app.py > @@ -0,0 +1,88 @@ > +# > +# run rt-app on remote machine and collect the data > +# > +# note: > +# > +# 0. install fabric 1.6 on the develop host > +# - $ pip install fabric > +# > +# 1. copy ssh public key (copy and paste host's "~/.ssh/id_rsa.pub" to the remote's ~/.ssh/authorized_keys) > +# > +# 2. update the "env.hosts" with your remote system > +# > +# 3. run the script from the host > +# - $ fab -f run_rt-app.py run_app > +# > + > +from __future__ import with_statement > +from fabric.api import * > +from fabric.contrib import * > +from fabric.contrib.console import confirm > + > +import socket > +import getpass > +import datetime > +import time > +import datetime > + > + > +env.hosts = ['root@192.168.1.78'] > +remote_ip = env.hosts[0] > + > +now = datetime.datetime.now() > + > +YES = "/usr/bin/yes" > +KILLALL = "/usr/bin/killall" > +SCP = "/usr/bin/scp" > + > +RTAPP = "/usr/bin/rt-app" > + > +period_t = 100000 > +run_t = 30000 > + > +num_run = 10 > +sec_run = 100 > + > +dir_name = "/home/root" > +f_name = "rt-app_run_log-%s.txt" % now.strftime("%Y-%m-%d-%H-%M") > +file_name = "%s/%s" % (dir_name, f_name) > + > +def pre(): > + print "\n===========================================================" > + print "1. Conecting remote : %s" % env.hosts[0] > + print "===========================================================\n" > + > + # scripts that runs on the remote > + un = run("uname -a", quiet=True) > + hn = run("hostname", quiet=True) > + print "running script on host [%s], OS[%s]" % (hn, un) > + > +# > +# run the app on the remote and collect the data into log > +# > +def main(): > + print "\n===========================================================" > + print "2. Running rt-app %s times.." % num_run > + print "===========================================================\n" > + > + run('echo \"test log (period = %s, execution time %s) run %s times on each %s sec \n\n\" > %s' % \ > + (period_t, run_t, num_run, sec_run, file_name)) > + for i in range(0, num_run): > + run("%s -t %s:%s:d -D %s >> %s" % \ > + (RTAPP, period_t, run_t, sec_run, file_name)) > + > +# > +# bring the data log to the host > +# > +def post(): > + # running this from local host > + local("%s %s:%s ." % (SCP, remote_ip, file_name)) > + > + print "\n==============================================================================" > + print "3. Run finished, and log file ""%s"" is copied to host." % f_name > + print "==============================================================================\n" > + > +def run_app(): > + pre() > + main() > + post() > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-yocto] [meta-realtime][PATCH 1/1] create a script directory and add a script to run test program and collect data 2013-03-19 18:41 ` [linux-yocto] " Bruce Ashfield @ 2013-03-19 20:16 ` Insop Song 0 siblings, 0 replies; 4+ messages in thread From: Insop Song @ 2013-03-19 20:16 UTC (permalink / raw) To: Bruce Ashfield Cc: yocto, dvhart, Development list for the linux-yocto*.git Linux kernel repositories Thank you Bruce, More documentations and scripts for testing and analysis the data will follow. Regards, Insop On Tue, Mar 19, 2013 at 11:41 AM, Bruce Ashfield <bruce.ashfield@windriver.com> wrote: > On 13-03-19 07:14 AM, Insop Song wrote: >> >> - run_rt-app.py runs rt-app on the target machine and collects the >> output log to host >> >> - how to run: >> $ fab -f run_rt-app.py run_app >> >> Note: requires fabric (python program) on the host >> >> Signed-off-by: Insop Song <insop.song@gmail.com> >> --- >> docs/00-INDEX | 4 +-- >> docs/00-README | 6 ++-- >> scripts/README | 1 + >> scripts/run_rt-app.py | 88 >> +++++++++++++++++++++++++++++++++++++++++++++++++ >> 4 files changed, 94 insertions(+), 5 deletions(-) >> create mode 100644 scripts/README >> create mode 100644 scripts/run_rt-app.py >> >> diff --git a/docs/00-INDEX b/docs/00-INDEX >> index 41d83a5..878e5d0 100644 >> --- a/docs/00-INDEX >> +++ b/docs/00-INDEX >> @@ -1,4 +1,4 @@ >> -This is a brief list of all the files in meta-virtualization/docs and >> what >> +This is a brief list of all the files in meta-realtime/docs and what >> they contain. If you add a documentation file, please list it here in >> alphabetical order as well. >> >> @@ -6,5 +6,5 @@ alphabetical order as well. >> - this file. >> >> 00-README >> - - info on the goals of meta-virtualization and this docs subdir >> + - info on the goals of meta-realtime and this docs subdir > > > Something strange is happening here, I had cherry picked my meta-virt > README structure over to meta-realtime, and fixed the references .. but > the changes didn't get pushed out. I've done that now. So I'll drop > these chunks of the patch. > > Thanks for catching this. > > The rest looks good, and I've merged the changes. > > Bruce > > >> >> diff --git a/docs/00-README b/docs/00-README >> index 6fea112..f20baca 100644 >> --- a/docs/00-README >> +++ b/docs/00-README >> @@ -1,6 +1,6 @@ >> -meta-virtualization: docs >> +meta-realtime: docs >> ========================= >> >> -The docs subdirectory is a holding tank for meta-virtualization related >> +The docs subdirectory is a holding tank for meta-realtime related >> READMEs, documentation, testing information, configuration and other >> -notes that help the users of meta-virt. >> +notes that help the users of meta-realtime. >> diff --git a/scripts/README b/scripts/README >> new file mode 100644 >> index 0000000..48034e6 >> --- /dev/null >> +++ b/scripts/README >> @@ -0,0 +1 @@ >> +This directory contains Various useful scripts for working with >> meta-realtime >> diff --git a/scripts/run_rt-app.py b/scripts/run_rt-app.py >> new file mode 100644 >> index 0000000..3beb20c >> --- /dev/null >> +++ b/scripts/run_rt-app.py >> @@ -0,0 +1,88 @@ >> +# >> +# run rt-app on remote machine and collect the data >> +# >> +# note: >> +# >> +# 0. install fabric 1.6 on the develop host >> +# - $ pip install fabric >> +# >> +# 1. copy ssh public key (copy and paste host's "~/.ssh/id_rsa.pub" to >> the remote's ~/.ssh/authorized_keys) >> +# >> +# 2. update the "env.hosts" with your remote system >> +# >> +# 3. run the script from the host >> +# - $ fab -f run_rt-app.py run_app >> +# >> + >> +from __future__ import with_statement >> +from fabric.api import * >> +from fabric.contrib import * >> +from fabric.contrib.console import confirm >> + >> +import socket >> +import getpass >> +import datetime >> +import time >> +import datetime >> + >> + >> +env.hosts = ['root@192.168.1.78'] >> +remote_ip = env.hosts[0] >> + >> +now = datetime.datetime.now() >> + >> +YES = "/usr/bin/yes" >> +KILLALL = "/usr/bin/killall" >> +SCP = "/usr/bin/scp" >> + >> +RTAPP = "/usr/bin/rt-app" >> + >> +period_t = 100000 >> +run_t = 30000 >> + >> +num_run = 10 >> +sec_run = 100 >> + >> +dir_name = "/home/root" >> +f_name = "rt-app_run_log-%s.txt" % now.strftime("%Y-%m-%d-%H-%M") >> +file_name = "%s/%s" % (dir_name, f_name) >> + >> +def pre(): >> + print >> "\n===========================================================" >> + print "1. Conecting remote : %s" % env.hosts[0] >> + print >> "===========================================================\n" >> + >> + # scripts that runs on the remote >> + un = run("uname -a", quiet=True) >> + hn = run("hostname", quiet=True) >> + print "running script on host [%s], OS[%s]" % (hn, un) >> + >> +# >> +# run the app on the remote and collect the data into log >> +# >> +def main(): >> + print >> "\n===========================================================" >> + print "2. Running rt-app %s times.." % num_run >> + print >> "===========================================================\n" >> + >> + run('echo \"test log (period = %s, execution time %s) run %s times >> on each %s sec \n\n\" > %s' % \ >> + (period_t, run_t, num_run, sec_run, file_name)) >> + for i in range(0, num_run): >> + run("%s -t %s:%s:d -D %s >> %s" % \ >> + (RTAPP, period_t, run_t, sec_run, file_name)) >> + >> +# >> +# bring the data log to the host >> +# >> +def post(): >> + # running this from local host >> + local("%s %s:%s ." % (SCP, remote_ip, file_name)) >> + >> + print >> "\n==============================================================================" >> + print "3. Run finished, and log file ""%s"" is copied to host." % >> f_name >> + print >> "==============================================================================\n" >> + >> +def run_app(): >> + pre() >> + main() >> + post() >> > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-19 20:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-19 11:14 [meta-realtime][PATCH 0/1] create a script directory and add a script to run test program and collect data Insop Song 2013-03-19 11:14 ` [meta-realtime][PATCH 1/1] " Insop Song 2013-03-19 18:41 ` [linux-yocto] " Bruce Ashfield 2013-03-19 20:16 ` Insop Song
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.