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 | |
# rh-container-registry.sh | |
# Test functionality of Red Hat Container Registries using pure HTTP/S. | |
# Useful for determining issues when/if behind proxies, load balancers, | |
# or other in-the-middle network devices. | |
# For more information on using Red Hat Container Registries, please see | |
# the following: | |
# https://access.redhat.com/RegistryAuthentication |
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
# unmount-watcher.stp | |
# Watches for filesystem unmounts and prints additional information about them. | |
# Authored by Robb Manes <[email protected]> | |
# Execute by running: | |
# stap unmount-watcher.stp > unmount-watcher.out | |
# In containerized environments, the unmounting process may belong to a different process namespace, so it's useful to print the | |
# entire tree to determine where it came from. | |
# This is borrowed from https://sourceware.org/systemtap/examples/network/connect_stat.stp |
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
import sys | |
import time | |
def usage(): | |
msg = ''' | |
shmem_test_tool.py | |
================== | |
Utility for testing Python multiprocessing shared memory segments. | |
Note this is NOT the same as IPCS SHMEM segments in Linux/Unix. |
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
# unmount-watcher.stp | |
# Watches for filesystem unmounts and prints additional information about them. | |
# Authored by Robb Manes <[email protected]> | |
# Execute by running: | |
# stap unmount-watcher.stp > unmount-watcher.out | |
# In containerized environments, the unmounting process may belong to a different process namespace, so it's useful to print the | |
# entire tree to determine where it came from. | |
# This is borrowed from https://sourceware.org/systemtap/examples/network/connect_stat.stp |
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
obj-m += bigdummy.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
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 | |
CONTAINER_NAME="nginx" | |
ENDPOINT="localhost:8080/v3.0.0" | |
function section { | |
echo "" | |
echo $1 | |
printf -v UNDERLINE "%-${#1}s" '=' | |
echo "${UNDERLINE// /=}" | |
} |
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/env stap | |
probe begin { | |
printf("Watching for signal(9) and reporting sender and receiver statuses...\n"); | |
} | |
probe signal.syskill { | |
if(sig == 9) { | |
printf("[%s] SEND===> PID %d (%s) sent signal %d (%s) to PID %d (%s)\n", | |
ctime(gettimeofday_s()), |
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 <sys/io.h> | |
#include <errno.h> | |
#define LEVEL 3 | |
int main(int argc, char **argv) | |
{ | |
int rc; | |
rc = iopl(LEVEL); |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} |
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
import logging | |
import socket | |
import sys | |
import threading | |
import time | |
CLIENT_CONN_ADDR="127.0.0.1" | |
CLIENT_NUM_CONNS=10 | |
SERVER_PORT=8888 | |
SERVER_SYN_BACKLOG=128 |