![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 | 2 | 11-11-2008 06:55 PM |
| How come nothing is added to utmp in this case? | frequency8 | High Level Programming | 1 | 07-01-2007 06:21 PM |
| utmp files | Carmen123 | AIX | 2 | 12-21-2006 12:55 PM |
| : /var/adm/utmp exists! | dangral | SUN Solaris | 2 | 02-27-2004 11:17 AM |
| SCO utmp file | scott_williams1 | SCO | 1 | 10-30-2003 10:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|