logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Linux NWNX Setup and Problems

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Themicles



Joined: 23 Jan 2005
Posts: 30
Location: Wolverine Lake, MI

PostPosted: Sat Sep 05, 2009 1:15    Post subject: Linux NWNX Setup and Problems Reply with quote

I'm finally setting up a Linux version of my test server. I aim to test PJ's Linux version of Vaultster as soon as I have the test server running 100% without it.

Running into a few problems though. First, I can't get ODBC logging to do anything. It shows the connect, and that's it. No matter what I set the log level to in the INI. This lack of log output is making it difficult to figure out why the lastlocation system isn't working.

Second... am I missing something to enable log file rotation? If I'm losing that functionality moving to Linux, I'll probably stay with Windows in the end.
_________________
World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Sep 06, 2009 4:47    Post subject: Reply with quote

1. It's "debuglevel" instead of "LogLevel" in Linux (this applies to all Linux plugins).

2. If you're talking about log file rotation into folders by date and time (i.e. yyyy-mm-dd--hh-mm-ss), that's something I added to NWNX2.exe back in the day, and just recently committed to SVN. It probably doesn't exist in Linux right now, but there's no reason it couldn't. Will look at porting that for you.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Sep 06, 2009 5:33    Post subject: Reply with quote

Not thoroughly tested, so I'm not going to commit it yet, but replace nwnx2lib.cpp with http://mercuric.net/nwn/nwnx/nwnx2lib.cpp.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Themicles



Joined: 23 Jan 2005
Posts: 30
Location: Wolverine Lake, MI

PostPosted: Sun Sep 06, 2009 6:34    Post subject: Reply with quote

Log file rotation into numbered folders 1 through 9. This prevents any one log from becoming insanely long, and it makes checking what happened after a crash that much quicker and easier. Dated is nice, but I don't feel it's all that necessary.

As for Debug Level applying to all plugins in Linux, I'll check that out, thanks.
_________________
World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Sep 06, 2009 6:43    Post subject: Reply with quote

Well, dated is what I ported, since it's more useful and just as easy to port Wink

To be more detailed on the debuglevel thing: All Linux plugins use "debuglevel". Some Windows plugins use "debuglevel" (more correct); some use "LogLevel" (older and less correct). Everything should be moved to debuglevel eventually.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
PlasmaJohn



Joined: 04 Mar 2005
Posts: 70
Location: The Garage

PostPosted: Tue Sep 15, 2009 23:35    Post subject: Reply with quote

In my environment, this script is run from within the NWN directory before launching the server.

(Public domain for those keeping track of such things)
Code:
#!/bin/sh

# logrotate
rm -rf ../LOG/log-9
mv ../LOG/log-8 ../LOG/log-9
mv ../LOG/log-7 ../LOG/log-8
mv ../LOG/log-6 ../LOG/log-7
mv ../LOG/log-5 ../LOG/log-6
mv ../LOG/log-4 ../LOG/log-5
mv ../LOG/log-3 ../LOG/log-4
mv ../LOG/log-2 ../LOG/log-3
mv ../LOG/log-1 ../LOG/log-2
mv logs.0 ../LOG/log-1
mkdir logs.0
touch logs.0/nwserverLog1.txt
Back to top
View user's profile Send private message
Themicles



Joined: 23 Jan 2005
Posts: 30
Location: Wolverine Lake, MI

PostPosted: Thu Sep 17, 2009 3:49    Post subject: Reply with quote

Thanks PJ, I'll add that at the beginning of my startup script.
_________________
World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Thu Sep 17, 2009 21:01    Post subject: Reply with quote

PlasmaJohn wrote:
In my environment, this script is run from within the NWN directory before launching the server.

(Public domain for those keeping track of such things)
Code:
#!/bin/sh

# logrotate
rm -rf ../LOG/log-9
mv ../LOG/log-8 ../LOG/log-9
mv ../LOG/log-7 ../LOG/log-8
mv ../LOG/log-6 ../LOG/log-7
mv ../LOG/log-5 ../LOG/log-6
mv ../LOG/log-4 ../LOG/log-5
mv ../LOG/log-3 ../LOG/log-4
mv ../LOG/log-2 ../LOG/log-3
mv ../LOG/log-1 ../LOG/log-2
mv logs.0 ../LOG/log-1
mkdir logs.0
touch logs.0/nwserverLog1.txt


Haven't tested this but... the following should work exactly the same, but with less code.

Code:
#!/bin/sh

# logrotate
rm -rf ../LOG/log-9
mv ../LOG/log-{8,7,6,5,4,3,2,1} ../LOG/log-{9,8,7,6,5,4,3,2}
mv logs.0 ../LOG/log-1
mkdir logs.0
touch logs.0/nwserverLog1.txt


But you could go one step further and keep the logs archived.

Code:
#!/bin/sh

tar -cjf logarchive/logs$(cat logarchive/currdate).tar.bz2 logs.0
echo "$(date "+%Y%m%d%H%M")" > logarchive/currdate
rm -rf logs.0/*
touch logs.0/nwserverLog1.txt


Just create a directory in your NWN base directory called logarchive and put this at the top of your startup script, which should compress your logs into one file with timestamp yyyymmddHHMM in its name, where y is year, m is month, d is day, H is hour and M is minute.
Back to top
View user's profile Send private message
Caldor69



Joined: 09 Dec 2009
Posts: 2

PostPosted: Fri Dec 11, 2009 22:59    Post subject: nwnx linux setup Reply with quote

First of all I want to say that I am a NOOB at this. so please bear with me. I had a server running on a windows server and it was running great with nwnx. Now that I have switched to Linux the server reboot will not work with a crash. I am sure that it is something I do not have setup right but do not now what. can someone help me with what needs to be deleted and installed to make my mod run on a lunix server. Again I am a noob so I do not know much so any help would be GREATLY appreiciated and thanks in advance

Cal
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Dec 12, 2009 3:22    Post subject: Reply with quote

What do you mean by server reboot? Are you using the reset plugin on Windows, or just reloading the mod using scripts, or are you talking about loading the mod for the first time after starting the server?
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Caldor69



Joined: 09 Dec 2009
Posts: 2

PostPosted: Sat Dec 12, 2009 4:14    Post subject: Reply with quote

sorry for lack of detail

On the windows server I was using the shutdown comand in a script. I was using the letoscript to restart the mod at a predetermined time period. That worked great on the windows server. But I am currently using the linux server that I am paying space for and it does not work. I tried to load the linux version ox nwnx but cannot get that to work. I know that it is probably something that I am doing wrong but do not know what
Back to top
View user's profile Send private message
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Fri Apr 02, 2010 14:02    Post subject: Reply with quote

can someone pls help here with profiler plugin?

problem #1: log size
i installed nwnx_easy on my linux server and spot that profiler plugin ignores MaxLogSize parameter specified in the nwnx2.ini file... so whenever i set up to 512 kb.. it exceeds it always. i spot somewhere here that LogLevel is replaced with 'debuglevel'..

question: is there also some replacement for the log size limit parameter? if not, what have i to do to get it limited?and maybe also for other plugins as well...

problem #2: archiving
where exactly should i put this script? at the top of nwnstartup.sh? i taught that there is some built-in feature that keeps folders 1-9 after each new run of nwnx like it is made in win version...

note, im a beginner in linux, pls keep things clear
Back to top
View user's profile Send private message
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Mon Apr 05, 2010 12:18    Post subject: Reply with quote

anyone facing the same problem? pls help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group