This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define NEW_BASE_ADDR 98765 | |
void *mymalloc(size_t size) { | |
return (void *)size; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
interface=lo | |
ip=10.0.0.1 | |
delay=100ms | |
tc qdisc add dev $interface root handle 1: prio | |
tc filter add dev $interface parent 1:0 protocol ip prio 1 u32 match ip dst $ip flowid 2:1 | |
tc qdisc add dev $interface parent 1:1 handle 2: netem delay $delay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global inject, delay_cnt | |
probe begin { | |
println("injdect diskio delay begin.\n"); | |
} | |
probe procfs("cnt").read { | |
$value = sprintf("%d\n", delay_cnt); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import logging | |
import os | |
import threading | |
def parse_opts(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import logging | |
import os | |
import signal | |
import threading | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import os | |
import threading | |
def uplink(ucycle, uspeed, ustep): | |
os.system('sudo tc qd del dev eno1 root handle 1') | |
os.system('sudo tc qdisc replace dev eno1 root handle 1: htb default 20') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import os | |
import threading | |
def uplink(ucycle, uspeed, ustep): | |
os.system('sudo tc qd del dev em1 root handle 1') | |
os.system('sudo tc qdisc replace dev em1 root handle 1: htb default 20') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(void) { | |
int i = 0; | |
for (; i < 10; i++) { | |
vfork(); | |
} | |
while(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#define BLOCKSIZE 1048576 | |
#define N 200 | |
#define BUSYTIME 1000 | |
int main(int argc, char *argv[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#define BLOCKSIZE 1048576 | |
#define N 200 | |
#define BUSYTIME 1000 |
OlderNewer