QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
How to read the accounting file, "/etc/acclog" |
Ref. No. |
QNX.000010327 |
Category(ies) |
Utilities, Configuration |
Issue |
How is the /etc/acclog file interpreted?
|
Solution |
Each record in the /etc/acclog file is of the form: tttttttttt cc data... where tttttttttt is the time in seconds since 1970 (in decimal). This is always followed by a single space. The time is followed by a two-character code cc. This code is then followed by a space and data specific to each code. Each line is terminated by a newline character.
A typical accounting file might look like this:
670464500 TS //1/dev/ser1 modem -b 19200 -L 670464545 MO //1/dev/ser1 2400 670464550 LO //1/dev/ser1 100 101 steve 670465824 TS //1/dev/ser1 modem -b 19200 -L
This record shows that tinit started a modem program to wait for calls. A call was received and answered at 2400 baud, and user ID steve logged in. Note that the log doesn't show a logout. The logout is inferred, because in the final entry tinit starts another modem program. The total connect time for the user (from successful login) can be calculated like this: 670465824 - 670464550 = 1274 seconds On a busy system, records from many devices will be interspersed throughout the accounting file. In order to match events keyed to each device, you'll find an associated node number that lets you track accounting records for all devices throughout a network in a single logfile.
|
|