echo 'flush_all' | nc localhost 11211
Wednesday, August 26, 2015
HowTo: Flush Contents Of a Memcached Server Using Command Line
sudo service apache2 reload && sudo service apache2 restart && sudo service mysql reload && sudo service mysql restart
sudo service apache2 reload && sudo service apache2 restart && sudo service mysql reload && sudo service mysql restart && sudo service memcached restart
Tuesday, August 25, 2015
Truncate logs
truncate logfile --size 0
For the entire file system:
find / -type f -name "*.log" -exec truncate --size 0 {} +
Mysql
SET GLOBAL slow_launch_time = 1;
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL log_queries_not_using_indexes = 'ON';
SET GLOBAL slow_query_log_file ='/var/lib/mysql/slow-query-log.log';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE '%slow%';
#FLUSH LOGS;
SHOW GLOBAL STATUS LIKE 'Connections';
SHOW GLOBAL STATUS LIKE 'Threads_created';
SHOW GLOBAL STATUS LIKE 'Max_used_connections';
#Threads_created / Connections > 0.01
#increase thread_cache_size where thread_cache_size > Max_used_connections
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL log_queries_not_using_indexes = 'ON';
SET GLOBAL slow_query_log_file ='/var/lib/mysql/slow-query-log.log';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE '%slow%';
#FLUSH LOGS;
SHOW GLOBAL STATUS LIKE 'Connections';
SHOW GLOBAL STATUS LIKE 'Threads_created';
SHOW GLOBAL STATUS LIKE 'Max_used_connections';
#Threads_created / Connections > 0.01
#increase thread_cache_size where thread_cache_size > Max_used_connections
Subscribe to:
Posts (Atom)
What's the quickest way to find duplicated files?
find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD fdupes -r / linux_czkawka_gui.AppImage
-
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...
-
Known Issues Firefox 3.5 will only support color profiles as specified by ICC v2, later versions will add su...