Saturday, March 1

SED

sed command examples

When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command.

http://geniusprog.webs.com/apps/forums/topics/show/10121321-how-to-use-sed-command-
$sed 's/.$//' filename
Print file content in reverse order
$ sed -n '1!G;h;$p' thegeekstuff.txt
Add line number for all non-empty-lines in a file
$ sed '/./=' thegeekstuff.txt | sed 'N; s/\n/ /'

SSH

ssh command examples

Login to remote host
ssh -l jsmith remotehost.example.com
Debug ssh client
ssh -v -l jsmith remotehost.example.com
Display ssh client version
$ ssh -V
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2013

FIND

3. find command examples

# find -iname "MyCProgram.c"
Execute commands on files found by the find command
$ find -iname "MyCProgram.c" -exec md5sum {} \;
Find all empty files in home directory
# find ~ -empty

GREP

grep command examples

Search for a given string in a file (case in-sensitive search).
$ grep -i "the" demo_file
Print the matched line, along with the 3 lines after it.
$ grep -A 3 -i "example" demo_text
Search for a given string in all files recursively
$ grep -r "ramesh" *

TAR

tar command examples

Create a new tar archive.
$ tar cvf archive_name.tar dirname/
Extract from an existing tar archive.
$ tar xvf archive_name.tar
View an existing tar archive.
$ tar tvf archive_name.tar

Incident, Change , Problem Management, SLA,

1. What is Incident ticket and which parameters are you used to create it?...
Slo: if any issue occurs in weblogic or in an application, we need to raise an incident to development team.This incident raising can be done by using few tools like remedy, clarify etc... Mostly incident raising will come into picture when you are in production support for an application. Helpdesk team will raise an incident by taking details from customer(users who are using that application).
parameters for incident are error, exact issue and time etc.

2. What is SLA and how many types of SLA's are you using?
Slo:SLA means service level agreement.
Mostly we can say agreement between vendor and client for an issue resolution.
We shouldn't violate the SLA .Not sure about types of SLA.

3. What is route cause analysis and how you can create it?
Slo:if an issue is frequently, we need find out the reason for the issue to avoid in future. This is called Root cause analysis.By checking the logs we can find out the reason.

4. What is change management process how it is do?
Slo: we can describe change management as the application of appropriate planning, tools, and processes to effectively implement change and ensure its successful adoption.

5. What is P1 notifications and P2 notifications?
Slo:if the application is down or impacting more number of users we will raise P1 or P2 depends on the severity ticket and send the notification to the customers. This can be handled by keeping the all the application people in the call. We need to send the notifcation to all the impacted customers for every 15 minutes in case P1 and for P2 30 minutes

6. What is problem management and how is it do?
Slo:Problem Management will also maintain information about problems and the appropriate workarounds and resolutions, so that we can reduce the number and impact of incidents in future.

what is Session Replication



Session Replication is nothing but having the user sessions on two location for high availability.
So when the session gets created on one server which is called primary then it will get copy the sessions to other server which is called secondary, the cookie will have the details about both the primary and secondary session server details,if something happens to primary server then the user requests will be forwarded to secondary server which will become primary and it will copy the session some new secondary server in the cluster.


There are two types of Session Replication in Weblogic Cluster
1. In-Memory replication
2. DB based Session Replication

Sessions replication can be done using memory which can be access very fast.

If you want to see whether session replication enabled and which replication is being used by the app,u need to check the weblogic.xml file of the application.

for example if you see the below line in weblogic.xml

<replicate-if-clustered>true </replicate-if-clustered>
This means in-memory replication is enabled if the application is deployed on a cluster.


In-Memory Replication:
======================
Primary server process the request and choose other server to keep the backup of http session details.
So, the secondary server will only keep the backup, not process the request. The information of  (Replication) will be sent back to browser (cookies). In case, the primary server goes down, the LB ( Load balancer)  will direct to the secondary server ,based upon cookies to process the request from the point where primary server stopped. It is called In-Memory Replication.


DB-based Replication:
=================
Instead of storing http session backup in other managed server , it can be stored in DB. Now, Load Balancer can direct any available server to continue the request, if primary server goes down.
It is called DB based Replication.