LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2013, 04:47 PM   #1
ktreadway
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
PATCH: Slackware64 14.1rc1 - acct package


I found an issue in the 'acct' package in Slackware64 14 and it still exists in 14.1rc1. I sent this to Pat a few months ago, but I'm sure he stays plenty busy. Perhaps someone can help both of us out.

The problem is that output from the 'sa' process accounting utility only reports 'inf' and '-nan' in the output instead of the correct numbers/statistics.

Example (unpatched, top 4):
Code:
/usr/bin/sa --user-summary
                                     38998       -nanre       -nancp   -nanavio      3705k 
root                                28768       -nanre       -nancp  -nanavio      2418k 
dovenull                             2716        infre       -nancp  -nanavio      5536k 
vmail                                2695        infre       -nancp  -nanavio      7845k
Example (patched, top 4):
Code:
/usr/bin/sa --user-summary
                                     39607   59486.72re      72.41cp      0avio      3680k 
root                                29372   17591.60re      52.47cp   0avio      2411k 
clamav                                208   22994.61re      19.32cp   0avio     13524k 
dovenull                             2716      50.70re       0.36cp   0avio      5536k
To reproduce:
1) Enable process accounting. (touch /var/log/pacct && chmod 640 /var/log/pacct && /sbin/accton /var/log/pacct)
2) Run a few commands to be logged.
3) Run a report. (/usr/bin/sa --user-summary)

The Debian folks fixed the issue and have released a patch for 6.5.4. I put it and the SlackBuild change into the linked patch file.

If anyone needs reference to the original Debian patch, you can find it here: http://patch-tracker.debian.org/package/acct/6.5.4-2.1 (It's the '581421-sa-hz-division.patch' one.)

Here's the patch: https://www.dropbox.com/s/rkgvnatrwe...rrent.patch.gz

Ken
 
Old 10-23-2013, 05:10 PM   #2
mancha
Member
 
Registered: Aug 2012
Posts: 484

Rep: Reputation: Disabled
BTW, Seems these problems have been fixed in acct-6.6.1.

This requires a slightly different acct.logdir.fhs.diff:

Code:
--- ./configure.ac.orig 2013-10-23
+++ ./configure.ac      2013-10-23
@@ -259,7 +259,7 @@
 #ifndef ACCT_FILE
 #  if defined(__FreeBSD__) || defined(__linux__) \
         || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
-#    define ACCT_FILE "/var/log/account/pacct"
+#    define ACCT_FILE "/var/log/pacct"
 #  else
 #    if defined(__NetBSD__)
 #      define ACCT_FILE "/var/log/account/acct"
@@ -280,7 +280,7 @@
 #ifndef SAVACCT_FILE
 #  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
         || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
-#    define SAVACCT_FILE "/var/log/account/savacct"
+#    define SAVACCT_FILE "/var/log/savacct"
 #  else
 #    if defined(sun) || defined(AMIX)
 #      define SAVACCT_FILE "/var/adm/savacct"
@@ -297,7 +297,7 @@
 #ifndef USRACCT_FILE
 #  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
         || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
-#    define USRACCT_FILE "/var/log/account/usracct"
+#    define USRACCT_FILE "/var/log/usracct"
 #  else
 #    if defined(sun) || defined(AMIX)
 #      define USRACCT_FILE "/var/adm/usracct"
--mancha

Last edited by mancha; 10-23-2013 at 05:14 PM.
 
Old 10-23-2013, 06:38 PM   #3
ktreadway
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
That could be why we still have the older version. More interested in fixing the existing issue rather than debating a last minute update!
 
Old 10-23-2013, 07:04 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 3,141

Rep: Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009Reputation: 10009
The acct-6.6.1 release was screwed up and the tarball is filled with cruft. And it looks like those who have taken it have had to patch against crashes and other bugs.

I'll take a look at the patch.
 
1 members found this post helpful.
Old 10-23-2013, 11:37 PM   #5
mancha
Member
 
Registered: Aug 2012
Posts: 484

Rep: Reputation: Disabled
I see. Pity it's not well-maintained.

--mancha
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Missing package in Slackware64? kikinovak Slackware 2 02-02-2013 02:40 AM
slackware64 13.37 alpine.SlackBuild fails when trying to rebuild package haxwithaxe Slackware 21 10-04-2011 03:44 PM
Hi all! Here first time, made LibreOffice 3.3.0 package (Slackware64 13.1 stable) Luneworm LinuxQuestions.org Member Intro 1 01-26-2011 11:52 AM
[SOLVED] Best package of Openoffice on slackware64 business_kid Slackware 19 06-09-2010 01:35 PM
Building a visualization Package in Slackware64 13 Alexvader Slackware 2 01-25-2010 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration