Jump to content


Server main log is large, how can I limit the size?

Server Log Limit Size

  • Please log in to reply
8 replies to this topic

#1 Ankhor@Perforce

Ankhor@Perforce

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 06 December 2017 - 09:03 PM

Hello,

our server main log is now over 4gb and becomes unhandy..

I know that I can limit the sizes for structured logs and I have already setup that.

But the main log seems not to be affected, it grows and grows.

Any ideas?

Thanks in advance
Alex

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 358 posts

Posted 06 December 2017 - 09:34 PM

A pretty typical practice is to rotate the server log periodically (e.g. as part of your checkpoint process) by moving it into your backup folder along with your checkpoints.

#3 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 100 posts
  • LocationSan Francisco, CA

Posted 06 December 2017 - 09:38 PM

View PostSambwise, on 06 December 2017 - 09:34 PM, said:

A pretty typical practice is to rotate the server log periodically (e.g. as part of your checkpoint process) by moving it into your backup folder along with your checkpoints.

+1 on that. We rotate/rename our main log every day along with the journal rotation, numbering it (the log) the same (as the journal) so we have something to correlate historical logs to.
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com

#4 Ankhor@Perforce

Ankhor@Perforce

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 06 December 2017 - 09:48 PM

Thanks!

So there's no mechanism in the server itself?

I just wanted to be sure..

#5 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2482 posts

Posted 06 December 2017 - 10:15 PM

Originally posted to the perforce-user mailing list by: Michael Mirman


We rotate *all* our logs as sooner or later they all grow to some enormous sizes.
We even rotate broker logs twice a day because they grow amazingly quickly.

--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555

Quote

+1 on that. We rotate/rename our main log every day along with the journal
rotation, numbering it (the log) the same (as the journal) so we have something
to correlate historical logs to.

--
Please click here to see the post in its original format:
  http://forums.perfor...-limit-the-size
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#6 P4Jen

P4Jen

    Advanced Member

  • Staff Moderators
  • 112 posts

Posted 07 December 2017 - 12:47 PM

Hi,

If your server version supports it, you can use the command:
  p4 logrotate

to manage rotation of your logs.

For more information, type:
  p4 help logrotate

Hope this helps,
Jen!


#7 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2482 posts

Posted 07 December 2017 - 03:00 PM

Originally posted to the perforce-user mailing list by: Michael Mirman


From  "p4 help logrotate":
This only applies to structured logs.

--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555

Quote

-----Original Message-----
From: perforce-user [mailto:perforce-user-bounces@perforce.com] On Behalf
Of P4Jen
Sent: Thursday, December 07, 2017 7:50 AM
To: perforce-user@perforce.com
Subject: Re: [p4] Server main log is large, how can I limit the size?

Posted on behalf of forum user 'P4Jen'.

Hi,

If your server version supports it, you can use the command:
  p4 logrotate

to manage rotation of your logs.

For more information, type:
  p4 help logrotate

Hope this helps,
Jen!



--
Please click here to see the post in its original format:
  http://forums.perfor...n-log-is-large-
how-can-i-limit-the-size
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#8 Ankhor@Perforce

Ankhor@Perforce

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 08 December 2017 - 08:39 AM

> This only applies to structured logs.

So sad :)

#9 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 358 posts

Posted 09 December 2017 - 11:16 PM

Add a post-command trigger to "p4 logrotate" that executes "mv $P4LOG $P4LOG.n".  :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users