I hereby claim:
- I am forestbaker on github.
- I am forestbaker (https://keybase.io/forestbaker) on keybase.
- I have a public key whose fingerprint is 342E AAB2 572D 6739 3A3E ED4C 26FD 1568 3381 4EBA
To claim this, I am signing this object:
| # 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 |
| # Disable IPv6 in ufw | |
| sed -i 's/^IPV6=YES/IPV6=NO/I' /etc/default/ufw | |
| disable ufw; enable ufw | |
| # 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; |
| # 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 |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| #pseudo | |
| if $(ulimit -c) | |
| then | |
| ulimit -c unlimited | |
| mkdir -m 1777 -p /var/log/dumps | |
| echo "kernel.core_pattern=var/log/dumps/core.%e.%p" >> /etc/sysctl.conf | |
| # echo “/var/log/dumps/core.%e.%p” > /proc/sys/kernel/core_pattern |
| issue: | |
| locale: Cannot set LC_CTYPE to default locale: No such file or directory | |
| locale: Cannot set LC_MESSAGES to default locale: No such file or directory | |
| locale: Cannot set LC_ALL to default locale: No such file or directory | |
| identify: | |
| locale -a | |
| will return error message as above and options for locale settings, choose any of the available options. | |
| selecting C reduces shell execution time. |
| #!/bin/bash | |
| # “no public key available” on apt-get update | |
| sudo aptitude install debian-keyring debian-archive-keyring | |
| http://mirrors.cat.pdx.edu jessie |
| #!/bin/sh | |
| header='"Exit_Code_Number","Meaning","Example","Comments"' | |
| "1","Catchall for general errors","let 'var1 = 1/0'","Miscellaneous errors, such as 'divide by zero' and other impermissible operations" | |
| "2","Misuse of shell builtins (according to Bash documentation)","empty_function() {}","Missing keyword or command, or permission problem (and diff return code on a failed binary file comparison)" | |
| "126","Command invoked cannot execute","/dev/null","Permission problem or command is not an executable" | |
| "127","command not found","illegal_command","Possible problem with $PATH or a typo" | |
| "128","Invalid argument to exit","exit 3.14159","exit takes only integer args in the range 0 - 255 (see first footnote)" | |
| "128+n","Fatal error signal 'n'","kill -9","$PPID of script $? returns 137 (128 + 9)" | |
| "130","Script terminated by Control-C","Ctl-C","Control-C is fatal error signal 2, (130 = 128 + 2, see above)" |
| #kudos: Alain Kelder | |
| #+--------------- minute (0-59) | |
| #| +------------- hour (0-23) | |
| #| | +----------- day of month (1-31) | |
| #| | | +--------- month (1-12) | |
| #| | | | +------- day of week (0-7), 0=Sunday | |
| #| | | | | user command | |
| 17 * * * * root cd / && run-parts --report /etc/cron.hourly |