]> jfr.im git - irc.git/blame - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2001/001540.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2001 / 001540.html
CommitLineData
3bd189cb
JR
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3 <HEAD>
4 <TITLE> [IRCServices] Rotate Log function - performance
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Rotate%20Log%20function%20-%20performance&In-Reply-To=LPBBJLDCHCNGAKLLJFKNOEDMCEAA.markh%40eurodltd.co.uk">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="001505.html">
11 <LINK REL="Next" HREF="001545.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Rotate Log function - performance</H1>
15 <B>Ian R. Justman</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Rotate%20Log%20function%20-%20performance&In-Reply-To=LPBBJLDCHCNGAKLLJFKNOEDMCEAA.markh%40eurodltd.co.uk"
17 TITLE="[IRCServices] Rotate Log function - performance">ianj at esper.net
18 </A><BR>
19 <I>Sat Mar 3 02:50:03 PST 2001</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="001505.html">AW: [IRCServices] Rotate Log function - performance
22</A></li>
23 <LI>Next message: <A HREF="001545.html">[IRCServices] Rotate Log function - performance
24</A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#1540">[ date ]</a>
27 <a href="thread.html#1540">[ thread ]</a>
28 <a href="subject.html#1540">[ subject ]</a>
29 <a href="author.html#1540">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33<!--beginarticle-->
34<PRE>On Mon, 26 Feb 2001, Mark Hetherington wrote:
35
36&gt;<i> I am considering adding a rotate log function to services (and to the ircd
37</I>&gt;<i> but that is beyond the scope of this list) which will automatically rotate
38</I>&gt;<i> the log each day at Midnight but am looking for a low/no performance impact
39</I>&gt;<i> determination that Midnight has occured.
40</I>&gt;<i>
41</I>&gt;<i> The daylight build used to have an isMidnight function called in the &quot;main
42</I>&gt;<i> loop&quot; but this rarely succeeded I guess because if Services happened to be
43</I>&gt;<i> idle or very busy at this time, Midnight passed before the isMidnight
44</I>&gt;<i> function activated.
45</I>&gt;<i>
46</I>&gt;<i> Eggdrop has a number of settings for automatic log rotation and after
47</I>&gt;<i> investigation it uses
48</I>&gt;<i>
49</I>&gt;<i> add_hook(HOOK_SECONDLY, (Function) core_secondly);
50</I>&gt;<i>
51</I>&gt;<i> with the per second function checking for Midnight among other things.
52</I>&gt;<i>
53</I>&gt;<i> Having not used this system before I wonder as to what impact on performance
54</I>&gt;<i> this may have on services. If anyone knows much about using per second
55</I>&gt;<i> routines or what impact it might have on services it would be much
56</I>&gt;<i> appreciated.
57</I>
58As has been suggested, use SIGUSR2. Then let Cron deal with the &quot;per
59second&quot; dickering to call a Perl/Python/Script/whatever script you may
60write deal with the actual rotating.
61
62As for precision, does the phrase, &quot;Measure with a micrometer, mark with
63chalk, cut with an axe&quot; mean anything to you? I don't know about you, but
64I frankly don't much care. Just as long as I can move logs out of the way
65and keep my disk space somewhat manageable, that's all I ask.
66
67I was the one who asked for this function. Mainly because it's MUCH
68easier to set up a cron event than to try to remember to get my butt onto
69IRC and issue the rotatelog command.
70
71In fact, many systems use this kind functionality notably with system
72logs, including most Linux distros as well as FreeBSD and possibly the
73other BSDs as well. I figured something like this should be in Services
74because the operating system already has tools which allow for periodic
75scheduling; wny not use them? ;) Plus it's pretty simple to whip up a
76rotating script in Perl or even shell script.
77
78Just my $.02.
79
80--Ian R. Justman, Co-Founder and Postmaster, The EsperNet IRC Network.
81
82-----
83Ian R. Justman (NIC handle IJ12) <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ianj at esper.net</A> (Official EsperNet business)
84Co-Founder and Postmaster, The EsperNet IRC Network
85Server Administrator, chocobo.esper.net &quot;IJ&quot; on IRC
86
87PGP key available upon request, or finger <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ianj at esper.net.</A>
88
89If this message was signed with the Postmaster's key, please finger
90<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">postmaster at esper.net</A> for the Postmaster public key.
91
92Type Bits/KeyID Date User ID
93pub 1024/BAB34B69 1997/11/15 EsperNet Postmaster &lt;<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">postmaster at esper.net</A>&gt;
94 Key fingerprint = 05 BD 7C B5 8E 0B FD EF EE 47 49 C4 96 11 59 75
95
96
97
98</PRE>
99
100<!--endarticle-->
101 <HR>
102 <P><UL>
103 <!--threads-->
104 <LI>Previous message: <A HREF="001505.html">AW: [IRCServices] Rotate Log function - performance
105</A></li>
106 <LI>Next message: <A HREF="001545.html">[IRCServices] Rotate Log function - performance
107</A></li>
108 <LI> <B>Messages sorted by:</B>
109 <a href="date.html#1540">[ date ]</a>
110 <a href="thread.html#1540">[ thread ]</a>
111 <a href="subject.html#1540">[ subject ]</a>
112 <a href="author.html#1540">[ author ]</a>
113 </LI>
114 </UL>
115
116</body></html>