Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
4fe9cd31
Commit
4fe9cd31
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Check for uncommonly high values on certain parameters.
Refers to
#28
parent
d051b7ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATxCommon/Serializables/ServiceConfig.cs
+13
-0
13 additions, 0 deletions
ATxCommon/Serializables/ServiceConfig.cs
with
13 additions
and
0 deletions
ATxCommon/Serializables/ServiceConfig.cs
+
13
−
0
View file @
4fe9cd31
...
...
@@ -315,6 +315,11 @@ namespace ATxCommon.Serializables
return
string
.
Empty
;
}
void
WarnOnHighValue
(
int
value
,
string
name
,
int
thresh
)
{
if
(
value
>
thresh
)
SubOptimal
(
value
.
ToString
(),
name
,
"value is set very high, please check!"
);
}
void
SubOptimal
(
string
value
,
string
name
,
string
msg
)
{
Log
.
Warn
(
">>> Sub-optimal setting detected: <{0}> [{1}] {2}"
,
name
,
value
,
msg
);
}
...
...
@@ -383,6 +388,14 @@ namespace ATxCommon.Serializables
////////// WEAK CHECKS ON PARAMETERS SETTINGS //////////
// those checks are non-critical and are simply reported to the logs
WarnOnHighValue
(
c
.
ServiceTimer
,
nameof
(
c
.
ServiceTimer
),
10000
);
WarnOnHighValue
(
c
.
MaxCpuUsage
,
nameof
(
c
.
MaxCpuUsage
),
75
);
WarnOnHighValue
(
c
.
MinAvailableMemory
,
nameof
(
c
.
MinAvailableMemory
),
8192
);
WarnOnHighValue
(
c
.
AdminNotificationDelta
,
nameof
(
c
.
AdminNotificationDelta
),
1440
);
WarnOnHighValue
(
c
.
GraceNotificationDelta
,
nameof
(
c
.
GraceNotificationDelta
),
10080
);
WarnOnHighValue
(
c
.
StorageNotificationDelta
,
nameof
(
c
.
StorageNotificationDelta
),
10080
);
WarnOnHighValue
(
c
.
GracePeriod
,
nameof
(
c
.
GracePeriod
),
100
);
if
(!
c
.
DestinationDirectory
.
StartsWith
(
@"\\"
))
SubOptimal
(
c
.
DestinationDirectory
,
"DestinationDirectory"
,
"is not a UNC path!"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment