antiblock
Rodnia | Alpha & Omega
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
Batman64

Clear Logs Como Limpar? How Clear ?

Question

Pessoal estou com essa Game Files aqui  >>>  https://mega.nz/#!09cxibLQ!Ie1dMWgWoGdVKqB2L2nhNCvIcPuwcPlzX0ZWmlszDqA    

  Mas nao consigo achar os comandos para limpar Os Logs do servidor dos canal e da Sysserr alguem pode me ajudar eu fico grato !!!

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

WinScp/Filezilla/OutroQualquerPoisNãoInteressa   -->  Ir até à localização das files

 

Selecionar os ficheiros syserr, syslog

 

Carregar em delete ou clique direito neles e eliminar.

 

 

Podes também criar um ficheiro sh para fazer isso automaticamente.

 

Por exemplo, cria um ficheiro chamado clear.sh em cada core com o seguinte conteúdo:

#!/bin/sh
rm -fr log/*
if [ -r autorun.log ]; then rm autorun.log; fi
if [ -r PTS ]; then rm PTS; fi
if [ -r syslog ]; then rm syslog; fi
if [ -r syserr ]; then rm syserr; fi
if [ -r stdout ]; then rm stdout; fi
if [ -r game.core ]; then rm game.core; fi
if [ -r VERSION.txt ]; then rm VERSION.txt; fi
if [ -r DEV_LOG.log ]; then rm DEV_LOG.log; fi
if [ -r mob_count ]; then rm mob_count; fi
if [ -r memory_usage_info.txt ]; then rm memory_usage_info.txt; fi
if [ -r packet_info.txt ]; then rm packet_info.txt; fi
if [ -r p2p_packet_info.txt ]; then rm p2p_packet_info.txt; fi
if [ -r udp_packet_info.txt ]; then rm udp_packet_info.txt; fi
if [ -r ProfileLog ]; then rm ProfileLog; fi
if [ -r pid.game ]; then rm pid.game; fi
if [ -r pid ]; then rm pid; fi

 

Depois junto ao teu ficheiro de ligar e desligar o servidor (start.sh é o nome mais comum), crias um novo ficheiro chamado:

 

apagar.sh

 

Nesse ficheiro, invocas todos os clear.sh que colocas-te em cada pasta do jogo.

Exemplo:

 

#!/bin/sh

ROOT=$PWD

#Apagar log db
cd $ROOT/db && sh clear.sh && cd ..

#Apagar log auth
cd $ROOT/auth && sh clear.sh && cd ..

#Apagar log channel1
cd $ROOT/channel1/first && sh clear.sh
cd $ROOT/channel1/game1 && sh clear.sh
cd $ROOT/channel1/game2 && sh clear.sh

#Apagar log channel2
cd $ROOT/channel2/first && sh clear.sh
cd $ROOT/channel2/game1 && sh clear.sh
cd $ROOT/channel2/game2 && sh clear.sh

#Apagar log channel3
cd $ROOT/channel3/first && sh clear.sh
cd $ROOT/channel3/game1 && sh clear.sh
cd $ROOT/channel3/game2 && sh clear.sh

#Apagar log channel3
cd $ROOT/channel4/first && sh clear.sh
cd $ROOT/channel4/game1 && sh clear.sh
cd $ROOT/channel4/game2 && sh clear.sh

#Apagar log game99
cd $ROOT/game99 && sh clear.sh

 

Caso seja necessário, dá permissão 777 aos ficheiros.

Ou simplesmente corre o seguinte comando:

 

chmod -R 777 /localização/das/tuas/files

 

Depois para limpares os logs, fazes o seguinte:

 

cd /localização/das/tuas/files && sh apagar.sh

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this