The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help Needed using utmp file! maverixxx UNIX for Dummies Questions & Answers 1 10-01-2007 06:16 AM
How come nothing is added to utmp in this case? frequency8 High Level Programming 1 07-01-2007 02:21 PM
utmp files Carmen123 AIX 2 12-21-2006 08:55 AM
: /var/adm/utmp exists! dangral SUN Solaris 2 02-27-2004 07:17 AM
SCO utmp file scott_williams1 SCO 1 10-30-2003 06:45 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2005
Registered User
 

Join Date: Mar 2004
Location: Boise, Idaho, United States
Posts: 23
utmp ACCOUNTING

the utmp.h ACCOUNTING macro is set to 9 on my system.

my question is: what "accounting" is it referring to?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-16-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,354
Not sure I understand the question, but accounting is software that records who is using what resources. In the 70's and 80's, a company might have one computer and it was expensive. Accounting was used to distribute the costs to the departments that used it.

See these man pages: acct acctsh acctprc acctcom
Reply With Quote
  #3 (permalink)  
Old 06-17-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,493
The utmp struct (record for utmp) has a field, ut_type. This indicates the kind of information a contains. ut_type can be 10 different values 0 - 9.

The defines in utmp.h simply let you use a meaningful word instead of a not-so-meaningful number to find out what type of utmp record you have read.

Code:
#define EMPTY           0         /* null record */
#define RUN_LVL         1         
#define BOOT_TIME       2      /* part of boot */
#define OLD_TIME        3       
#define NEW_TIME        4
#define INIT_PROCESS    5       /* Process spawned by "init" */
#define LOGIN_PROCESS   6       /* A "getty" process waiting for login */
#define USER_PROCESS    7       /* A user process */
#define DEAD_PROCESS    8       
#define ACCOUNTING      9        /* an accounting record */
#define UTMAXTYPE       ACCOUNTING   /* Largest legal value of ut_type */
The fact that ACCOUNTING has a value of nine makes no difference. A lot systems have it se like that.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0