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
#!/bin/bash | |
# | |
# create_self_extracting_script.sh <INPUT_FILE> [<OUTPUT_SCRIPT>] | |
# | |
# Creates a self-extracting shell script containing INPUT_FILE as Base64-encoded | |
# bytes. When executed, the script writes INPUT_FILE and restores its permissions. | |
# | |
# (c) Jeff Ward, 2017 | |
# MIT License |
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
log_format logstash_json '{ "@timestamp": "$time_iso8601", ' | |
'"@version": "1", ' | |
'"remote_addr": "$remote_addr", ' | |
'"body_bytes_sent": "$body_bytes_sent", ' | |
'"request_time": "$request_time", ' | |
'"upstream_addr": "$upstream_addr", ' | |
'"upstream_status": "$upstream_status", ' | |
'"upstream_response_time": "$upstream_response_time", ' | |
'"status": "$status", ' | |
'"uri": "$uri", ' |
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
# json-log.conf - log all useful nginx variables in json formatted log | |
# for details about these variables, see http://nginx.org/en/docs/http/ngx_http_core_module.html#variables | |
log_format json-log '{' | |
# $arg_* | |
# $args | |
# $binary_remote_addr | |
'"body_bytes_sent":"$body_bytes_sent",' | |
'"bytes_sent":"$bytes_sent",' | |
'"connection":"$connection",' | |
# $connection_requests |
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
#!/bin/sh | |
set +e | |
declare -i RESULT=0 | |
if [ -z $1 ] ; then | |
echo "Usage $0 <directory to check>" | |
exit 1 | |
fi |
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
## Download latest CentOS 7 x86_64 minimal iso image | |
## Good readings | |
# https://labs.vmware.com/vmtj/methodology-for-performance-analysis-of-vmware-vsphere-under-tier-1-applications | |
# https://labs.vmware.com/vmtj/virtualizing-latency-sensitive-applications-where-does-the-overhead-come-from | |
## Create typical CentOS VM | |
# compatible with 'ESXi 6.0 and later' | |
# set 'Guest OS Family' to 'Linux' | |
# set 'Guest OS Version' to 'CentOS 4/5/6/7 (64 bit)' |