Saturday, 27 December 2014

Network Troubleshooting

Network Troubleshooting windows env

open command prompt

#ipconfig

The ipconfig command displays all current TCP/IP network configuration values

It gives you basic information to get your IP address,your routers IP address,
DNS Server IP Address,DHCP Server IP address etc..

Default gateway is router

cls --to clear screen'

#ipconfig/all

#Ping

Allows you to send a signal to another device on the network to see if it is active

Uses the ICMP (Internet Control Message Protocol) to send out an echo request
to the destination device,and gets back an echo response , if the device you are
trying reach of in fact Active.


#ping <routeripaddress> <DNSIPaddress> <www.siteaddress.com>

#Tracert

tracert gives the step-by-step route a packet takes to the destination
you speicfy

So if you send a packet to google.com , before the packet
actually reaches google.com servers,it will go through many diffrent
routers before it finally reaches google.com

You can also use the term HOPS instead of routers.So,if it takes 10
routers to get to google.com, you can instead say: "it took 10 hops
"

#tracert <webaddress.com>

#NSLOOKUP
This command will fetch the DNS records for a given domain name or
IP Address.Remeber , the IP Addresses and domain names are
stored in DNS servers,so the NSLOOKUP command lets you query the DNS Records to gather information

#nslookup <webaddress.com>

---------------------------------
cmd prmpt basic commands
c:\>dir
c:\>cd users
c:\users>cd krishna
c:\users\krishna>dir
c:\users\krishna\pics>dir
c:\users\krishna\pics>pic.jpg
c:\users\krishna\pics>cd..
c:\users\krishna>cd\
c:\>cls
c:\>cd program files
c:\program files>dir
c:\program files>cd internet explorer
c:\programfiles\Internet Explorer>dir
c:\programfiles\internet explorer>iexplore.exe
c:\programfiles\internet explorer>cd\
c:\>color y
c:\>color 1e
c:\>color 0f
c:\>systeminfo
---------------------------------------------------
c:\>whomami
c:\>systeminfo
os name , os version,install date,system boot time
c:\>ipconfig\flushdns
to flush dns
c:\>ping krishna.com -n 10
pings 10 times
c:\>tasklist
c:\Users\krishna\Desktop>mkdir example
c:\users\krishna\Desktop\example>cd ..
c:\users\krishna\desktop>copy text.txt c:\users\krishna\desktop\example
 c:\users\krishna\Desktop\example>del test.txt
c:\users\krishna\Desktop\example>dir
c:\users\krishna\Desktop\example>rename test.txt test1.txt
c:\users\krishna\Desktop\example>notepad test.txt
c:\users\krishna\Desktop\example>tasklist
c:\users\krishna\Desktop\example>taskkill /im notepad.exe

Thursday, 11 December 2014

netstat and nslookup

To check which port is free and which is occupied  :Netstat -a  is the command
Have ip address how to know the server name :nslookup is the command

SAPSPRINT Service for windows environment in SAP

SAPSPRINT Service needs to be installed on printer server on port 515 or 516

Ports in SAP

Dispatcher Port : 3200 to 3299
Message server Port: 3600 to 3699
Gateway Port :3300 to 3399
Secured Dispatcher Port: 4700 to 4799
Secured Gateway: 4800 to 4899

LAN Check by ping in SAP

LAN Check by Ping is used to ping to all the systems in the Network/Landscape .If a user complaints that he could not connect to the server(ping to the desktop).

ST06 is the t-code

Saturday, 6 December 2014

ST22 ABAP Dumps

When ever a SAP Program(ABAP) Program could not be executed due to an error it will be thrown out from the GUI- Screen and dump is recorded in ST22.

ST22 Recovers the following
1.Divide Error I/O
2.Update(Lags in memory)
3.Infinite Loops

1.Time_OUT error :The program require more time than the time defined in rdisp/max_wprun_time
2.Memory related issues with error message PXA,SWAP,PAGE,OUT OF MEMORY. This error requires memory corrections to the parameters.
3.Program Corrections:The problem is with SAP standard program for which SAP provides
a correction through notes(The correction can be applied through SNOTE)
4.Customer defined program :(Y,Z)consumes more memory,endless loops,improper select statements etc.The program needed and to be corrected by developer.
5. En queue Table overflow:SM12
6.Update deactivation
7.Database issues like table space overflow,max-extents reached, archive stuck.
8.Illegal time(Day light Savings) - During day light savings the system date and time has to be changed.Stop the AS and change the date if not,the above errors occurs.

Note:
TSTC:Holds the transaction and program name
TSTCT:Holds the description/text of  a t-code.

SMLG in SAP

Logon Load Balancing SMLG
It is used to route requests to the least loaded instance of that group.

1.Buffers are optimally utilized
2.Load balancing is avoid long queues.
3.Fail over

Mechanism
1.User used SAP GUI -groups option to login
2.Saplogon.ini is used to display the available entries
3.User select the group and click on logon.
4.When the user select the group.It look for sapmsg.ini to identify the message server and etc/services for message server port.saproute.ini,saprfc.ini,sapdoccd.ini(For library),saplogon.ini
5.Message server communicates will all the dispatchers and identifies the least loaded server and mark it as a favorite server in SMLG. The request is routed to the favorite server.
6.The dispatcher process the requests normally.

Profiles in SAP

Startup Profile

Startup profile consists of startup parameters like

Starting Database
Starting Message server
Dispatcher+work
Do not modify these parameters under any circumstances on OS level.

Default Profile

It is used to provide global parameters for all instances, buffer parameters , security parameters(password,user restriction),Message server host,en queue host.

Instance Profile

This is specific to instance configuration such as work process , timeout parameters etc..


Starting Sequence
1. Start up profile is read by the system to start the engine by starting database,message server and dispatcher in central instance.
2. Start up profile is ready by the system to start the engine by starting(Disp+Work) on dialogue instance.
3.There will be only one default profile in the entire system which provides global values.
4.Instance specific profile -This is used to set the instance specific parameters.

Ex:How many profiles available on a system with 10 Dialogue instances

Total =11 (Including Central Instance)
             11X2 per instance (Start+instance)
             22
             22+1 (Default Instance)=23

Profile Types in SAP

1.Default
2.Startup
3.Instance Profile

Friday, 5 December 2014

Default job scheduling

go to sm36
click on "Standard Background Job"
Define Background Job
Click on Default Scheduling

And schedule the BTC Jobs with Default time

1.RSBTCDEL:Used to delete the background jobs ,Reporting structure 'BTC' 'DEL'
2.RSSNAPDEL:Delete the old ABAP Dumps
3.RSPO1041:Delete the old spool logs and files
4.RSMO13002:Delete the old Update requests/logs
5.RSCOLL00:Collects performance info in t-code ST03
6.RSPO1043:Spool reorganization

ORA Errors

Table space Overflow :ORA-1653; ORA-1654
Table space max extent reached :ORA-1631;ORA-1632
Archive Stuck:ORA-225;ORA-272

Setting up Text

Execute -SE61
Document class:General Text
From Document Tab Name:ZLOGIN_SCREEN_INFO create
Type the text -Welcome
Save

T-code to maintain Table Entries

SM30 is the t-code to maintain table entries.

No Restrictions needs to be selected

Client Open and client close

Client Open:
Select the option :Automatic recording f changes
Select :customizing to objects and repository are allowed

Client close
Select:No changes allowed
select:No Customizing to objects and repository are allowed

Saturday, 22 November 2014

File adapter logs in sap

/usr/sap/sid/DVEBMGS00/j2ee/cluster/server0/log/services/com.sap.aii.adapter.file.svc

cp default.*.trc /SID/temp/traces

Ex:
find . -name "*" -exec grep -l 4a7a7004-406a-00bb-e100-80000a2704a2 {} \;
find . -name "*" -exec grep -li B26ED981856C4225163DCE41F54B0BA6 {} \;

Also run the following commands from /usr/sap/SID/J<C>12/j2ee/cluster/server0/log
find . -name "*" -exec grep -li <message id> {} \;
This command will list files with a match for the failed message. Take a bakup of these files as well.


File system full sap in unix AIX

1. Check work directory for core dumps and log files with extension old.

Path : /usr/sap/<SID>/<instance>/work

rm *.old
rm core

2. If you find any huge file other than .old and java core file check the date last updated and nullify that file.

cp /dev/null <file name>

3. Check /usr/sap/<SID>/<instance>/j2ee/cluster/server0  directory for java core files.
If there are 2 nodes then you need you check for server1 also.

4.Check archive directory for old log files. (*.txt and *.zip files)

find /usr/sap/<SID>/<instance>/j2ee/cluster/server0/log/archive -name "*.txt" -mtime +2 | xargs ls
find /usr/sap/<SID>/<instance>/j2ee/cluster/server0/log/archive -name "*.zip" -mtime +2 | xargs ls

remove if found any files from the above command.

find /usr/sap/<SID>/<instance>/j2ee/cluster/server0/log/archive -name "*.txt" -mtime +2 | xargs rm
find /usr/sap/<SID>/<instance>/j2ee/cluster/server0/log/archive -name "*.zip" -mtime +2 | xargs rm


 find . -mtime -7 -type f -size +2000K

If you are unable to free up disk space in dev or qa, you can nullify the traces and close the ticket. Don't ever try this on production.

Example:
cd /usr/sap/SID/DVEBMGS02/j2ee/cluster/server0/log
find . -name "*.trc" -exec cp /dev/null {} \;
find . -name "*.log" -exec cp /dev/null {} \;

find /usr/sap/SID/DVEBMGS02/j2ee/cluster/server0/log/archive -name "*.zip" -mtime +2 | xargs ls
find /usr/sap/SID/DVEBMGS02/j2ee/cluster/server0/log/archive -name "*.zip" -mtime +2 | xargs rm

find /usr/sap/<SID>/<instance>/j2ee/cluster/server0/log/archive -name "*.zip" -mtime +2 | xargs rm

Colon (“:”) commands vi filex

:w
Write to file; defaults to the file name you gave it on invocation. If you didn't give it a file
name on the command line, it will gripe.
:w  filename
Save the file to filename
:q
Quit .In vim ,also exists from help
:q!
 Quit without saving.
:wq
Write to the file and quit (see also “ZZ”).
:r filename
Read in file (handy for “cut and paste” between two different files).
:e
Exit (without saving).
:e!
 Exit immediately, and don't ask about saving.
:d
 Delete the current line.
:h
 Go to online help.
:j
Delete the line below the cursor.
:n
 If you specified multiple files on the command line, go on to edit the next file.
:u
Undo the last operation.
:x
 Quick exit. Saves the file without being asked.
:n
 Go to line number n.
:-n
 Go up n lines.
:+n
 Go down n lines.


Editing files in vi

Backspace
Delete the character before the cursor
Del
Delete the character under the cursor
i
To insert text under the cursor(insert mode)
I
To insert text under the cursor starting from the beginning of the current line(insert mode)
a
Insert starting after current character.

A
Insert starting at the end of the line after the last character.

cc
 Delete the entire line and go into insert mode.

C
 Delete to the end of line and go to insert mode.

cw
Delete the current word and go into insert mode.

Y
Yank (copy current line to buffer). If you give this a number before it, it will “yank” the specified
number of lines after the cursor (including current line the cursor is on). Many commands also
have this enumerated functionality
dd
Delete (cut) the current line. Can be enumerated.
dw
Delete (cut) the current word. Can be enumerated.
D
Delete the current line (But leave the new line)
J
Join the next line with the current line.
o
 Insert after the current line.
O
Insert before the current line.
p
Put (paste) the lines in the buffer (from Y, dd, or x) after the current line. Can be enumerated.
P
 Put (paste) the lines in the buffer before the current line. Can be enumerated.
rc
Overwrite with character c, replace the current character.
R
Change to replace (overwrite) mode.
s
 Delete the current character and go to insert mode.
S
 Delete the current line and go to insert mode.
u
 Undo the last operation.
U
 Switch between undoing and redoing the last edit.
v
Visual: start the selection for a “d” (delete) or “Y” (yank). Type “v”, then move in a direction
using one of the movement keys to see what you have selected.
V
 Visual line: select the current line for delete or Yank.
x
 Delete (cut) the character under the cursor. Can be enumerated.
X
Delete (cut) the character after the cursor. Can be enumerated.
~
 Capitalize the current character.
= =
 Unindent the current line (type the equal sign twice).
.
Repeat the last command.
F1
Display only help

Moving Around in file using in vi mode

You can use a digit (1-9) followed by an “arrow key” to jump that many lines or letters in the direction –in other words , arrow key commands can be enumerated.

Command
Description
h or <-
Cursor left
l or ->
Cursor right
j or

Cursor down
k or                 

Cursor Up
^F or Pagedown
Move down one page
^B or Page Up
Move up one page
^U
Move half a page
^D
Move Down half a page
^E
Move the screen down one line
^Y
Move the screen up one line
+
Go to the beginning of the next line
-
Go to the beginning of the previous line
0(zero)
Go to the beginning of the current line
$
Go to the end of the current line
}
Go to the next blank line
{
Go to the previous
[[
Go to the beginning of the file
]]
Go to the end of the file
‘ ‘
Switch between beginning of file and current line
b
Go back one word or punctuation mark
B
Go back one word ,including punctuation marks
e
Go to the end of the next word ,  or punctuation marks
E
Go to the end of the next word , including punctuation marks
gg
Go to the top of the line
G
Go to the end of the file
^H
Go back to the character, including new lines
H
Go to the top of the current page
^P
Go up one line
L
Go to the bottom of current page
w
Go to the beginning of the next word or punctuation mark
W
Go to the beginning of the next word including punctuation mark
^Z
Suspend vi;use the fg command to resume
ZZ
Save and exit