Jump to content
  • Create New...

Show All Syserrs in One File

Recommended Posts


I want to release my bash file that generates a all_logs.txt file that contains all syserrs messages from:

  1. All channels and all cores of each of them.
  2. Including game99
  3. Including auth.
  4. Including db.

all_logs.txt will look like this:




There are currently no errors in my server so that is why it is very small and clean, but everything from all syserrs will be there for you waiting to solve it.

I think it is much better instead of going one by one folder to check.

In order to install follow the instructions below.

  1. Create a new file named show_all_syserr.sh in the same directory as your start.sh and/or other bash files.
  2. Open it and write the following code:
rm -f all_logs.txt #Removes old all_logs.txt if already exists.
starting_directory=$PWD #Saves current directory for further use.
for current_directory in */*/ ; do ( #For every directory (2 hops, with that i mean 1 hop is going to channel1, channel2, channel3 etc... and second hop is going into core1, core2, core3 etc... (it does not matter how many channels you have or how many cores you have.)) it will collect syserr file contents and append it to all_logs.txt.
	cd "$current_directory"
	if [ -f syserr ]; then
		echo "*************************" >> $starting_directory/all_logs.txt
		echo "* Logs of $current_directory" >> $starting_directory/all_logs.txt
		echo "*************************" >> $starting_directory/all_logs.txt
		cat syserr >> $starting_directory/all_logs.txt
); done
clear #Cleaning console after job has been done.
if [ -f all_logs.txt ]; then #Checks if there is or not a all_logs.txt created.
	echo -e "\033[32mall_logs.txt created successfully in $starting_directory!\033[0m"
	echo -e "\033[32mServer is error free, none syserr found!\033[0m"

Save, go to console --> sh show_all_syserr.sh --> Wait for it to finish --> You are ready to examine the errors.

  • Love 4
Link to comment
Share on other sites

  • 1 year later...
  • Premium

"I think it is much better instead of going one by one folder to check."


You know you can do this right?


tail -f */*/syserr


Currently working on my FreeBSD blog:

FreeBSD is Fun, practical tutorials and articles

⚠️                Are you under attack?               ⚠️

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.