Step by step approach to find performance bottlenecks in linux operating systems
Oracle Commands
1.Login Putty

2.Type username and password
After successful Login it will show $ prompt
3.Vmstat Command: This command shows Virtual memory status.
Syntax: vmstat ( This command shows only stat ( current) of virtual memory)

Syntax : vmstat 5 (This command shows one stat after every 5 second until Ctrl +c not pressed)
4. The value 5 is time delay we can write vmstat 1 ( this command shows 1 stat after 1 second)
Syntax: vmstat 5 1000 (This command shows one
stat after every 5 seconds before exit it will show 1000 stats)
Here 5 is delay time and 1000 is no of stats.

5.How to save virtual memory stats in csv file
a) Go to the location where you want to save stats of virtual memory
b) Suppose we want to save stats /home/beam-ftp/FTPDIR/ location (NOTE first / before home in Linux represent root directory.)
c) In the $ prompt type cd /home/beam-ftp/FTPDIR/ (After cd space is must)
d) In linux ” >” is used for copy. If file name is already exist then it will overwrite otherwise it will create new file. If you want to append data on existing file then use “>>” this symbol.
Suppose we want to copy virtual memory status in PinlessMobile_5000trans_30min_1sep.csv file on
e) FTPDIR(/home/beam-ftp/FTPDIR/) directory
Goto to $ prompt and type : cd /home/beam-ftp/FTPDIR/

f) Now you are in FTPDIR directory
Now Type: vmstat 5 > PinlessMobile_5000trans_30min_1sep.csv
5. VMSTAT COMMAND EXPLANATION:

This command can be divided into following area:
- Process
- Memory
- Io
- System
- Cpu
Process: This part of command gives information about process. It has two sub part a and b.
a(run queue) : How many process are in processor queue .
The value of a should not be grater then no of processors.
Suppose we are using quad core ( 8 cores) processor the the value of a should not be grater then 8.
If it is then system is cpu bound.
Note: (Ex 1)The CPU values are like 12 ,5 ,8 ,7, 10,6,3,0,7,11,0,1,6,9…………….
In above example the value of CPU is grater then 8(no of cpus) but after 4 -5 intervals and not continuously it means the system is not cpu bound.
Ex 2 : The CPU values are like 15 ,25 ,8 ,17, 10,16,13,7,17,11,0,21,16,19…………….
The above example the value of a are vary high and in maximum times (continuously) 17, 10,16,13
Is grater then 8 in this condition system is CPU bound.
Causes of cpu bound system: before going to solution we should check other related factors.
1 If there are more then one cpu in system then it may possible that one cpu is working and others are not working vice versa.
2 If there is one cpu in with multiple cores it may possible that some cores are working others not.
For checking status of cpu cores use mpstat –P ALL 5 where 5 is time delay.
Solution of CPU bound system: If CPU are working properly and a (run queue) is continuously increasing (more then no of CPU) then add more processor or high capacity processor.

 
 




jeck

thnxs