This file contains hidden or 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
package qxp; | |
use strict; | |
# https://code.google.com/p/qxp/ | |
sub H($){pack'H*',$_[0]} | |
sub by{map{[splice@_,1,$_[0]]}!($#_%$_[0])..$#_/$_[0]} | |
sub is($){$_ eq$_[0]} | |
sub cat{join'',@_} | |
sub list{@_} |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use Net::DNS::Resolver; | |
use List::Util qw(sum); | |
use lib "/opt/local/lib/perl5/vendor_perl/5.16.3"; |
This file contains hidden or 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 <string.h> | |
// Author: pavel.odintsov@gmail.com at FastVPS Eesti OU | |
// License: GPLv2 | |
// This script allocate huge block of memory and fill it with random crap | |
// It's useful for checking kdump or ISP's with memory oversell :) | |
// Compilation: gcc memory_eater_ng.c -omemory_eater_ng |
This file contains hidden or 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
package qxp; | |
use strict; | |
# code from: https://code.google.com/p/qxp/source/browse/qxp/qxp.pm | |
sub H($){pack'H*',$_[0]} | |
sub by{map{[splice@_,1,$_[0]]}!($#_%$_[0])..$#_/$_[0]} | |
sub is($){$_ eq$_[0]} | |
sub cat{join'',@_} | |
sub list{@_} |
This file contains hidden or 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/python | |
import json | |
import urllib2 | |
import sys | |
import pprint | |
if len(sys.argv) != 2: | |
sys.exit("Please provide params"); |
This file contains hidden or 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 | |
INTERVAL="1" # update interval in seconds | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 [network-interface] | |
echo | |
echo e.g. $0 eth0 | |
echo |
This file contains hidden or 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/perl | |
# Author Pavel Odintsov | |
# pavel.odintsov@gmail.com | |
use strict; | |
use warnings; | |
opendir my $dir, '/proc' or die "Can't open procfs"; |
This file contains hidden or 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
diff -Nraup ixgbe-linux-netmap/ixgbe-3.23.2.1/src/ixgbe_main.c ixgbe-linux-netmap-single-queue/ixgbe-3.23.2.1/src/ixgbe_main.c | |
--- ixgbe-linux-netmap/ixgbe-3.23.2.1/src/ixgbe_main.c 2015-06-20 14:23:38.457783634 +0100 | |
+++ ixgbe-linux-netmap-single-queue/ixgbe-3.23.2.1/src/ixgbe_main.c 2015-06-20 14:23:31.330496612 +0100 | |
@@ -686,6 +686,7 @@ static bool ixgbe_clean_tx_irq(struct ix | |
if (test_bit(__IXGBE_DOWN, &adapter->state)) | |
return true; | |
+ if (tx_ring->queue_index == 0) { | |
#ifdef DEV_NETMAP | |
/* |
This file contains hidden or 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 | |
INTERVAL="1" # update interval in seconds | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 [network-interface] | |
echo | |
echo e.g. $0 eth0 | |
echo |
This file contains hidden or 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 | |
# from http://habrahabr.ru/post/108240/ | |
ncpus=`grep -ciw ^processor /proc/cpuinfo` | |
test "$ncpus" -gt 1 || exit 1 | |
n=0 | |
for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g` | |
do | |
f="/proc/irq/$irq/smp_affinity" |
OlderNewer