public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp-list <ltp-list@lists.sourceforge.net>
Cc: Vasily Isaenko <vasily.isaenko@oracle.com>
Subject: [LTP] network tests: help script to run commands on remote host
Date: Wed, 26 Feb 2014 14:00:13 +0400	[thread overview]
Message-ID: <530DBB2D.1090406@oracle.com> (raw)

Hi!
There are some network tests which need to run various commands on the 
remote host. So is it a good idea to add a help script which does that 
according to chosen network protocol: rsh or ssh?

If yes, we can have a script like tst_rhost_run (or tst_run_rcmd...) in 
the ltp/tools, or somewhere else.

I did something similar in the submitted tcp_fastopen test, so the 
script could be as follows:

if [ "$use_ssh" -eq 1 ]; then
	ssh -n -f $user_name@$RHOST "sh -c 'nohup $rcmd &'" > /dev/null 2>&1
else
	rsh -n -l $user_name $RHOST "sh -c 'nohup $rcmd &'" > /dev/null 2>&1
fi

if [ $? -ne 0 ]; then
	tst_brkm TBROK NULL "No route to host $RHOST"
	exit 2
fi

Any suggestions, ideas?

Best regards,
Alexey


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2014-02-26  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 10:00 Alexey Kodanev [this message]
2014-03-19 18:21 ` [LTP] network tests: help script to run commands on remote host chrubis
     [not found]   ` <533004A9.2080509@oracle.com>
2014-03-24 14:13     ` chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=530DBB2D.1090406@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vasily.isaenko@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox