Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBranislav Náter
2013-03-05 14:56:04 UTC
accton from psacct pacakge is not able to create log file itself. In RHEL6, this was handeled in init file using touch:
[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
In RHEL7, unit file is IMHO not able to handle this action. And it's also reasonable that utility which want to log into file will create it if it doesn't exist (and append date if it exists). Please modify accton to be able create such a file.
Version-Release number of selected component (if applicable):
RHEL-7.0-20130222.0
psacct-6.5.5-7.el7
Steps to Reproduce:
1. delete default log file (/var/account/pacct
2. systemctl start psacct.service
Actual results:
no logging performed because of missing log file
Expected results:
log file has been created
Verified in job https://beaker.engineering.redhat.com/jobs/468205
Log file has been created.
Redirecting to /bin/systemctl start psacct.service
:: [ PASS ] :: Turn on process accounting
/var/account/pacct
:: [ PASS ] :: Logfile /var/account/pacct has been created
:: [ PASS ] :: run sleep for 2 minutes in background
:: [ PASS ] :: Get PID of previous sleep
:: [ PASS ] :: Wait until previous sleep finished
12000.00
:: [ PASS ] :: Get accounting info
12000.00
:: [ PASS ] :: Verify correct value
'07882ee7-c823-4ccf-b87a-b27fb4932fa3'
Test result: PASS