Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
violethaze74
amazon-ssm-agent
Commits
4404d8d4
Commit
4404d8d4
authored
Jul 22, 2021
by
Vishnu Karthik Ravindran
Committed by
Faho Shubladze
Jul 29, 2021
Browse files
band-aid fix to avoid random window faults
cr:
https://code.amazon.com/reviews/CR-54083211
parent
2d77c32c
Changes
6
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
4404d8d4
...
...
@@ -216,6 +216,8 @@ To set up your own custom configuration for the agent:
*
Default: 7
*
LongRunningWorkerMonitorIntervalSeconds (int)
*
Default: 60
*
GoMaxProcForAgentWorker (int)
*
Default: 0
*
Os - represents os related information, will be logged in reply messages
*
Lang (string)
*
Default: "en-US"
...
...
agent/agent_unix.go
View file @
4404d8d4
...
...
@@ -2,9 +2,18 @@
package
main
import
logger
"github.com/aws/amazon-ssm-agent/agent/log/ssmlog"
import
(
"runtime"
"github.com/aws/amazon-ssm-agent/agent/appconfig"
logger
"github.com/aws/amazon-ssm-agent/agent/log/ssmlog"
)
func
main
()
{
config
,
_
:=
appconfig
.
Config
(
false
)
// will use default when the value is less than one
runtime
.
GOMAXPROCS
(
config
.
Agent
.
GoMaxProcForAgentWorker
)
// initialize logger
log
:=
logger
.
SSMLogger
(
true
)
defer
log
.
Close
()
...
...
agent/agent_windows.go
View file @
4404d8d4
...
...
@@ -3,6 +3,9 @@
package
main
import
(
"runtime"
"github.com/aws/amazon-ssm-agent/agent/appconfig"
"github.com/aws/amazon-ssm-agent/agent/log/ssmlog"
"github.com/aws/amazon-ssm-agent/agent/longrunning/plugin/cloudwatch"
)
...
...
@@ -11,6 +14,10 @@ const serviceName = "AmazonSSMAgent"
const
imageStateComplete
=
"IMAGE_STATE_COMPLETE"
func
main
()
{
config
,
_
:=
appconfig
.
Config
(
false
)
// will use default when the value is less than one
runtime
.
GOMAXPROCS
(
config
.
Agent
.
GoMaxProcForAgentWorker
)
// initialize logger
log
:=
ssmlog
.
SSMLogger
(
true
)
defer
log
.
Close
()
...
...
agent/appconfig/appconfig.go
View file @
4404d8d4
...
...
@@ -127,6 +127,7 @@ func DefaultConfig() SsmagentConfig {
AuditExpirationDay
:
DefaultAuditExpirationDay
,
LongRunningWorkerMonitorIntervalSeconds
:
defaultLongRunningWorkerMonitorIntervalSeconds
,
ForceFileIPC
:
false
,
GoMaxProcForAgentWorker
:
0
,
}
var
os
=
OsInfo
{
Lang
:
"en-US"
,
...
...
agent/appconfig/appconfig_parser.go
View file @
4404d8d4
...
...
@@ -17,6 +17,7 @@ package appconfig
import
(
"log"
"runtime"
)
//func parser(config *T) {
...
...
@@ -45,6 +46,11 @@ func parser(config *SsmagentConfig) {
DefaultSsmSelfUpdateFrequencyDaysMin
,
DefaultSsmSelfUpdateFrequencyDaysMax
,
DefaultSsmSelfUpdateFrequencyDays
)
config
.
Agent
.
GoMaxProcForAgentWorker
=
getNumericValue
(
config
.
Agent
.
GoMaxProcForAgentWorker
,
1
,
runtime
.
NumCPU
(),
0
)
config
.
Agent
.
AuditExpirationDay
=
getNumericValue
(
config
.
Agent
.
AuditExpirationDay
,
DefaultAuditExpirationDayMin
,
...
...
agent/appconfig/contracts.go
View file @
4404d8d4
...
...
@@ -68,6 +68,8 @@ type AgentInfo struct {
LongRunningWorkerMonitorIntervalSeconds
int
AuditExpirationDay
int
ForceFileIPC
bool
// denotes GOMAXPROCS value for legacy agent worker
GoMaxProcForAgentWorker
int
}
// MgsConfig represents configuration for Message Gateway service
...
...
Write
Preview
Supports
Markdown
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