![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| 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 |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
utmp ACCOUNTING
the utmp.h ACCOUNTING macro is set to 9 on my system.
my question is: what "accounting" is it referring to? |
| Forum Sponsor | ||
|
|
|
|||
|
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 */ |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|