Skip to content

Instantly share code, notes, and snippets.

<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:tour="http://www.protogeni.net/resources/rspec/ext/apt-tour/1" xmlns:jacks="http://www.protogeni.net/resources/rspec/ext/jacks/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd" type="request">
<node xmlns="http://www.geni.net/resources/rspec/3" client_id="node-6">
<icon xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" url="https://portal.geni.net/images/Xen-VM.svg"/>
<site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="Site 1"/>
<sliver_type xmlns="http://www.geni.net/resources/rspec/3" name="emulab-xen">
<disk_image xmlns="http://www.geni.net/resources/rspec/3" name="urn:publicid:IDN+emulab.net+image+emulab-ops:UBUNTU14-64-STD"/>
</sliver_type>
<services xmlns="http://www.geni.net/resources/rspec/3">
<execute xmlns="http://www.geni.net/
@ffund
ffund / large-storage.md
Last active August 3, 2016 22:56
RSpec for getting extra storage space on an ExoGENI VM.

This is an RSpec for getting extra storage space on an ExoGENI VM of type XOXLarge.

Note the line:

<storage:storage resource_type="LUN" do_format="true" fs_param="-F -b 1024" fs_type="ext4" mnt_point="/mnt" capacity="942"/>

Reduce the "942" to a smaller number if you don't need so much space.

Your slice will appear to have two resources: one called "master" and one called "master-stor". Log in to the one called "master" (when it is available).

@ffund
ffund / babel-install-and-run.sh
Last active August 5, 2016 05:39
This is a script for installing _and_ running babel on all interfaces except for eth0.
sudo apt-get update
# Install the babel routing daemon, mtr fancy traceroute, and nodejs (for the babelweb node)
sudo apt-get -y install babeld mtr npm nodejs-legacy
# Turn on martian logging ???
sudo sysctl -w net.ipv4.conf.all.log_martians=1
# To see log: sudo tail -f /var/log/syslog
# To turn off reverse path filtering:
sudo sysctl -w net.ipv4.conf.default.rp_filter=0
@ffund
ffund / pie-v-red-install.sh
Last active August 18, 2016 06:34
For "Comparing queueing delay between PIE and RED"
# Install software
sudo apt-get update;
sudo apt-get -y install vsftpd nload # nload is for monitoring network traffic
# Put the VSFTPD config file in place
sudo wget --output-document=/etc/vsftpd.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
sudo wget --output-document=/etc/vsftpd-nolimit.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
sudo wget --output-document=/etc/vsftpd-limit.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
echo 'anon_max_rate=25000' | sudo tee --append /etc/vsftpd-limit.conf
@ffund
ffund / queuemonitor.sh
Created August 17, 2016 22:57
A bash script to monitor the queue on a network interface. See http://witestlab.poly.edu/~ffund/el7353/2-testbed-mm1.html for details.
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Usage: $0 interface duration interval"
echo "where 'interface' is the name of the interface on which the queue"
echo "running (e.g., eth2), 'duration' is the total runtime (in seconds),"
echo "and 'interval' is the time between measurements (in seconds)"
exit 1
fi
#!/bin/bash
# This script accepts three arguments: the destination (to ping, and from which to retrieve files),
# the total duration for which to generate traffic (in seconds), and the time to wait before starting
# to generate traffic (in seconds).
addr=$1
time=$2
wait=$3
lastwait=$(expr 260 - $wait - $time)
# Check if nload is installed, install it if not
hasnload=$(dpkg-query -W --showformat='${Status}\n' nload|grep "install ok installed")
if [ "" == "$hasnload" ]; then
sudo apt-get update
sudo apt-get -y install nload
fi
# Check if kernel is too old, and update it if necessary
kernel=$(uname -r | cut -f1 -d'-')
dpkg --compare-versions "$kernel" "lt" "3.19.0"
set terminal dumb
set datafile separator ","
plot 'ping_delay.csv'
set terminal png
set output 'ping_delay.png'
set datafile separator ","
plot 'ping_delay.csv'
#!/bin/bash
qdisc=$1 #pie or red
# Get the name of the interface on the router
# that connects to the client nodes.
# Store the name of the interface in the
# variable 'intf'
intf=$(route -n | grep "10.10.2.0" | awk '{print $8}')
<?xml version="1.0"?>
<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:tour="http://www.protogeni.net/resources/rspec/ext/apt-tour/1" xmlns:jacks="http://www.protogeni.net/resources/rspec/ext/jacks/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd" type="request">
<node xmlns="http://www.geni.net/resources/rspec/3" client_id="server1">
<icon xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" url="https://portal.geni.net/images/VM-noTxt-centered.svg"/>
<sliver_type xmlns="http://www.geni.net/resources/rspec/3" name="emulab-xen">
<disk_image xmlns="http://www.geni.net/resources/rspec/3" name="urn:publicid:IDN+emulab.net+image+emulab-ops:UBUNTU14-64-STD"/>
</sliver_type>
<services xmlns="http://www.geni.net/resources/rspec/3">
<execute xmlns="http://www.geni.net/resources/rspec/3