Monday, March 15, 2010

A quick way of navigating to WebSphere logs

A quick way of navigating to WebSphere logs. If you are using the bash as a shell then you know about the tab key to auto complete, however in the WebSphere file system there are many subfolders within subfolders to get to the logs. To speed up having to tab through folders you can go direct using a UNIX alias as a shortcut.alias, unaliasAssign a name or an abbreviated name that makes sense or is shorter for a command.Description:alias Lists the aliases that are currently defined. alias "dir=ls" Creates an alias. dir will output the same contents as the ls command. unalias name Removes an alias. unalias dir Example:in my .bash_profile I have created two lines as follows:alias dlogs='ls -ltr /apps/was/ws61/profiles/dmgr/logs'alias glogs='cd /apps/was/ws61/profiles/dmgr/logs'Demo:To list deployment manager logs[root@websphere ~]# dlogstotal 2076-rw-r--r-- 1 root root 508 Oct 14 16:09 AboutThisProfile.txt-rw-r--r-- 1 root root 2561 Dec 15 12:59 iscinstall.log-rw-r--r-- 1 root root 0 Dec 15 15:03 wsadmin.valout-rw-r--r-- 1 root root 6635 Dec 15 15:03 wsadmin.traceoutdrwxr-xr-x 2 root root 4096 Dec 15 22:22 dmgrdrwxr-xr-x 2 root root 4096 Jan 28 21:59 ffdc-rw-r--r-- 1 root root 2097152 Jan 28 22:01 activity.logTo go to deployment logs[root@websphere ~]# glogs[root@websphere logs]#

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.