iperf version update in DCE

284 views
Skip to first unread message

Ahmad

unread,
Dec 28, 2015, 7:45:25 AM12/28/15
to ns-3-users, taz...@wide.ad.jp
Hi,
I am using Direct Code Execution with MPTCP version 0.89, dce/sim-ns3-3.14.0-branch. In this release, the iperf version is 2.0.5. I want to upgrade it to iperf version 3 to get some additional functionality. Kindly tell me, how can I upgrade it to iperf 3.

Regards,
Ahmad.

Richard

unread,
Jan 4, 2016, 10:07:40 AM1/4/16
to ns-3-users, taz...@wide.ad.jp
Getting iperf3 working with DCE isn't straightforward, I needed to patch both iperf and ns-3.

You can try checking out the dce branch from github.com/RichardWithnell/iperf

If you have any trouble, I can hopefully point you to the correct patches for ns-3-dce, my fork should work but it will be outdated now.

Best,

Richard

Basharat Ahmad

unread,
Jan 4, 2016, 2:07:12 PM1/4/16
to ns-3-...@googlegroups.com, rick.w...@gmail.com
Thank you so much Sir. I will try this and will let you know about the status.

Regards,
Ahmad

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Wqe5dRWL6tM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
"Children are remarkably honest creatures until we teach them not to be"

Regards,
Basharat Ahmad

Matt Anonyme

unread,
Jan 5, 2016, 7:56:01 AM1/5/16
to ns-3-users, rick.w...@gmail.com
Thanks for sharing the code. Do you plan to upstream it either Ahmad or richard ? iperf3 support in DCE was requested several times and I believe Hajime would  agree to it :)

Jianwei Liu

unread,
Jan 6, 2016, 5:13:31 PM1/6/16
to ns-3-users, rick.w...@gmail.com
Hi Ahmad, 

  Have you got any luck in making iperf3 work with DCE? I tried several versions of iperf3. I think one problem I had is the "clock" system call is not implemented in the current DCE. (there is a dce-clock.h, but the function in it is not implemented). I am not sure whether anyone else met the same problem, and how that is solved? I tried to implement it using clock_gettime, but resulted in iperf stuck in a loop. Not sure why, and how to debug that.

Best,
Jianwei

Richard Withnell

unread,
Jan 6, 2016, 6:00:42 PM1/6/16
to Jianwei Liu, ns-3-users
As far as I can tell the clock function is only useful if you want to check cpu utilization, so I stripped it from the DCE branch. 

I have no plans to upstream at present but I may do so in the future, time permitting. 

Matt Anonyme

unread,
Jan 8, 2016, 7:09:56 AM1/8/16
to ns-3-users, ljw...@gmail.com
Would you mind if I were to upstream it (crediting you ofc) ? I don't know when but I need to compare iperf2 and iperf3 so I might get the chance to do so.

Richard

unread,
Jan 10, 2016, 8:58:26 AM1/10/16
to ns-3-users, ljw...@gmail.com
It would be great if you could, Matt.

Jayway Liu

unread,
Apr 9, 2017, 9:59:23 PM4/9/17
to ns-3-users, ljw...@gmail.com
Hi Richard, 

   I tried your version, it complied with no problem. But, when running it, it shows this error "iperf3: error - unable to create a new stream: No such file or directory" at the server side.  Any idea on how to solve it? Is it related to NS3 dce do not have a /tmp directory? (a related link https://github.com/esnet/iperf/issues/374

Thanks,
Jianwei

Matt Anonyme

unread,
Apr 17, 2017, 1:56:01 PM4/17/17
to ns-3-users, ljw...@gmail.com
Hi,

you can check out for a working example of iperf3 https://github.com/direct-code-execution/ns-3-dce/pull/43

Jayway Liu

unread,
Apr 17, 2017, 5:36:43 PM4/17/17
to ns-3-users, ljw...@gmail.com
Thanks Matt! I tried the example "dce-iperf.cc" in that link. It is still the same mktemp error.  I tried with both Richard's iperf version and this one. 
Did you mean I need to checkout the latest dce from the git repository? 

Also, I tried to install a "Folder Creator App" before installing the iperf DceApplicationHelper. 
I also tried replacing the DceApplicationHelper with this new ApplicationHelper.  But still the same error. 

####################################

#include "folder-create-helper.h"
#include "dce-application.h"
#include "ns3/log.h"
#include "utils.h"
//#include <fstream>
#include <stdlib.h>
#include <unistd.h>

NS_LOG_COMPONENT_DEFINE ("FolderCreateHelper");

namespace ns3 {

FolderCreateHelper::FolderCreateHelper ()
{
}

FolderCreateHelper::~FolderCreateHelper ()
{
    /*
  std::stringstream oss;
  oss << "rm -rf /tmp/iperf3*";
  ::system (oss.str ().c_str ());
  */
}
  
ApplicationContainer
FolderCreateHelper::Install (NodeContainer c)
{
  NS_LOG_FUNCTION (this);
  ApplicationContainer apps;
  for (NodeContainer::Iterator j = c.Begin (); j != c.End (); ++j)
    {
      int nodeId = (*j)->GetId ();
      std::stringstream oss;

      oss << "/tmp";
      UtilsEnsureDirectoryExists (oss.str ());


    }
  return DceApplicationHelper::Install (c);
}

ApplicationContainer 
FolderCreateHelper::InstallInNode (Ptr<Node> node)
{
  NS_LOG_FUNCTION (this);
  ApplicationContainer apps;
      int nodeId = node->GetId ();
      std::stringstream oss;

      oss << "/tmp";
      UtilsEnsureDirectoryExists (oss.str ());

  return DceApplicationHelper::InstallInNode (node);
}
}
###################################################



But, it failed with another error.  The server side is OK now, but the client side has the same problem:

jianwel@jianwei-u14:~/projects/ns3/current/source/ns-3-dce$ cat files-6/var/log/8606/*
iperf3 -c 7.0.0.8 -J -i 5 --time 5 
Start Time: NS3 Time:          5s (          +5000000000.0ns) , REAL Time: 1492464048
      Time: NS3 Time:          5s (          +5000000000.0ns) , REAL Time: 1492464048 --> Starting: /home/jianwel/projects/ns3/new-bake-with-more-module/build/bin/iperf3
      Time: NS3 Time:          5s (          +5130128689.0ns) , REAL Time: 1492464050 --> Exit (1)
{
"start": {
"connected": [],
"version": "iperf 3.1",
"system_info": "NODE_6's OS NODE_6 3 12 6",
"timestamp": {
"time": "Fri, 01 Jan 2010 00:00:05 GMT",
"timesecs": 1262304005
},
"connecting_to": {
"host": "7.0.0.8",
"port": 5201
},
"cookie": "NODE_6.1262304005.000000.1ad5cb71083",
"tcp_mss_default": 524
},
"intervals": [],
"end": {
},
"error": "error - unable to create a new stream: No such file or directory"
}




BTW, is the change in the utils/iperf3_1.patch? where can I find that file?

Jayway Liu

unread,
Apr 17, 2017, 6:06:29 PM4/17/17
to ns-3-users, ljw...@gmail.com
I have tried another change. 
changing the folder creation code to
  UtilsEnsureDirectoryExists (UtilsGetAbsRealFilePath (nodeId, "/tmp"));

Now I can see the tmp in files-*
and the iperf3 files under them, 

client iperf3.ooWHll
server iperf3.QuXWUq

but the server side still complains about the same problem

cat files-1/var/log/11483/stdout
iperf 3.1
NODE_1's OS NODE_1 3 12 1
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Time: Fri, 01 Jan 2010 00:00:05 GMT
Accepted connection from 10.1.1.1, port 37660
      Cookie: NODE_0.1262304005.000000.7a0217c30e1
      TCP MSS: 1428 (default)
iperf3: error - unable to create a new stream: No such file or directory
iperf 3.1
NODE_1's OS NODE_1 3 12 1
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Jayway Liu

unread,
Apr 17, 2017, 9:44:44 PM4/17/17
to ns-3-users, ljw...@gmail.com
Problem solved after debugging the IECREATESTREAM error. It is because of the unlink. Then I noticed that part of code was commented out in Richard's version. I used the matt branch of this link this afternoon https://github.com/teto/iperf/tree/matt, which turns out does not work for me. 
Reply all
Reply to author
Forward
0 new messages