Add admin api to return sys config info (#12988)

The intention is to list values of sys config that can potentially
impact the performance of minio.

At present, it will return max value configured for rlimit

Signed-off-by: Shireesh Anjal <shireesh@minio.io>

Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
Shireesh Anjal
2021-08-25 05:39:37 +05:30
committed by GitHub
parent fecb1b0489
commit ce05e67a0c
7 changed files with 81 additions and 7 deletions

View File

@@ -411,7 +411,18 @@ func (client *peerRESTClient) GetSELinuxInfo(ctx context.Context) (info madmin.S
return info, err
}
// GetSysErrors - fetch memory information for a remote node.
// GetSysConfig - fetch sys config for a remote node.
func (client *peerRESTClient) GetSysConfig(ctx context.Context) (info madmin.SysConfig, err error) {
respBody, err := client.callWithContext(ctx, peerRESTMethodSysConfig, nil, nil, -1)
if err != nil {
return
}
defer http.DrainBody(respBody)
err = gob.NewDecoder(respBody).Decode(&info)
return info, err
}
// GetSysErrors - fetch sys errors for a remote node.
func (client *peerRESTClient) GetSysErrors(ctx context.Context) (info madmin.SysErrors, err error) {
respBody, err := client.callWithContext(ctx, peerRESTMethodSysErrors, nil, nil, -1)
if err != nil {