Skip to content

Instantly share code, notes, and snippets.

faicker faicker

Block or report user

Report or block faicker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@faicker
faicker / dropstat.sh
Created Sep 29, 2017
linux kernel packet drop stat
View dropstat.sh
#!/usr/bin/env bash
function print() {
for nic in ${@}; do
echo "$nic:"
echo " ifconfig:"
ifconfig $nic | grep drop | sed 's/^\s\+//'
echo " ethtool:"
ethtool -S $nic | grep -E '(err|drop|rx_no_dma_resources)' | grep -v ': 0$' | sed 's/^\s\+//'
echo " tc:"
View ls_modparams.sh
#!/usr/bin/env bash
cat /proc/modules | cut -f 1 -d " " | while read module; do \
echo "Module: $module"; \
if [ -d "/sys/module/$module/parameters" ]; then \
ls /sys/module/$module/parameters/ | while read parameter; do \
echo -n "Parameter: $parameter --> "; \
cat /sys/module/$module/parameters/$parameter; \
done; \
fi; \
View interrupt_count.sh
#!/bin/bash
FILE="/proc/interrupts"
output=$(awk 'NR==1 {
core_count = NF
for (i = 1; i <= core_count; i++)
names[i-1] = $i
next
}
You can’t perform that action at this time.