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
# tail -f /var/log/apache2/access.log|awk '/ 200 /{gsub(/ 200 /,"\033[1;36m&\033[1;000m");print}' |
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
Esta cofiguração permite acessar tunel vpn estabelecido no linux à partir duma VM Windows com interface bridge. | |
########## NO LINUX ########## | |
# backup do sysctl.conf | |
cp -Rfa /etc/sysctl.conf{,.ori} | |
# habilitando ip forward no sysctl.conf | |
sed -i 's/.*net.ipv4.ip_forward.*/net.ipv4.ip_forward=1/g' /etc/sysctl.conf |
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
tail -n 1000 -f /path/File.log|awk '/INFO/ {print "\033[32m" $0 "\033[39m"} /ERROR/ {print "\033[31m" $0 "\033[39m"} /WARNING/ {print "\033[33m" $0 "\033[39m"}' |
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 | |
# | |
# GerenciamentoDRM.sh | |
# | |
# Autor: Aecio Paes Barreto <[email protected]> 13 de marco de 2014. | |
# | |
# Descrição: Gerenciamento de DRM/TSM Server. | |
# | |
# Obs..: Nenhuma. | |
# |
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 | |
echo -e "\033[33;1;34m [*] \033[0m \033[33;1;32m Calculando MaxClients dividindo maior Apache Thread pela memoria livre \033[0m"; | |
if [ -e /etc/debian_version ]; then | |
APACHE="apache2" | |
elif [ -e /etc/redhat-release ]; then | |
APACHE="httpd" | |
fi | |
APACHEMEM=$(ps -aylC $APACHE |grep "$APACHE" |awk '{print $8'} |sort -n |tail -n 1) | |
APACHEMEM=$(expr $APACHEMEM / 1024) | |
SQLMEM=$(ps -aylC mysqld |grep "mysqld" |awk '{print $8'} |sort -n |tail -n 1) |
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 | |
# | |
# AdministradorBackupPG.sh | |
# Autor : Aecio Paes Barreto <[email protected]> | |
# Descricao : Backup PostgreSQL. | |
# Observacao : Nenhuma. | |
# | |
# Versao 1 : Criado o script, 15 de outubro de 2015. | |
# | |
# Versao 2 : <[email protected]>, 27 de outubro 2015. |