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 bash | |
set -o errexit | |
echo $(date):Random read | |
fio --filename=test --sync=1 --rw=randread --bs=4k --numjobs=1 \ | |
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test | |
echo $(date):Random write | |
fio --filename=test --sync=1 --rw=randwrite --bs=4k --numjobs=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
#!/bin/bash | |
#Based off of http://code.activestate.com/recipes/491264/ | |
if [ "$1" == "startserver" ]; then | |
ncat -u -l 5355 -c $(readlink -f $0) -k | |
exit | |
fi | |
timeout 1s cat /dev/stdin > input | |
req=$(cat input | xxd -p) | |
#Functions from http://ubuntuforums.org/showthread.php?t=735140&p=4584216#post4584216 |
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
## USAGE | |
# $ nix-build kexec-installer.nix | |
# can be deployed remote like this | |
# $ rsync -aL -e ssh result/ root@host: | |
# $ ssh root@host ./kexec-installer | |
## Customize it like this | |
# # custom-installer.nix | |
# import ./kexec-installer.nix { | |
# extraConfig = {pkgs, ... } { | |
# user.extraUsers.root.openssh.authorizedKeys.keys = [ "<your-key>" ]; |