Disable System Statistics Reset Service (sysstat)
An XCCDF Rule
Description
The sysstat
service resets various I/O and CPU
performance statistics to zero in order to begin counting from a fresh state
at boot time.
The sysstat
service can be disabled with the following command:
$ sudo systemctl mask --now sysstat.service
Rationale
By default the sysstat
service runs a program at
boot to reset performance statistics. This data can be retrieved using programs such as
sar
and sadc
. While the sysstat
service may provide useful
insight into system operation, through the lens of providing only essential system services,
this service should be disabled.
- ID
- xccdf_org.ssgproject.content_rule_service_sysstat_disabled
- Severity
- Low
- References
- Updated
Remediation - Puppet
include disable_sysstat
class disable_sysstat {
service {'sysstat':
enable => false,
ensure => 'stopped',
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-82388-0
- NIST-800-53-CM-6(a)
Remediation - OS Build Blueprint
[customizations.services]
masked = ["sysstat"]
Remediation - Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
Remediation - script:kickstart
service disable sysstat
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'sysstat.service'
"$SYSTEMCTL_EXEC" disable 'sysstat.service'