Write stop/kill reason to process parser

This commit is contained in:
Ingo Oppermann
2023-07-12 10:48:33 +02:00
parent 0f08480366
commit 72d56be9af
2 changed files with 47 additions and 21 deletions

View File

@@ -30,9 +30,21 @@ type LimitFunc func(cpu float64, memory uint64)
type LimitMode int
func (m LimitMode) String() string {
if m == LimitModeHard {
return "hard"
}
if m == LimitModeSoft {
return "soft"
}
return "undefined"
}
const (
LimitModeHard LimitMode = 0 // Killing the process if either CPU or memory is above the limit (for a certain time)
LimitModeSoft LimitMode = 1 // Throttling the CPU if activated, killing the process if memory is above the limit
LimitModeHard LimitMode = 0 // Killing the process if either CPU or memory is above the limit for a certain time
LimitModeSoft LimitMode = 1 // Throttling the CPU if activated, killing the process if memory is above the limit for a certain time
)
type LimiterConfig struct {