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
# Kustomize based apply workflow. Requires jq, yq, kubectl, kustomize, mustache. | |
# | |
# Expected variables | |
# - namespace Namespace for all resources. | |
# - release A unique name to give to this collection of manifests. | |
# - revision Release revision. | |
# - images Image replacements. | |
# - variables Variable replacements. | |
# | |
# Example inputs: |
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
--- | |
- name: test if grub configured for noop i/o scheduler | |
command: egrep -q 'elevator=noop' /boot/grub2/grub.cfg | |
register: grub | |
changed_when: no | |
failed_when: grub_test.rc == 2 | |
- name: configure grub for noop i/o scheduler | |
sudo: yes | |
command: grubby --update-kernel=ALL --args=elevator=noop |
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
## Slow requests grouped by function call | |
cat /var/log/php-fpm/www-slow.log | grep -A 1 script_filename | \ | |
grep -v script_filename | grep -v -e "--" | cut -c 22- | sort | uniq -c | sort -nr | |
## Slow requests grouped by minute | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | \ | |
cut -d' ' -f2 | sort | cut -d: -f1,2 | uniq -c | |
## Top 25 1 minute groups of slow requests | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | cut -d' ' -f2 | \ |