solidsnake

How to see the server console

Recommended Posts

Hello,

I have a question when I try to run the server from this command "./mta-server -d"

How to detach or show the server console later and attach it after that ?

Edited by solidsnake

Share this post


Link to post

You can use "screen"
Install on debian: apt-get install screen

 

Edited by Kenix

Share this post


Link to post
20 hours ago, Kenix said:

You can use "screen"
Install on debian: apt-get install screen

 

I know the screen command but I mean through the MTA server itself after launch it by this command "./mta-server -d"

Share this post


Link to post

That's not possible in a comfortable way (if you're looking for an uncomfortable way, search for 'pipes'). However, you can view and follow the logs via:

tail -f /path/to/mta/mods/deathmatch/logs/server.log

In case you want to inject input in your webinterface or something, most language standard libraries offer an API to access stdin/stdout directly.

Share this post


Link to post
2 hours ago, Jusonex said:

That's not possible in a comfortable way (if you're looking for an uncomfortable way, search for 'pipes'). However, you can view and follow the logs via:


tail -f /path/to/mta/mods/deathmatch/logs/server.log

In case you want to inject input in your webinterface or something, most language standard libraries offer an API to access stdin/stdout directly.

Thanks for reply, I'm trying to enter a command to the console to stop/shutdown resource or server in case of stop responding

For example a conflict happened between 2 resources as following:

WARNING: Long execution (XXXXXXXX)
WARNING: Long execution (XXXXXXXXXXXX)
ERROR: XXXXXXXXXXXX/server.lua:xxx: C stack overflow  [DUP x6668]
ERROR: XXXXXXXXXXXX/server.lua:xxx: C stack overflow
[Network] InResultQueue > 200000 msgs. This is due to server overload or script freeze
Temporarily suspending incoming sync packets

And thus the server frozen and stopped responding and the RAM kept increasing over 15 GB, So killing the process is the only option left.

I thought that it will stop when the stack overflow occurred, but unfortunately it kept running.

Edited by solidsnake

Share this post


Link to post

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.