FS#27338 - [sysstat] sadc fails to start in latest release

Attached to Project: Community Packages
Opened by Adrian C. (anrxc) - Wednesday, 30 November 2011, 00:08 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 09 January 2012, 10:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: /etc/rc.d/sysstat start fails to start sadc as a daemon. Sometime a message is seen "flock: unable to acquire lock".


Additional info:
* local/sysstat 10.0.3-1
* /etc/conf.d/sysstat
HISTORY=7
COMPRESSAFTER=10
SADC_OPTIONS=""


Steps to reproduce:
/etc/rc.d/sysstat start


Other issues:
Stop case select in init script seems to do nothing, no stopping of sadc, or reporting to stdout. Why is it even implemented then?
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 09 January 2012, 10:11 GMT
Reason for closing:  Fixed
Comment by Karol Błażewicz (karol) - Sunday, 08 January 2012, 01:00 GMT
From /usr/share/doc/sysstat-10.0.3/FAQ:

2.12. When I launch sadc, I get the error message:
flock: Resource temporarily unavailable

You are launching sadc using -L option. With this option, sadc tries to
get an exclusive lock on the output file. The above error message indicates
that another sadc process was running and had already locked the same output
file. Stop all sadc instances and try again.


Indeed we are using -L option: '/usr/lib/sa/sadc -L -F ${SADC_OPTIONS} -'


[karol@black ~]$ cat /etc/cron.hourly/sysstat
#!/bin/sh
# Run system activity accounting tool every 10 minutes
/usr/lib/sa/sa1 600 6 &

That's why once in a while you get this error message.
Comment by Adrian C. (anrxc) - Sunday, 08 January 2012, 20:42 GMT
I rebooted my Arch Linux server yesterday. The sadc daemon properly started on boot.
Maybe I'd like to see stop() in initscript implemented but that's a feature request.
I'll request closure.
Comment by Karol Błażewicz (karol) - Monday, 09 January 2012, 02:06 GMT
rc.d still doesn't like it:

[karol@black ~]$ sudo rc.d start sysstat
:: Writing SysStat restart record [DONE]
[karol@black ~]$ rc.d list | grep sysstat
[STOPPED][ ] sysstat

I can't get sysstat to show up as [STARTED] but the cronjobs are running fine.
Comment by Sergej Pupykin (sergej) - Monday, 09 January 2012, 10:04 GMT
I added add_daemon and rm_daemon to rc.d script. As I understand stopping sysstat is useless operation.

Loading...