Skip to content

Instantly share code, notes, and snippets.

@amit177
amit177 / ubuntu20_e1000e_fix.md
Last active November 22, 2023 09:57
Ubuntu 20.04 e1000e - Reset adapter unexpectedly FIX

This guide will help you fix Ubuntu 20.04 TCP packet drops on high load with the intel e1000e driver.

Use at your own risk, I do not take any responsibility if your stuff breaks. BACKUP YOUR DATA BEFORE!

Prerequisites

To confirm this issue happens to you, look for the message Reset adapter unexpectedly in /var/log/dmesg: Use the command cat /var/log/dmesg | grep "Reset adapter unexpectedly"

If no messages show up, do the command again once you notice huge packet loss, if still nothing shows up - you're having a different issue.

@amit177
amit177 / centos8_e1000e_fix.md
Created November 1, 2020 22:23
CentOS8 e1000e - Reset adapter unexpectedly FIX

This guide will help you fix CentOS 8 TCP packet drops on high load with the intel e1000e driver.

Use at your own risk, I do not take any responsibility if your stuff breaks. BACKUP YOUR DATA BEFORE!

Prerequisites

To confirm this issue happens to you, look for the message Reset adapter unexpectedly in /var/log/messages: Use the command cat /var/log/messages | grep "Reset adapter unexpectedly"

If no messages show up, do the command again once you notice huge packet loss, if still nothing shows up - you're having a different issue.

@amit177
amit177 / guide.md
Last active June 18, 2022 19:45
Virtualizor KVM - Master Migration
  1. Install the new master using the same VG name as the old master
  2. Turn on maintenance mode in Configuration --> Maintenance
  3. In the old master, go to Backup --> Database Backup --> Immediate Backup --> Start Database Backup
  4. Download the database backup and upload it to the folder /var/virtualizor/dbbackups/ in the new master
  5. Restore the database backup in the new master using the command /usr/local/emps/bin/php /usr/local/virtualizor/scripts/db_restore.php
  6. Copy all of the XML files from /etc/libvirt/qemu/ to the new master
  7. Copy all of the OS templates from /var/virtualizor/kvm/ to the new master
  8. Run lvscan and create each LV in the new master (lvcreate --name vsvXXXXXXXXXXX -L SIZEG VGNAME)
  9. Turn off all of the VMs and then export each LV into a .img file using the command dd if=/dev/VGNAME/vsvXXXXXXXXXXXXXX of=vsvXXXXXX.img bs=8M status=progress Note that this step will require a lot of storage, I recommend attaching an external hard drive and saving the .img files in
@amit177
amit177 / downloader.py
Created January 21, 2020 17:50
Just-Some-Bots/MusicBot downloader.py - use random IP
import os
import asyncio
import logging
import functools
import youtube_dl
from random import choice
from concurrent.futures import ThreadPoolExecutor
log = logging.getLogger(__name__)