Machine Administration Guide 2.6
Contents Index PreviousNext

Chapter 4 Command Reference

4.17 prtmsglog (1M)

Name
prtmsglog - Message log display command
Format
/usr/sbin/FJSVmadm/prtmsglog [ -f file ] [-r] [ -s string [ -s string [-a]]] [ -A mmdd[HHMMSS]] [-B mmdd[HHMMSS]] [ -S HHMMSS] [ -E HHMMSS]
Function
The prtmsglog command displays the message log information captured by the operating system.
If the message spans more than one line, the part from the line head to the first colon (:) after the time stamp shall be regarded as one message.
Option
The options are:
-f file
Displays the message log file of the specified file.
-r
Information is displayed in reverse chronological order.
-s string
The line that has the specified string is displayed.
To specify multiple strings, write as -s string -s string.
To display multiple strings in an AND operation, write as -s string -s string -a.
If you do not specify -a, the system displays multiple strings in an OR operation.
-A mmdd[HHMMSS]
Records logged since the date specified in mmdd are displayed.
In cases where HHMMSS is specified, records logged since the time specified in HHMMSS of the day specified in mmdd are displayed.
-B mmdd[HHMMSS]
Records logged prior to the date specified in mmdd are displayed.
In cases where HHMMSS is specified, records logged prior to the time specified in HHMMSS of the day specified in mmdd are displayed.
-S HHMMSS
Records logged from the time specified in HHMMSS until 23:59:59 are displayed.
If -E is specified, records logged from the time specified with -S until the time specified with -E are displayed.
-E HHMMSS
Records logged from 00:00:00 until the time specified in HHMMSS are displayed.
If -S is specified, records logged from the time specified with -S until the time specified with -E are displayed.
Display example
The following example shows a log displayed in reverse chronological order:
# /usr/sbin/FJSVmadm/prtmsglog -r
Oct  7 15:52:41 champ0 unix: WARNING: FJSVscf: cmd buffer full, (10) times repeated
Oct  7 15:52:40 champ0 last message repeated 1 time
Oct  7 15:52:40 champ0 unix: WARNING: FJSVscf: scf cmd (0x51) incomplete
Oct  6 12:52:40 champ0 unix: WARNING: $Q: cannot send command due to SCF busy.
Example of use
The message log is displayed in chronological order.
# /usr/sbin/FJSVmadm/prtmsglog | more

The message log is displayed in reverse chronological order.

# /usr/sbin/FJSVmadm/prtmsglog -r | more

Information including the string "WARNING" is displayed.

# /usr/sbin/FJSVmadm/prtmsglog -s "WARNING"  | more
End status
The end status can be:
0: Normal end
1: Error
File
/var/adm/messages

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2001-2005
All Rights Reserved, Copyright (C) PFU LIMITED 2001-2005