limpa_cache.1.1.sh
Publicado por matheus ferreira cardoso (última atualização em 26/02/2015)
[ Hits: 2.861 ]
Download 6163.limpa_cache_1.1.sh
Script simples para verificar quantidade total de memória e depois limpar o cache.
#!/bin/bash ################################################################# # sistema - limpeza de memoria cache # # Autor: Matheus Ferreira Cardoso # # Empresa : M-Unix # # Email: munix.root@gmail.com # ################################################################# echo "########################" echo "CALCULANDO MEMORIA TOTAL" echo "########################" sleep 5 dmidecode -t 19 | grep Range > teste.txt cat teste.txt rm -rf teste.txt echo "########################" sleep 5 echo "DESEJA LIMPAR A MEMORIA RAM? [sn] " read RESPOSTA test "$RESPOSTA" = "n" && exit #Limpar o cache da memoria RAM MEM1=`free|awk '/Mem:/ {print int(100*$3/$2)}'` free -m echo "##########################################################################" echo "Memória RAM Usada antes de fazer a limpeza:" $MEM1% echo "##########################################################################" echo " " echo "LIMPANDO MEMORIA --- RAM ---" sleep 3 sync echo 3 > /proc/sys/vm/drop_caches echo "LIMPANDO MEMORIA SWAP..." sleep 4 swapoff -a swapon /dev/sda5 echo "##########################################################################" MEM2=`free|awk '/Mem:/ {print int(100*$3/$2)}'` free -m echo "##########################################################################" echo "Uso de memória RAM após a limpeza:" $MEM2% "Economia de: " `expr $MEM1 - $MEM2`"%" echo "##########################################################################" exit
Script para autenticar Speedy Business
Atualizando o kde para kde3.5.7
Crackear rede WIFI - Script para testes de segurança em redes Wifi - wpa e wpa2 com wordlist
"Mascarando" pseudo-senha digitada pelo usuário
Armazenando a senha de sua carteira Bitcoin de forma segura no Linux
Enviar mensagem ao usuário trabalhando com as opções do php.ini
Meu Fork do Plugin de Integração do CVS para o KDevelop
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Encontre seus arquivos facilmente com o Drill
Mouse Logitech MX Ergo Advanced Wireless Trackball no Linux
Compartilhamento de Rede com samba em modo Público/Anônimo de forma simples, rápido e fácil
Cups: Mapear/listar todas as impressoras de outro Servidor CUPS de forma rápida e fácil
Não consigo instalar o WineHQ no meu notebook vaio FE15 (Debian) (7)