a question

Posted by Ithildin on Tue 08 Jun 2004 10:06 PM — 2 posts, 12,968 views.

USA #0
Ok, i'm looking into putting my mud on a server and i've been looking at different ones and such and looking at FAQs. i found this and i want to make sure on how exactly it starts and how i would stop if it happens.

Quote:

New admins generally
don't know how to keep tabs on a MUD, and often times will start the mud, see that it gets
stuck into a loop, panic, and log out, leaving the game to fill up the entire drive.


what would i need to do if this happens and how does it start?

Thanks,
Ithildin
Australia Forum Administrator #1
First, don't panic! ;)

The only way it is likely to "fill up a drive" is if the log file is written to with a great deal of information.

Normally your "startup" script would write to a log file. You could view that by using "tail". Using the -f option (follow) lets you view the data as it is written.

So, say you typed:

tail -f log/mylog.txt

and you saw heaps of things being written, much more than you expect, then you need to kill the process. One way of doing this is to use "ps" to find the process ID, like this:


$ ps aux | grep smaug

nick     30181  0.0  0.8  7584 5424 pts/1    S    07:28   0:00 ../src/smaug
nick     30430  0.0  0.0  3576  632 pts/3    S    11:07   0:00 grep smaug


In this case I am taking the output from "ps" and piping it through grep to narrow it down to the "smaug" entries. One of them (process ID 30430) is the grep command itself, so it follows that the other one (process ID 30181) is the actual SMAUG game (which you can see is running ../src/smaug).

Then type:

kill -9 30181

This kills process 30181 immediately. Then you would investigate why it is in the loop. If it isn't obvious you might use gdb rather than killing it. See my write-up on using gdb elsewhere on this site. In this case you would need to "attach" gdb to that process, eg.

gdb ../src/smaug 30181

Then type Ctrl+C to break into the running process and "bt" to get a backtrace, to see where the loop is.