root pts/7 61.74.95.X Thu Apr 1 17:51 - 19:56 (02:04)
root pts/7 192.168.100.X Thu Apr 1 17:49 - 17:51 (00:01)
root pts/7 61.74.95.X Thu Apr 1 13:23 - 13:33 (00:09)
그러나 logout time에 아래와 같은 기록이 남을 경우도 생긴다.
root pts/1 :0.0 Wed Mar 31 13:45 - down (00:08)
root :0 Wed Mar 31 13:45 - down (00:08)
root pts/0 :0.0 Wed Mar 31 13:56 - crash (20+06:08)
root :0 Wed Mar 31 13:55 - crash (20+06:09)
root pts/0 61.74.95.191 Wed Apr 28 14:50 still logged in
down, crash, still 등등의 각 경우에 대한 설명이다.
내용은 last.c 의 내용을 발췌 하였다.
switch(what) {
case R_CRASH:
sprintf(logouttime, "- crash");
break;
case R_DOWN:
sprintf(logouttime, "- down ");
break;
case R_NOW:
length[0] = 0;
sprintf(logouttime, " still");
sprintf(length, "logged in");
break;
case R_PHANTOM:
length[0] = 0;
sprintf(logouttime, " gone");
sprintf(length, "- no logout");
break;
case R_REBOOT:
logouttime[0] = 0; /* Print machine uptime */
break;
case R_TIMECHANGE:
logouttime[0] = 0;
length[0] = 0;
break;
case R_NORMAL:
break;
/* Types of listing */
#define R_CRASH 1 /* No logout record, system boot in between */
#define R_DOWN 2 /* System brought down in decent way */
#define R_NORMAL 3 /* Normal */
#define R_NOW 4 /* Still logged in */
#define R_REBOOT 5 /* Reboot record. */
#define R_PHANTOM 6 /* No logout record but session is stale. */
#define R_TIMECHANGE 7 /* NEW_TIME or OLD_TIME */



