Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1fd72a78
Commit
1fd72a78
authored
Dec 15, 2015
by
Tim St. Clair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default cAdvisor housekeeping interval to 10s
Change the default interval cAdvisor uses to gather stats to 10 seconds.
parent
afeda35a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
cadvisor_linux.go
pkg/kubelet/cadvisor/cadvisor_linux.go
+10
-0
No files found.
pkg/kubelet/cadvisor/cadvisor_linux.go
View file @
1fd72a78
...
...
@@ -19,6 +19,7 @@ limitations under the License.
package
cadvisor
import
(
"flag"
"fmt"
"net/http"
"regexp"
...
...
@@ -46,8 +47,17 @@ var _ Interface = new(cadvisorClient)
// The amount of time for which to keep stats in memory.
const
statsCacheDuration
=
2
*
time
.
Minute
const
maxHousekeepingInterval
=
15
*
time
.
Second
const
defaultHousekeepingInterval
=
10
*
time
.
Second
const
allowDynamicHousekeeping
=
true
func
init
()
{
// Override the default cAdvisor housekeeping interval.
if
f
:=
flag
.
Lookup
(
"housekeeping_interval"
);
f
!=
nil
{
f
.
DefValue
=
defaultHousekeepingInterval
.
String
()
f
.
Value
.
Set
(
f
.
DefValue
)
}
}
// Creates a cAdvisor and exports its API on the specified port if port > 0.
func
New
(
port
uint
)
(
Interface
,
error
)
{
sysFs
,
err
:=
sysfs
.
NewRealSysFs
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment