]>
Commit | Line | Data |
---|---|---|
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 | ><i> I am considering adding a rotate log function to services (and to the ircd | |
37 | </I>><i> but that is beyond the scope of this list) which will automatically rotate | |
38 | </I>><i> the log each day at Midnight but am looking for a low/no performance impact | |
39 | </I>><i> determination that Midnight has occured. | |
40 | </I>><i> | |
41 | </I>><i> The daylight build used to have an isMidnight function called in the "main | |
42 | </I>><i> loop" but this rarely succeeded I guess because if Services happened to be | |
43 | </I>><i> idle or very busy at this time, Midnight passed before the isMidnight | |
44 | </I>><i> function activated. | |
45 | </I>><i> | |
46 | </I>><i> Eggdrop has a number of settings for automatic log rotation and after | |
47 | </I>><i> investigation it uses | |
48 | </I>><i> | |
49 | </I>><i> add_hook(HOOK_SECONDLY, (Function) core_secondly); | |
50 | </I>><i> | |
51 | </I>><i> with the per second function checking for Midnight among other things. | |
52 | </I>><i> | |
53 | </I>><i> Having not used this system before I wonder as to what impact on performance | |
54 | </I>><i> this may have on services. If anyone knows much about using per second | |
55 | </I>><i> routines or what impact it might have on services it would be much | |
56 | </I>><i> appreciated. | |
57 | </I> | |
58 | As has been suggested, use SIGUSR2. Then let Cron deal with the "per | |
59 | second" dickering to call a Perl/Python/Script/whatever script you may | |
60 | write deal with the actual rotating. | |
61 | ||
62 | As for precision, does the phrase, "Measure with a micrometer, mark with | |
63 | chalk, cut with an axe" mean anything to you? I don't know about you, but | |
64 | I frankly don't much care. Just as long as I can move logs out of the way | |
65 | and keep my disk space somewhat manageable, that's all I ask. | |
66 | ||
67 | I was the one who asked for this function. Mainly because it's MUCH | |
68 | easier to set up a cron event than to try to remember to get my butt onto | |
69 | IRC and issue the rotatelog command. | |
70 | ||
71 | In fact, many systems use this kind functionality notably with system | |
72 | logs, including most Linux distros as well as FreeBSD and possibly the | |
73 | other BSDs as well. I figured something like this should be in Services | |
74 | because the operating system already has tools which allow for periodic | |
75 | scheduling; wny not use them? ;) Plus it's pretty simple to whip up a | |
76 | rotating script in Perl or even shell script. | |
77 | ||
78 | Just my $.02. | |
79 | ||
80 | --Ian R. Justman, Co-Founder and Postmaster, The EsperNet IRC Network. | |
81 | ||
82 | ----- | |
83 | Ian R. Justman (NIC handle IJ12) <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ianj at esper.net</A> (Official EsperNet business) | |
84 | Co-Founder and Postmaster, The EsperNet IRC Network | |
85 | Server Administrator, chocobo.esper.net "IJ" on IRC | |
86 | ||
87 | PGP key available upon request, or finger <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ianj at esper.net.</A> | |
88 | ||
89 | If 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 | ||
92 | Type Bits/KeyID Date User ID | |
93 | pub 1024/BAB34B69 1997/11/15 EsperNet Postmaster <<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">postmaster at esper.net</A>> | |
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> |