StdOut Size Limit

Cross platform (UNIX/Linux) monitoring scenarios often require gathering some information from the monitored system in the form of the output of some shell command or script.

And this makes you wonder what is the size limit for the output? The answer is not easy to find as there is no clear word from Microsoft on it.

I did some research myself on github and I found the maxOutputSize = 60*1024 constant defined in RunAsProvider (SCXCore) https://github.com/Microsoft/SCXcore/blob/master/source/code/providers/support/runasprovider.cpp.

The comment there is “Limit stdout/stderr length to avoid bumping up against OMI’s 64k limit per instance”.

Actually StdOut and StdErr combined are not to exceed the 60K maxOutputSize.

And depending on the agent version, if the limit is exceeded, your monitoring workflow might throw error, go silent or truncate the output to this size limit.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: