Skip to content

Instantly share code, notes, and snippets.

@Arie
Last active October 22, 2020 21:37
Show Gist options
  • Select an option

  • Save Arie/25b260cc02d04a67d282 to your computer and use it in GitHub Desktop.

Select an option

Save Arie/25b260cc02d04a67d282 to your computer and use it in GitHub Desktop.
Installing flent on OS/X with homebrew
`pip install flent matplotlib`
`brew install fping`
Netperf in homebrew is installed without demo mode by default, so we need to edit the recipe slightly, also demo mode fails to build under OS/X, requiring a tiny patch to netlib.c ( http://www.netperf.org/pipermail/netperf-talk/2013-December/001162.html ). The following recipe changes the URL to a prepatched version that I host and changes the configure line to enable demo mode.
`brew edit netperf`
```
class Netperf < Formula
desc "Benchmarks performance of many different types of networking"
homepage "http://netperf.org"
url "http://fakkelbrigade.eu/i/netperf-2.7.0.tar.bz2"
sha256 "a9c2fe4c3bc572912fd320c39f819d4d494675d743132e6094e2663982464fb6"
def install
system "./configure", "--disable-dependency-tracking",
"--enable-demo",
"--prefix=#{prefix}"
system "make", "install"
end
test do
system "#{bin}/netperf -h | cat"
end
end
```
`brew install --build-from-source netperf`
Run flent:
`flent rrul -p all_scaled -l 60 -H your-server -t your-run -o your-run.png`
@easp
Copy link
Copy Markdown

easp commented Feb 25, 2016

Thanks for providing the patched version!

@KajKandler
Copy link
Copy Markdown

To whom ever it may help, I had to change:

sudo pip install flent matplotlib # just because it is not a good idea to install modules as sudo, your brew installation may benot working properly

"--enable-demo=yes",

brew install --build-from-source netperf #otherwise the change installs the same binary from the web w/o demo enabled

@lesandie
Copy link
Copy Markdown

Nice catchup :-)

@bbuchalter
Copy link
Copy Markdown

Hmmm, things didn't go as well for me:

==> ./configure --enable-demo=yes --prefix=/usr/local/Cellar/netperf/2.7.0
==> make install
Last 15 lines from /Users/brian/Library/Logs/Homebrew/netperf/02.make:
Undefined symbols for architecture x86_64:
  "_demo_interval_display", referenced from:
      _demo_interval_final in netlib.o
  "_demo_interval_tick", referenced from:
      _demo_stream_interval in netlib.o
      _demo_rr_interval in netlib.o
      _send_omni_inner in nettest_omni.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [netserver] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [netperf] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

@bbuchalter
Copy link
Copy Markdown

This was caused by my failure to fully read the gist! The comment above explains the small patch needed and provided by the change to the formula.

@dgchurchill
Copy link
Copy Markdown

Thanks. I've combined the patch and config item in to a Homebrew recipe here: dgchurchill/homebrew-core@53f5a1d

@victorhooi
Copy link
Copy Markdown

I used this last night as well - also had to brew install pyqt to get flent-gui working

However, it works great.

Is there any chance of this being merged into mainline Homebrew? (As in, the netperf --demo-mode option)?

@detj
Copy link
Copy Markdown

detj commented Sep 14, 2020

Thanks for this gist. I wasted around 4 hours cursing my inability to understand the autoconf, make, ecosystem while trying to make it work without realizing that a patch to the original source was required for this to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment