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.
Bug 918132 - Handle logfile creation in accton utility
Summary: Handle logfile creation in accton utility
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: psacct
Version: 7.0
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jaromír Cápík
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 14:56 UTC by Branislav Náter
Modified: 2016-02-01 01:57 UTC (History)
1 user (show)

Fixed In Version: psacct-6.6.1-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-12 12:18:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Branislav 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

Comment 2 Jaromír Cápík 2013-04-16 11:07:42 UTC
Please, retest with psacct-6.6.1-2

Comment 3 Branislav Náter 2013-08-12 08:48:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.