palace://hidden.fastpalaces.com

Welcome Guest
Register | Log in

Home
 Lost Password
 Member List
 Gallery
 Reviews
 Glossary
 Events
 FAQ

Cool Stuff!
 GoogleMap
 TOPList
 GAMES
 SHOP
 
User Input!
 Submit Link
 Submit Event
 Submit Article

Quick Downloads
 PC 3.6 Client
 PC Client Upgrader
 Mac Client (OsX)
 Mac Client (os9)
 Mac Client fix
 PC Server

Online Guidelines
 What is the Palace
 How to get on Palace
 Picture to Avatar
 Kids Online safety
 Netiquette

for more guides click
manuals



members: 9720
guests online: 57
members online: 0

You are an anonymous user. You can register for free by clicking here




Subscribe to Palace
support Group



Vote for us!


Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Support Topic
Status: Submitted

Author Message
VelvetXOffline
5 Post subject: how to get a dailyserverlog on a unixserver?????????  PostPosted: Feb 15, 2005 - 06:22 AM



Joined: Oct 30, 2004
Posts: 2

Status: Offline
Hi Folks,

lord, i solved the installation of the linux server lately, and it works great too.
but now i have two other questions:

First and most important for me....
how can i set the serverlog to a daily new log, from a unknown reason my server produces onle a pserver.log. but when i dl it and delete it on the server no new one is made. but i want to dl it frequently to safe space.

second.....
i tried to modify the plugall.txt, but what ever i try i always get errors by reloading it. i tried wordpad, notepad and editpad with all kind of settings but nothing works. when my girlfriend does it with editpad there is now error. any idea why?

any idea is welcome...


Vel Sad Question Sad Question
 
 View user's profile Send private message  
Reply with quote Back to top
maartenOffline
Post subject:   PostPosted: Feb 15, 2005 - 12:41 PM



Joined: Oct 20, 2002
Posts: 674
Location: DiGiLaNd
Status: Offline
Hi

Palace has a simple SSH command to switch your Palace Server logs. It is in the same folder as the start Palace: /bin

The command is: ./switch-logs

To get a daily Palace log you need to add this command to your crontab. This is a script demon that runs scripts at certain times set by you. You can have it execute the switch-loga daily, weekly, monthly etc.

Deleting the logs will just stop the logs completely because the server can no longer find the log file it was writing too.

To switch manually just SSH to the bin folder and type ./switch-logs

Crontabs depend on your server but I think the basics are explained in the Palace Linux Server manual.
 
 View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
jon_kOffline
Post subject:   PostPosted: Jun 23, 2005 - 05:03 AM



Joined: Apr 16, 2005
Posts: 45

Status: Offline
You posted this question quite a while ago, and seeing you only have ever done 2 posts -- you're probably never going to come back and figure this out. But oh well; perhaps someone else can benefit my answer.

Firstly, if you have SSH you need to edit your crontab as martyn said.

To do this type in SSH/Telnet type:
VISUAL="nano -bw"; crontab -e

The VISUAL="nano" sets the default editor for your session to nano. That way the crontab editor won't open in VI, which is a complicated text editor which would require a full tutorial here itslef to use.

Then add this following line to the Window that appears:
0 0,12 * * * /home/olympus/pserver9998/bin/switch-log
This will invoke the script twice daily, every 12 hours. If you only want it to do it once daily, remove the ",12" and it will only do it at midnight every day. Oh yeah, and of course -- put the path to your switch-log script! Wink

Then hit CTRL-O to save changes, then CTRL-X to quit nano.

Now, find the ~/palace/bin directory for your server and open up switch-logs in nano. E.G.: jon_k@mepis$ nano switch-logs

Now delete all the lines from this config file by placing your curser at the top line (it starts there by default when you open the editor.) Now hold down CTRL-K to delete all the lines in the file.

Now add the following script instead:
Code:

#!/bin/sh

root=${2:-/home/olympus/pserver9998}
mv $root/logs/pserver.log $root/$instance/logs/pserver---`date +%B-%m-%d-%Y--%I-%M-%p`.log.txt
mv $root/logs/logit.txt $root/$instance/logs/logit---`date +%B-%m-%d-%Y--%I-%M-%p`.log.txt
kill -HUP `cat $root/logs/pserver.pid`

The /home/olympus/palace needs to read the path to your palace folder which has the 'logs' directory in it.

Now, twice daily your logs should be swapped and replaced with a new logfile. You might ask why I wanted you to rewrite your switch logs with my own version; that's because the timestamp in the filename is better.

Check it out:
-bash-2.05b$ ls -a
pserver---April-04-21-2005--12-00-AM.log.txt pserver---May-05-01-2005--12-00-AM.log.txt
pserver---April-04-21-2005--12-00-PM.log.txt pserver---May-05-01-2005--12-00-PM.log.txt
pserver---April-04-22-2005--12-00-AM.log.txt pserver---May-05-02-2005--12-00-AM.log.txt
pserver---April-04-22-2005--12-00-PM.log.txt pserver---May-05-02-2005--12-00-PM.log.txt
pserver---April-04-23-2005--12-00-AM.log.txt pserver---May-05-03-2005--12-00-AM.log.txt
pserver---April-04-23-2005--12-00-PM.log.txt pserver---May-05-03-2005--12-00-PM.log.txt

Easy to read -- and easy to manage. Good luck!
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
©Palaceplanet 2000-2006