This file contains hidden or 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
| yarn application -list -appStates RUNNING | cut -f 2 | sort | uniq -c |
This file contains hidden or 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 | |
| sql_host="" | |
| sql_user="" | |
| sql_passwd="" | |
| sql_db="" | |
| sql_opts="--routines --add-drop-table --add-locks --create-options --single-transaction --disable-keys --extended-insert --quick" | |
| sql_bk_directory="" | |
| sql_bk_password="" |
This file contains hidden or 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
| certbot certonly --manual -d domain.info -d *.domain.info --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory |
This file contains hidden or 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
| Recommended Configurations | |
| This section provides recommended configurations for Background and Fast modes. | |
| The HDFS Balancer can run in either Background or Fast modes. | |
| Background Mode | |
| HDFS Balancer runs as a background process. The cluster serves other jobs and applications at the same time. | |
| Fast Mode | |
| HDFS Balancer runs at maximum (fast) speed. |
This file contains hidden or 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
| #!/usr/bin/env python | |
| from cm_api.api_client import ApiResource | |
| def main(args): | |
| cm_host = get(args, 1, "localhost") | |
| cm_user = get(args, 2, "admin") | |
| cm_pass = get(args, 3, "admin") | |
| api = ApiResource(cm_host, username=cm_user, password=cm_pass) |
This file contains hidden or 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
| tail -f /var/log/nginx/nginx.access.log | cut -d ' ' -f 1 | logtop | |
| Покажет (и будет обновляться в режиме реального времени) что-то вроде: | |
| 3199 elements in 27 seconds (118.48 elements/s) | |
| 1 337 12.48/s 95.65.66.183 | |
| 2 308 11.41/s 122.29.177.10 | |
| 3 304 11.26/s 122.18.251.54 | |
| 4 284 10.52/s 92.98.80.164 | |
| 5 275 10.19/s 188.239.14.134 |
This file contains hidden or 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
| cat log | awk '{print $1}' | sort | uniq -c | awk '{if($1>50){print $1 " " $2}}' | awk '{print $2}' > /tmp/ips |
This file contains hidden or 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 | |
| # | |
| ######################################################################### | |
| #This software code is made available "AS IS" without warranties of any # | |
| #kind. You may copy, display, modify and redistribute the software # | |
| #code either by itself or as incorporated into your code; provided that # | |
| #you do not remove any proprietary notices. Your use of this software # | |
| #code is at your own risk and you waive any claim against Amazon # | |
| #Digital Services, Inc. or its affiliates with respect to your use of # | |
| #this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its # |
This file contains hidden or 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 | |
| # install into /etc/ppp/ip-down | |
| # chmod a+x /etc/ppp/ip-down | |
| source /etc/ppp/ip.config | |
| case "${IPREMOTE}" in | |
| ${MY_IPREMOTE}) | |
| /sbin/route delete ${MY_ROUTE} -interface ${IFNAME} |
This file contains hidden or 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
| sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config && service sshd restart |