Showing System Messages (asg_varlog)
Use this command to show system messages written to message files stored in the /var/log directory on SGMs. The output shows in chronological sequence. Each line shows the SGM that created the log entry.
Syntax
> asg_varlog [-b <sgm_ids>] [-tail <n>] [-f <filter>]
> asg_varlog -h
Parameter
|
Meaning
|
-b < sgm_ids>
|
The SGMs from which to collect /var/log/messages .
Works with SGMs and/or Chassis as specified by <sgm_ids>.
< sgm_ids> can be:
- No <sgm_ids> specified or
all shows all SGMs and Chassis - One SGM
- A comma-separated list of SGMs (
1_1,1_4 ) - A range of SGMs (
1_1-1_4 ) - One Chassis (
Chassis1 or Chassis2 ) - The active Chassis (
chassis_active )
|
-tail < n>
|
Show only last n lines of the log file for each SGM. For example, -tail 3 shows only the last three lines of the specified log file. Default = 10 lines.
|
-f < filter>
|
Word or phrase to use as an output filter. For example, -f ospf shows only OSPF messages.
|
-h
|
Shows command syntax and help information.
|
Example
This example shows messages on Chassis1 containing the word "Restarted".
> asg_varlog -b chassis1 -f Restarted
Feb 5 12:40:07 1_03 Athens-ch01-03 pm[8465]: Restarted /bin/routed[8489], count=1
Feb 5 12:40:09 1_04 Athens-ch01-04 pm[8449]: Restarted /bin/routed[9995], count=1
Feb 5 12:40:09 1_04 Athens-ch01-04 pm[8449]: Restarted /opt/CPsuite-R76/fw1/bin/cmd[11291], count=1
Feb 5 12:40:09 1_04 Athens-ch01-04 pm[8449]: Restarted /usr/libexec/gexecd[11292], count=1
Feb 5 12:40:10 1_03 Athens-ch01-03 pm[8465]: Restarted /usr/libexec/gexecd[9701], count=1
Feb 5 12:40:10 1_03 Athens-ch01-03 pm[8465]: Restarted /bin/routed[11328], count=2
Feb 5 12:40:10 1_05 Athens-ch01-05 pm[8458]: Restarted /bin/routed[9734], count=1
Feb 5 12:40:10 1_05 Athens-ch01-05 pm[8458]: Restarted /usr/libexec/gexecd[11331], count=1
Feb 5 12:40:11 1_01 Athens-ch01-01 pm[8463]: Restarted /bin/routed[12253], count=3
Feb 5 12:40:11 1_04 Athens-ch01-04 pm[8449]: Restarted /bin/routed[11378], count=2
Feb 5 12:40:11 1_04 Athens-ch01-04 pm[8449]: Restarted /opt/CPsuite-R76/fw1/bin/cmd[11379], count=2
|