<div dir="ltr"><div><div><div>Hi,<br><br></div>I have a perl script named "<a href="http://my_eth-traffic.pl">my_eth-traffic.pl</a>" which calculates the tx and rx speed of the Ethernet interface in Mb.<br><br></div>I want to run this script from another script and want the output in other file.<br></div>So i wrote the following script but not getting the output.   <div><div><br>#!/usr/bin/python<br><br>import sys<br>import subprocess<br>import datetime<br>import os<br>import time<br><br>comand8 = "/root/Desktop/<a href="http://my_eth-traffic.pl">my_eth-traffic.pl</a> eth0 M"<br><br>filename = logfilename+packetsize+'-'+formated_string+'.txt'<br>    logfile = open("/root/Desktop/speed.txt", 'w')<br>    <br>    proc=subprocess.Popen(comand8,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)<br>    for line in proc.stdout:<br>                   logfile.write(line)<br></div></div></div>