Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Deleting Teamsite Log Files
pranav
Hi,
Teamsite log files are giving me pain as the size is getting bigger and bigger in just few days.What i am thinking is,
schedule
an .ipl script(Lets say run it automatically on sunday).Can we have such an ipl to delete all the logfiles(Specifically the ones which expand exponentially in size) ?
-Pranav
Find more posts tagged with
Comments
stefanmaier
Hi Pranav,
some Logfiles you can't delete while TeamSite is running.
Thread
http://devnet.interwoven.com/forums/cgi-bin/showflat.pl?Cat=&Board=PRODUCTS_TEAMSITE&Number=56216
gives some more information...
Regards
Stefan
pranav
Thnaks stefan for that solution.
But can we do something so that a layman(Who doesn't have knowledge of teamsite) can andle this.I mean can we stop these these services using some shcheduler and then run this ipl file and after that restart the services again.
Am i asking too much from Interwoven .
-Pranav
Migrateduser
I agree with you that something should be packaged with TS, but take a look at the attached. It's currently running in my environment and runs as a nightly batch script. You may prefer to do different things with the log files than I'm doing, but you should get the idea.
Since you didn't tell us what OS you're running on, I'm going to assume Windows, since that's what this script is for!
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
pranav
Hi Dave,
you assumed it rightly, i am working on windows Env.
Rightnow i am just going through the ipl you had attached.I have some confusions regarding this (Sorry !!! i am a java guy not much familiar with advance perl).
I->
When you are stopping and starting the services
::: You have hardcoded the services you have to stop and start , this means incase one of my servies are already down(Lets say Event Subsystem) and our ipl try to stop it.Won't this throw anykind of exception.
2
In the lower part of the code inside foreach loop
.gz
is mentioned why so ?
Thanks in advance.
-Pranav
Migrateduser
Pranav,
Good questions...
1. No, if your service is already down and this script tries to stop it, the script will continue to run. You may want to review the services listed in this script and either add or remove a few to reflect your environment. When I first ran the script in my current environment, one of the services I tried to stop was never running (and, frankly, we don't use it here), so it was throwing warnings. This got annoying, so I just commented it out, which I think still appears as such in the script.
2. I'm compressing each of the log files via gzip, which creates a .gz extension. The reason I'm using the script is because the server simply ran out of disk space and I just got here recently. So, I had to put something together pretty quickly. This script compresses the log files nightly and keeps a 7-day history of them. I'm not saying there's not a better way to do this, but I think it's pretty good and we don't happen to care about performance on this one.
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
Adam Stoller
I haven't worked on Windows for a while - but I believe you could make this a bit more dynamic using the following techniques:
Use
iwgetlocations iwlogs
to get the base directory for the log files
Use
opendir
,
readdir
, and
closedir
to find all the
iw*log
files in that directory and all the
iwui/*log
files in the subdirectory.
Use
net start
by itself and parse the output looking for any string that contains "Interwoven" - which will then give you a list of the service names to use for
net stop
Use the
Archive::Tar
module to tar & gzip old log files -- note - if you're on 6.5 I believe you may need to download and install the latest version of
Archive::Tar
as I believe the one that comes with iwperl doesn't work correctly.
Hope that helps....
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
CrosstabExample.rptdesign
anisha
A little note on the Interwoven services that needs to be stopped and started: Pay attention to the order you want to stop and start these services depending on the iwov products you have on the same system. For example on a 6.5 system, with teamsite and search installed on the same system: Teamsite Index & Search services are dependent on teamsite. So, everytime teamsite is restarted, Index (and hence search) has to be restarted.
skip11
Hi,
You also have to pay attention to stopping and restarting the index and search services
in a particular order. stop search then index, start index then search - at least that has worked
well for me on Solaris.
Regards,
R.Barger
Credit Suisse Group
Zurich, Switzerland
Valentine
cat /dev/null > mylogfile
Will clear out the logfile w/o a need to restart the TS server.
Migrateduser
What if the file is being written to during the execution of that command? It just seems a little risky...
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
lhdavis
If the user you setup the script to runas has access to iwreset, I would recommend using "iwreset -ui stop" and "iwreset -ui start" for the bulk of the Interwoven TeamSite related services.
You still have to net stop and start iwserver and whatever OpenDeploy, DataDeploy, Metatagger, Search, etc services and can follow the suggested format by fish. However, using iwreset -ui has saved us a few commands
Also, you might want to add a validation to your script that all the services are started properly. We still have an issue with multple fcgiwaspc.exe's spawning with iwreset sometimes and have to kill those processes before rotating our logs.
Just my $0.02 (and I think there is a feature request somewhere for log rotation as OOTB functionality - I'll see if I can find the number and you can add your client to the list).
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov
Valentine
well.
I do not think anything will happen, other than contents of the file being discarded.
I haven't tried doing this with TS, but it works fine on the Apache logs.
lhdavis
FR 46053 which supposedly has the following wording:
"We need to ship a log rotation system. Some customers are ending up eith 3 gig iwevents log files. We also have to make it so the server does not have to be shut down to change a log file.
The same has been mentioned as a High Priority request and has been determined as a SHOULD HAVE request."
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov