Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 186101 Details for
Bug 276061
add load-average limiting to makehistory
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to add -L load-average to makehistory
inn-2.4.3-makehistory-loadavg.patch (text/plain), 2.99 KB, created by
Jonathan Kamens
on 2007-09-04 11:59:27 UTC
(
hide
)
Description:
patch to add -L load-average to makehistory
Filename:
MIME Type:
Creator:
Jonathan Kamens
Created:
2007-09-04 11:59:27 UTC
Size:
2.99 KB
patch
obsolete
>--- expire/makehistory.c.orig 2007-09-04 06:54:52.000000000 -0400 >+++ expire/makehistory.c 2007-09-04 06:56:35.000000000 -0400 >@@ -10,6 +10,8 @@ > #include <errno.h> > #include <pwd.h> > #include <syslog.h> >+#include <stdlib.h> >+#include <unistd.h> > > #include "inn/buffer.h" > #include "inn/history.h" >@@ -23,7 +25,7 @@ > #include "storage.h" > > static const char usage[] = "\ >-Usage: makehistory [-bOIax] [-f file] [-l count] [-s size] [-T tmpdir]\n\ >+Usage: makehistory [-bOIax] [-L load ] [-f file] [-l count] [-s size] [-T tmpdir]\n\ > \n\ > -b delete bad articles from spool\n\ > -e read entire articles to compute proper byte count\n\ >@@ -34,6 +36,7 @@ > -I do not create overview for articles numbered below lowmark\n\ > -l count size of overview updates (default 10000)\n\ > -x don't write history entries\n\ >+ -L load pause when load average exceeds threshold\n\ > -T tmpdir use directory tmpdir for temporary files\n\ > -F fork when writing overview\n"; > >@@ -66,6 +69,7 @@ > FILE *OverTmpFile; > char *OverTmpPath = NULL; > bool NoHistory; >+int LoadAverage = 0; > OVSORTTYPE sorttype; > int RetrMode; > >@@ -792,7 +796,7 @@ > NoHistory = false; > RetrMode = RETR_HEAD; > >- while ((i = getopt(argc, argv, "aebf:Il:OT:xFs:")) != EOF) { >+ while ((i = getopt(argc, argv, "aebf:Il:OT:xL:Fs:")) != EOF) { > switch(i) { > case 'T': > TmpDir = optarg; >@@ -800,6 +804,9 @@ > case 'x': > NoHistory = true; > break; >+ case 'L': >+ LoadAverage = atoi(optarg); >+ break; > case 'a': > AppendMode = true; > break; >@@ -918,6 +925,12 @@ > continue; > } > DoArt(art); >+ if (LoadAverage) { >+ double loadavg; >+ while (getloadavg(&loadavg, 1) > 0 && (int)loadavg >= LoadAverage) { >+ sleep(1); >+ } >+ } > } > > if (!NoHistory) { >--- doc/man/makehistory.8.orig 2007-09-04 06:57:07.000000000 -0400 >+++ doc/man/makehistory.8 2007-09-04 06:59:16.000000000 -0400 >@@ -135,7 +135,7 @@ > .SH "SYNOPSIS" > .IX Header "SYNOPSIS" > \&\fBmakehistory\fR [\fB\-abeFIOx\fR] [\fB\-f\fR \fIfilename\fR] [\fB\-l\fR \fIcount\fR] >-[\fB\-T\fR \fItmpdir\fR] [\fB\-s\fR \fIsize\fR] >+[\fB\-T\fR \fItmpdir\fR] [\fB\-s\fR \fIsize\fR] [\fB\-L\fR \fIload-average\fR] > .SH "DESCRIPTION" > .IX Header "DESCRIPTION" > \&\fBmakehistory\fR rebuilds the \fIhistory\fR\|(5) text file, which contains a list of >@@ -217,6 +217,13 @@ > specifying the size is an optimization that will create a more > efficient database. (The size should be the estimated eventual size > of the \fIhistory\fR file, typically the size of the old file, in lines.) >+.IP "\fB\-L\fR \fIload-average\fR" 4 >+.IX Item "-L load-average" >+Temporarily pause activities if the system load average exceeds the >+specified level. This allows makehistory to run on a system being >+used for other purposes without monopolizing system resources and >+thus making the response time for other applications unacceptably >+slow. > .IP "\fB\-O\fR" 4 > .IX Item "-O" > Create the overview database as well as the history file. Overview
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276061
: 186101