Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysstat init file is heavily broken #25556

Open
EugeneTM opened this issue Dec 15, 2024 · 0 comments
Open

sysstat init file is heavily broken #25556

EugeneTM opened this issue Dec 15, 2024 · 0 comments

Comments

@EugeneTM
Copy link

EugeneTM commented Dec 15, 2024

Maintainer: @neheb @krant @ratkaj
Environment: x86_64 23.05.5 / 24.10.0-rc2

Description:

Init file is broken. https://github.com/openwrt/packages/blob/master/utils/sysstat/files/sysstat.init

  1. Must use /var/log/sa instead of /var/log/sysstat for compatibility with sar hardcoded value /var/log/sa.
  2. Line 26 [ -d /var/log/sysstat ] || mkdir -p /var/log/sysstat must use a non hardcoded variable $sa_dir.
  3. Line 37 procd_set_param command $PROG -S DISK -F -L - does not run:
# /usr/lib/sysstat/sadc -S DISK -F -L -
Cannot open /var/log/sa/sa15: No such file or directory

It has to include $sa_dir variable and do not include -, like this may be:

/usr/lib/sysstat/sadc -S DISK -F -L 1 $sa_dir

Also it has to include an interval variable, from config file possibly.

  1. Lines 28-34:
{
		echo "HISTORY=$log_history"
		echo "COMPRESSAFTER=$compressafter"
		echo "SADC_OPTIONS=\"$sadc_options\""
		echo "ZIP=\"$zip\""
		echo "ENABLED=\"$enabled\""
	} > $SYSSTAT_CFG

The config file is getting overwritten every time and thus truncated to a limited number of parameters, why?

Currently service starts but does not work:

# /etc/init.d/sysstat status
running
# service |grep sysstat
/etc/init.d/sysstat           	   enabled	   stopped

Cannot figure out how to fix it by myself properly for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant