The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
while command question zmfcat1 Shell Programming and Scripting 4 05-19-2009 01:13 PM
Question about the PS command Nayas AIX 5 02-22-2008 10:26 AM
cp command Question? deal732 SUN Solaris 1 07-19-2007 11:17 AM
question about command cmackin SUN Solaris 3 06-01-2006 03:11 PM
Question on top command luft UNIX for Dummies Questions & Answers 1 08-05-2005 01:18 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-02-2009
hpg4815 hpg4815 is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 7
ac command question

I found this thread, but it was closed: wtmpx

Computer at hand:
Linux BH087608 2.6.9-78.0.17.ELsmp #1 SMP Thu Mar 5 04:52:17 EST 2009 i686 i686 i386 GNU/Linux
Red Hat Enterprise Linux WS release 4 (Nahant Update 7)
Yes I know its old but this apparently is required.

COMMAND:
ac -p -d -f /var/log/wtmp.1 ( month of sept date 2009 daily logins for all users )

GOAL: To determine how long a user has used this redhat box for the month. This is for billing purposes so we know how much to charge for the use of the instrument.

SITUATION: The duration seems off (basically I have users with log on hours greater than the amount of hours in a month). I'm speculating that its because I have more then one entry for any one particular user when running the who command: After initial login I run the who command:
training :0 Oct 2 08:57
training pts/3 Oct 2 08:57 (:0.0)
After starting a program (name of program is topspin) the "who" command returns another instance of a login. Would this be why my logon hours are greater then they should be?

I'm interested in one of two things: One having the ac command only grab the duration for one instance of the 3 logins. Or using the ac command in correlation with the sa command to give me the duration of time that the topspin program was being used.

Last question, maybe I'm wrong, but what does the login time mean when it reports 1.99 when running the ac command? 2hrs 32mins?

Please help if you can, and thanks in advance.

Last edited by hpg4815; 10-02-2009 at 01:37 PM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0