search cancel

How to find latest RmiServer##.log and AgentService##.log files for Master and Agents on Unix/Linux.

book

Article ID: 89755

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

How to find latest RmiServer##.log and AgentService##.log files for Master and Agents on Unix/Linux.

Environment

Release: AAMOS499000-8.0-Automic Applications Manager-OS400 Agent
Component:

Resolution

Question:

When troubleshooting issues that are reproducible, the latest log files are looked at to identify the potential cause of the problem. At times, the log directory has a large number of RmiServer####.log and AgentService###.log files which can make finding the newest file(s) difficult.


Answer:

The first thing is to make sure that the AM environment has been set using $AW_HOME/site/sosite.

. sosite (or . ./sosite)

The commands vary from one *Nix system to another because the 'grep' command has different options available:

LINUX:

ls -At $AW_HOME/log|grep -P 'AgentService[0-9]{10}.log'| head -1

AIX:

ls -At $AW_HOME/log|grep -E 'AgentService[0-9]{10}.log'| head -1

SOLARIS:

No regular expression matching is available with the standard grep in /usr/bin/grep. However, if there is a grep installed in xpg4:

ls -At $AW_HOME/log|/usr/xpg4/bin/grep -P 'AgentService[0-9]{10}.log'

HPUX:

ls -At $AW_HOME/log|grep -E 'AgentService[0-9]{10}.log'| head -1


To find the latest RmiServer###.log file, simply use 'RmiServer[0-9]{10}.log' in place of 'AgentService[0-9]{10}.log'.