Posts

Showing posts with the label Solaris

Do you have 'alias' in your .bash_profile or .bashrc??

Image
Making mistake is human nature but, overcoming that mistake turning to desired outcome is very wise thing. You want to learn about that wise trick? If yes, follow my post details more about my learnings on alias!! In Unix platform there is a file called .profile (some Linux environments it is . bash_profile ). Which executed automatically when you logon to your user, which intern have the environment variables which are required to run your application on WebLogic. For WLA required to setup a standard. profile for his production environment that is for JAVA_HOME, WL_HOME are major some of the environments requires ORA_HOME in this file.   Defining JAVA_HOME, WL_HOME, etc is common thing for any WLA. But your my Smart WLA then you might applying a intersting UNIX command 'alias'. Most of the time we use 'ls' command for listing the files/folders. By mistake you might mistype as 'sl' instead of 'ls'. sometimes feeling hungry!! or thirsty!! and typing...

RegEx for WebLogic Admin

Trick on grep Normally every WebLogic user/Admin knows that "ps -ef|grep java" gives you the WebLogic servers process list in any UNIX or Linux environments. Most of the forums suggesting use "|grep -v" to exclude the "grep line". But, here I don't want to use one more pipe and grep -v option really makes expensive in CPU cycles. Searched for the optimistic solutions and finally found! Two choices using --exclude  and using regex. The exclude options is not available on all UNIX systems. So I've chosen next option. How do you avoid the grep line in the grep command output itself? Here the trick is using the regular expression to workout this requirement. Use your searching pattern any one of the character in [] then it will automatically excludes the grep line from the output. actually it wouldn't get output itself! bash-2.05$ ps -ef |grep jav[a] weblogic   950   934  0   Feb 10 ?        0:06 /usr/local/bea/jdk142_11/bin/java -clie...

Setting up a best login profile on UNIX

Image
Usually when you are working on building the platform for any application, you might be given UNIX (Solaris/Linux/HP-UX/AIX) boxes and new generation with Virtual boxes. which contains nothing you need to do many installations and configurations. To make your administrative task easy and simple we need to setup a fine tuned profile file. This profile file will be holding the multiple environment variables those are reusable when you log-on to UNIX Kernel  Here you can define shell functions or you can define simple single lined aliases that makes lengthy commands set to simple trimmed single letter or meaningful words. What is user SHELL and  its profile association? In your UNIX Kernel when a new user login will check the /etc/passwd file which shell is assigned by the super-user. It will look for the system profile and assign the environment values, then on top of it user profile can be loaded. Hence the variable is defined in system profile can be overridden by u...

Why long way for thread dump on UNIX/Linux machines? Easy Steps!

Image
jps - Java process list : Java Utilitycommand  I was looking for diagnostic ways with freely available tools from JDK then I found the great valuable command tool 'jps'. The jps command can be used with three options(l, v, m). it can work for any Java - JEE Servers such as WebLogic, WebSphere, JBoss, Tomcat. In other words, any app server that uses the latest JDK 5+ version (version 6, 7, 8 also supports). Let me walk-through those interesting options in Win and *nix platforms. Before you execute this command tool, make sure that JAVA_HOME\bin is in the PATH setting. Java Command tool : jps options jps Option : jps -l this -l option will give the full Java package name that invoked the Java process. C:\Users\pavanbsd>jps -l 9116 sun.tools.jps.Jps 8812 weblogic.Server Filtering the weblogic instance with find command on jps will give you the desired outcome. C:\Users\pavanbsd>jps -l |find "weblogic" 8812 weblogic.Server jps -v this -v option is m...

Script for Bouncing a WebLogic instance

In the last post I was made deeper research on getting the process id of all WebLogic instances with a script. After looking to that script, My asked me 'Why don't you try for a script for bouncing a WebLogic instance?'. I thought that's really good idea, this makes WebLogic Admin life more easier, which is very much need for every WebLogic Admin. Let me get all the clues before putting the logic into the script. The bounce script will take the input as WebLogic instance name. Then the script should do search for the corresponding Java Process id of given WebLogic instance. That Java Process ID can be used for finding: 1. Thread dump 2. Domain directory 3. Shutdown instance (kill the process) Above 1, 3 are commonly used commands but 2nd one required when situation like this, on the same machine if there exists multiple WebLogic domain instances then how to find the WebLogic instance started from? Here, I need to find the origin directory of startManaged...

X11 Forwarding in SSH for Solaris and Linux

You might be wonder what is fun in this blog looking for X11 forwarding on Solaris 5.10!! You might be excited to see the beauty of colorful Oracle Fusion Middleware WebLogic 11g installation window when you executable binaries (wls1033_solaris32.bin), You might wish to see Oracle WebLogic domain configuration Wizard (config.sh), Oracle WebLogic Domain Template builder (config_builder.sh), BEA Smart Update (bsu.sh) windows or your Oracle Database 11g while you work on a remote UNIX machines. After spending few hours on the Internet found many blogs written on their experiences, few document on websites, which illustrated about SSH, X11 forwarding in UNIX. I understand that what I need to do? To achieve my objective X11 Forwarding using SSH window, I must have a X emulating software installed on my desktop. you guys have this on your desktop?? If not install Hummingbird Connectivity (Xming is alternative) My experimenting environment is Solaris 10, Oracle WebLogic, SSH ...

Best Practices for WebLogic Environment

Image
Here I am jotting out few interesting Best practices for Oracle WebLogic environments, which I have experienced/encountered hurdles while preparing a WebLogic Domain. To Win this Running race you must overcome these hurdles, the best solutions is remembering all of them now I am sharing with you guys here: 1. Dedicated User and group Oracle WebLogic installation on Solaris machine or Linux or a Windows machine, it is better to have a dedicated user and shared growup where you can install the Middleware components WebLogic, Coherence, WebCenter sites, Content Management etc. provide access to all  so that all other users need not to installing  for each new domain on the same machine. useradd [options] LOGIN Some of important options are: -d home directory -s starting program (shell) -p password -g (primary group assigned to the users) -G (Other groups the user belongs to) -m (Create the user's home directory My experiment: useradd -g wladev -s /bin/bash -p xxxxxx...