Skip to content

Instantly share code, notes, and snippets.

View mtarsel's full-sized avatar

Mick Tarsel mtarsel

View GitHub Profile
From 177aef44725adb9bc8232a6a03ddf90324a50741 Mon Sep 17 00:00:00 2001
From: Mick Tarsel <mtarsel@gmail.com>
Date: Wed, 29 Mar 2023 13:18:00 +0000
Subject: [PATCH] First attempt to enable ppc64le
Creates a dir in ./out called ppc64le. Binary builds correctly however
I changed some checks:
- checkSupportedCPUArch
- checkVirtualizationEnabled
default microkernel
label microkernel
kernel http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/ppc64le/netboot-3.8.0_rc5/vmlinuz-vanilla
initrd http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/ppc64le/netboot-3.8.0_rc5/initramfs-vanilla
append powersave=off modules=loop,squashfs,sd-mod,usb-storage,ibmvscsi ssh_key=http://10.32.172.14/pubkey ip=-:-:-:-:-:eth2:dhcp alpine_repo=http://dl-cdn.alpinelinux.org/alpine/v3.8/main modloop=http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/ppc64le/netboot-3.8.0_rc5/modloop-vanilla
<!-- 16 CPUs 2048 MB memory, 25GB of storage, default network -->
<domain type='kvm'>
<name>rhelski-guf</name>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<memtune>
<hard_limit unit='KiB'>3145728</hard_limit>
</memtune>
<vcpu placement='static'>16</vcpu>
<os>
1. make sure you have a pool setup to store your volumes
[root@ltc14u32rhel ~]# cat poolski.xml
<pool type="dir">
<name>virtimages</name>
<target>
<path>/home/libvirt/images</path>
</target>
</pool>
[root@ltc14u32rhel ~]# virsh pool-define poolski.xml
struct sk_buff *buf, struct net_device *dev;
/* Network packet is empty, seems like some problem occurred. Skip it */
if (!buf)
return NF_ACCEPT;
iph = ip_hdr(buf); /* get IP header */
/* Skip if it's not TCP packet */
if (iph->protocol != IPPROTO_TCP)
with open ('output.HOST.1.txt') as f:
for line in f:
if line[6] != 'l':
listski = list(line)
listski.insert(32, ',')
new_str = str(''.join(listski)).rstrip()
print new_str[22:]
# returns Transfer rate and Bandwidth in CSV format
in trace_begin
openvswitch__upcall_start 1 00645.900842478 2452 iperf skbaddr=13835058081481987584, protocol=0x806, id=1
openvswitch__upcall_end 6 00645.901042656 798 ovs-vswitchd skbaddr=13835058055495186176, protocol=0x806, id=1
openvswitch__upcall_start 6 00645.901082276 798 ovs-vswitchd skbaddr=13835058055495183104, protocol=0x806, id=2
openvswitch__upcall_end 6 00645.901147430 798 ovs-vswitchd skbaddr=13835058055495191296, protocol=0x806, id=2
openvswitch__upcall_start 6 00645.901162992 798 ovs-vswitchd skbaddr=13835058081480945384, protocol=0x800, id=3
@mtarsel
mtarsel / Kalff-2000
Created March 9, 2015 22:01
Downloads all the chapter pdfs and combines them into 1 pdf
#!/bin/bash
#sudo apt-get update
#sudo apt-get install pdftk
echo "**************************************"
echo ""
echo " Mick Tarsel "
echo " tarselmj@clarkson.edu "
echo ""
@mtarsel
mtarsel / pulverizer.py
Created October 14, 2014 17:12
Extended Euclidean Algo. aka Pulverizer
# Edited by Mick Tarsel
# This code will print out the following numbers:
# P, Z, Q, R, and the final x1 and y1
#NOTE: the very last x1 and y1 values are your answers.
#this code does not print out the entire table
#!/bin/bash
# Alert possible sync flood attack
syn_threshold=200
httpd_threshold=350
admin=admin@somedomain.com
cap_duration=8
cap_syn=100 # default syn pkts capture count
cap_all=500 # default pkts capture count
syn_count=0 # syn flood count