Mimic a slow internet connection (mac) - performance

Anyone have a good technique for checking sites over a slower connection on osx?
Looking at posts on here, some people have recommended sloppy, which doesn't appear to do anything, just loads sites at normal speed. Any other techniques out there? I have 50mb broadband and it's difficult to judge page speeds at the moment.

Video demo of Dummynet used to throttle IP video streaming on OSX. According to the website, it is already installed in a standard OSX. As Jeff Foster mentioned, the same question is on SuperUser. There I also found ThrottledCLI suggested by Robbie.

This might help you to simulate 3G on Mac:
sudo ipfw add pipe 1 src-port http
ipfw pipe 1 config delay 200 bw 700kbit/s
Remove those settings and go back to normal speeds:
ipfw flush
Also check this out.

Related

Mimic Low Bandwidth for UI Testing?

How do you mimic low bandwidth for testing HTML rendering on slow computers? I'm using Safari 4 on a Mac.
Found the SpeedLimit preference tool mentioned in another SO answer. Works for me and is very unobtrusive to use (no application, no command line, no Java).
You're probably looking for traffic shaping, in MacOS X it's included in the kernel. Take a look at http://www.macgeekery.com/hacks/software/traffic_shaping_in_mac_os_x
If you have an Apple Developer account, look for the "Hardware IO Tools for Xcode" download. There is a Network Link Conditioner pref-pane included just for that with some good presets for
3G (Average/Good/Lossy)
Edge (Average/Good/Lossy)
WiFi (Average/Good/Lossy)
Cable
DSL
Also have a look at this answer
I'm a big fan of using the Charles Web Debugging Proxy. It allows you to throttle your own bandwidth to simulate different connection speeds (and a whole mess of other stuff, too). Highly recommended.
You could set up a local webserver (ie Apache) and use the traffic shaping capabilities thereof.
An article on Apache throttling
I guess most popular webservers support this.
edit:Typos
There is a program by Intrarts called "throttled", and the command-line version seems to be free (price):
throttled is a bandwidth shaping
application for Mac OS X and FreeBSD
which allows you to cap your upstream
bandwidth, prioritize ACK packets, and
keep your download speeds high even
when your server is sending out at
full speed.
...which seems to be a little tangential to your needs, but might be able to be configured to do what you want.
I wrote a post on using waterroof to limit bandwidth a while ago.
It uses ipfw under the covers, but has a nice UI for this kind of thing.
One option is Trickle for Mac.
Alternatively, if you don't have to use Safari, you could use Firefox with the Firefox Throttle plugin.

How can I simulate TCP/IP errors?

On a multi-tier application, I need to simulate various TCP/IP errors to test some reconnection code. Does anyone know of any tools (Windows based) I can use for this purpose? Thanks.
Scapy allows you to control every aspect of the packets, and randomly modify ("fuzz") the ones you don't want to control. If you're a command-line kind of guy, it's a great tool.
Try netwox (formerly lcrzoex.) If it won't do it, it can't be done. It contains >200 tools.
On FreeBSD, the best tool, by far, is dummynet, "a tool originally designed for testing networking protocols, and since then used for a variety of applications including bandwidth management. It simulates/enforces queue and bandwidth limitations, delays, packet losses, and multipath effects."
On Linux, you will have to use netem. (It seems there is now a port of dummynet but I never tried it.)
More details (in French) in my article.
Clumsy is a good tool for TCP error simulation on Windows. It can simulate (copy-pasted from link above):
Lag, hold the packets for a short period of time to emulate network
lagging.
Drop, randomly discard packets.
Throttle, block traffic for a given time frame, then send them in a single batch.
Duplicate, send cloned packets right after to the original one.
Out of order, re-arrange the order of packets.
Tamper, nudge bits of packet's content.
No tools that I'm aware of, but most of TCP errors can be emulated by a custom LSP filter. This article can get you started writing one

Bandwidth throttling for Apache<2.2 on Windows (mod_throttle?)

Does anyone know of a windows build of mod_throttle for Apache 2.2 or lower?
Or perhaps another means by which to throttle bandwidth. I need to throttle as low as 64k for a local speed test demonstration
Preferably Apache rather than a browser plug-in too.
Thanks!
I'm not familiar with mod_throttle, but I just tried Traffic Shaper XP, it went as low as 33K (it might be able to go lower). I actually "found" the answer to your problem in another stack overflow post. I've needed a tool like this in the past but had never found a good one (but this one looks good). One last note, I didn't want to mess with my network stack on my dev machine, so I used a Virtual PC Win XP image (I use these for testing various versions of IE).
Yo may try mod_bandwith as explained here.

A Good, Free screen sharing program for pair programming?

I am looking for a good, free (preferred) screen sharing program that works well for pair programming and code review sessions for Windows (Vista x64, Server 2008). It should allow either person take control of the screen and be fairly responsive for text editing over decent broadband connections. Additional features like the ability to draw/mark/annotate the other persons screen would be nice.
Edit: This will be used by developers in remote locations.
TeamViewer from http://www.teamviewer.com/ works very well. We use it for pair programming between London and Ukraine.
Notes:
We use Skype for voice.
TeamViewer uses extremely low bandwidth - 4kbyte/sec on average for programming in Visual Studio 2008 # 1024x768 resolution.
Can swap roles from hotseat to viewer with a button.
The remote view of the screen can be resized to fit in a smaller area with no loss in usability.
Windows Shared View works for me. It allows you to only share certain windows and even shows where your "attendees" mouse is. It would be best to use that in connection with some sort of voip connection so that you don't have to type questions/responses back and forth.
I have checked some hours now for a good one.
Best and the simplest thing i have found.
http://www.screenleap.com/
Free, no strings found so far.
No need to waste time installing or registering anything.
Works perfect with "share are only" if you have multimontor setup.
Most other software shares full screen default, and you cannot choose which monitor you share.
You need to be aware that it does not encrypt data. Check FAQ.
But if you have to run voice over Skype/Mymble/Whatever separate anyway..
What harm can a hacker do by simply getting 50% of the conference ?
Pff.. Oh you wished for screen sharing.. this one does not have it.
So try: http://www.mingleview.com/
It has that multimonitor "bug" and you need to install a simple pluginlike thing.
But "take control" is there and it's very simple also.
Most other software has bundled unneccesary functions like calendaring, document system, filesharing which i already have solutions for.
It's like developing games on excel macros..
unneccesary.. developers please learn that already !
I haven't actually tried it yet, but it looks promising. Check out DimDim. They have a free web service and a VMWare image on Sourceforge.
If you're using eclipse, you might wanna try ECF. There's a video presentation available here.
Try Mikogo at www.mikogo.com
very easy to setup. no problems with Firewalls etc etc
And my final suggestion, but this is not one I've tried. Go to Crossloop
On OSX, I've used vim and a multi-user GNU screen session - this gives much better responsiveness than VNC, screen-sharing, etc. I guess you could use these with Cygwin?
I like to use Screen Hero, which allows both users to use the mouse on the shared screen: http://screenhero.com/
or Zoom: http://zoom.us/
For a poor-man's solution, you can use the free edition of RealVNC. On the server, un-check all of these boxes:
(source: realvnc.com)
Would a VNC client not do the trick, combined with a one of those screen overlay apps people use for presentations (screenpen rings a bell)?
Another option is to use VNC, but use reverse connections. Have a look at this I use this in conjunction with No-IP to get a fixed address.
Do you need this to be remote?
You could just have two monitors set to mirror and 2 USB keyboards/mice
If it is remote then VNC is the way to go, I would use UltraVNC if you are looking for a free version, it has more features (chat, file transfer) than the free version of VNC - it also has a video driver hook that means it suffers less from any weird screen issues than regualr VNC.
If firewalls are a problem you can simply set up a VPN (which is probably a good idea anyway - although ultra can do encryption).
How about any of the services like Joel's https://www.copilot.com/?
Have you looked at the collaboration module that comes with netbeans? Its very useful for pair programming!
For multi-platform simplicity, I would suggest
https://join.me/ for screen share (you can even view a remote
screen using iOS!)
getting a phone headset, and using the phone for audio.

Free Network Monitor

I am having trouble integrating two products, one of which is mine and they appear not to be talking. So I want to make sure they are communicating correctly. I had a look around for network monitor and found TCP Spy. This works but only shows 1 side of the conversation at a time (it has to run locally) I would ideally like to see both sides at the same time - but you can't run two copies of TCP Spy.
I've hit Sourceforge, but nothing seems to jump out - I'm a Windows developer, I don't have perl installed.
I've found a couple of others which are cripple-ware and totally useless, so I was wondering what do the SO guys use for watching the TCP conversation?
BTW - the 'not-written-here' product is not a browser.
Wireshark is a really good and mature network sniffer. It's been around for years.
Deep inspection of hundreds of protocols, with more being added all the time
Live capture and offline analysis
Decryption support for many protocols, including IPsec, ISAKMP, Kerberos, SNMPv3, SSL/TLS, WEP, and WPA/WPA2
Coloring rules can be applied to the packet list for quick, intuitive analysis
Output can be exported to XML, PostScript®, CSV, or plain text
I'm not sure if it does everything you want, but have you seen WireShark and the Microsoft Network Monitor?
Wireshark (previously Ethereal)
Wireshark is an award-winning network protocol analyzer developed by an international team of networking experts.
I use wireshark. Very good and free.
Wireshark, aka Ethereal comes with a fair amount of TCP sniffing functionality.
http://www.wireshark.org/
With respect to using Windows and lacking Perl: Why not try Strawberry Perl? It's a free Perl distribution that's run by the Perl community (specifically Adam Kennedy at the core), is easy to install, and wields the full power of CPAN out of the box.
Strange that I did not see WireShark when I visited SourceForge. The top result of the 60 returned was a bizarre german thing.
Wireshark is great.. but another option would be via PowerShell. I've used the Get-Packet script from Jeff Hicks at Sapien Technologies as a really lightweight packet sniffer. You get custom objects representing your packets and can do whatever filtering you need to via PowerShell. The other script in the pair is Analyze-Packet, which can summarize the results of a packet capture.
I tried Wireshark and Microsoft Network Monitor, but neither detected my (and the program I am trying to communicate with) transfer. If I had a day to sit and configure it I probably could get it working but I just wanted the bytes sent and, more specifically, bytes received.
In the end I found HHD Software's Accurate Network Monitor software which did what I wanted it to, even if it was slight clunky.
Take a look at Tcpdump It is not a full fledged GUI network analyzer (not at all) but it is usable in scripts. Since I am more a Linux person, I use it with Bash and Python, but you should be able to call it from powershell.

Resources