Skip to content

Instantly share code, notes, and snippets.

View forestbaker's full-sized avatar

input - process - output forestbaker

View GitHub Profile
@forestbaker
forestbaker / READ_FPDMA_QUEUED.sh
Created August 29, 2016 20:40
Got “READ FPDMA QUEUED” errors from “dmesg” output
# Got “READ FPDMA QUEUED” errors from “dmesg” output
# Likely have an issue with the hard disk controller driver
# resolve by disabling NCQ
echo 1 > /sys/block/sdX/device/queue_depth
# verify if NCQ is enabled
# returned value will be higher than “1”
cat /sys/block/sdX/device/queue_depth
@forestbaker
forestbaker / Useful_MySQL_Queries.sql
Created August 29, 2016 20:45
Useful MySQL Queries
# Display Storage Space used by Tables in a MySQL Database called "DiagDomain":
SELECT table_name AS "Tables", round(((data_length + index_length)/1024/1024/1024), 2) "Size in GB" FROM information_schema.TABLES WHERE table_schema = "DiagDomain" ORDER BY (data_length + index_length) DESC;
# Display Storage Space used by all MySQL Databases:
SELECT table_schema "database", sum(data_length + index_length)/1024/1024/1024 "Size in GB" FROM information_schema.TABLES GROUP BY table_schema;
@forestbaker
forestbaker / disable_ipv6_linux.sh
Created August 29, 2016 20:47
disable IPv6 on linux
# Disable IPv6 in ufw
sed -i 's/^IPV6=YES/IPV6=NO/I' /etc/default/ufw
disable ufw; enable ufw
@forestbaker
forestbaker / ufw_commands.sh
Created August 29, 2016 20:48
UFW commands
# Check UFW Firewall rules:
ufw status
ufw status numbered
ufw status verbose
# Enable UFW logging:
ufw logging (on|off|low|medium|high|full)
ufw logging on = ufw logging low
# Insert a rule at position 1