- Home /
where is the output log found on a Linux headless server?
I'm running Unity Pro 4.1.3 (Unity editor is on my Windows 7 laptop), and have built a Linux x86_64 architecture binary for use on my Amazon EC2 Fedora 64-bit server.
I've uploaded both the executable (with chmod +x on it so it executes) and the data folder into my home folder. I'm using the following command line to instantiate the server (the server app is called "zone1"):
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ./zone1 -batchmode -nographics
The output is as follows:
Set current directory to /home/ec2-user/unity
Found path: /home/ec2-user/unity/zone1
Mono path[0] = '/home/ec2-user/unity/zone1_Data/Managed'
Mono path[1] = '/home/ec2-user/unity/zone1_Data/Mono'
Mono config path = '/home/ec2-user/unity/zone1_Data/Mono/etc'
/usr/bin/xvfb-run: line 166: 23189 Aborted DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
I've looked in /var/log and found nothing. I've also looked for an output.txt in the zone1_Data folder (as it is when I run the windows version on a windows server). No joy. Is there a log file somewhere that will tell me what is going on, or is it just this console output?
Answer by Arcanor · Jul 18, 2013 at 08:22 PM
After some further investigation, I have some more information, as well as a workaround.
First of all, apparently Unity 4.1 no longer requires the use of xvfb-run. This simplifies the command line somewhat, and probably also eliminates some overhead/dependencies that could cause issues.
Secondly, I've discovered that the linux command line also takes an optional "-logfile " argument (although it is implied that it only works on Windows on http://docs.unity3d.com/Documentation/Manual/CommandLineArguments.html). So I can now work around the original problem and view the logfile as follows:
./zone1 -batchmode -nographics -logfile zone1_output_log.txt
This effectively answers my original question, although I'm still curious as to where the default location of the logfile is in linux. Anyone know?
Answer by GooseSerbus · Nov 07, 2013 at 05:22 PM
You can find the log here:
~/.config/unity3d
Thanks for your answer, but I have no such folder. Also, I am no longer using Fedora, and have switched the server over to Ubuntu. Not sure if that makes a difference.
In any case, I'm able to manually place my log using the '-logfile' argument, so this isn't really an issue.
Odd that it's not there for you as it's there for me on both Debian 7 (wheezy) and Ubuntu 12.04 LTS (Precise Pangolin)
Just to be clear '~' is your home directory and the '.config' folder will be hidden as it beings with a '.'.
Thanks for the clarification, but I'm already aware about '~' being an alias for my home dir, and '.' prefix "hidden" files, being an old school unix ad$$anonymous$$ for 20+ years.
I'm also running 12.04 LTS.
Perhaps it's not there because I'm using the '-logfile' argument. I spent some time modifying my config files to start the server without it, but it didn't create that folder, so I just changed it back.
I'd say just don't worry about this. It's preferable to use a specific logfile location of my choice anyway. It's not worth the effort to troubleshoot.
For some reason this is both true and false. There is a log file there, but it does not contain "all the logs" I don't know why, but if you pass the command line -logfile then you get "all the logs messages"
Your answer
Follow this Question
Related Questions
Running game server on linux server 0 Answers
Render to 'RenderTexture' in 'Headless Mode' 0 Answers
Linux game server 1 Answer
How to start Unity cache server as a service in linux. 0 Answers