sysstat init file is heavily broken
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
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
- Must use
/var/log/sainstead of/var/log/sysstatfor compatibility with sar hardcoded value/var/log/sa. - Line 26
[ -d /var/log/sysstat ] || mkdir -p /var/log/sysstatmust use a non hardcoded variable$sa_dir. - 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.
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read utils/sysstat/files/sysstat.init and compare its log directory, sadc command, interval, and config-writing behavior with the issue's examples. Reproduce the service and status commands on OpenWrt, then verify that the service uses /var/log/sa, passes the configured interval and directory to sadc, and preserves the required config values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100