Another Linux Command

1-Check Memory :

[oracle@192 ~]$ free -m

             total       used       free     shared    buffers     cached
Mem:          1010        997         13          0         71        685
-/+ buffers/cache:        240        770
Swap:         2000          0       2000

[oracle@192 ~]$ vmstat

procs ———–memory———- —swap– —–io—- –system– —–cpu——
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0  28820  72248 704336    0    0   117    49 1026  239  3  1 93  3  0

[oracle@192 ~]$ dmesg | grep RAM

BIOS-provided physical RAM map:
hdc: ATAPI 1X DVD-ROM DVD-R-RAM CD-R/RW drive, 32kB Cache, UDMA(33)

Finally : top command that you could use.

2-How Much this Os was running
 
[oracle@192 ~]$ uptime

 23:03:17 up  1:44,  2 users,  load average: 0.04, 0.11, 0.08

3-Check Some Hardware Information

CPU :

[oracle@192 ~]$ cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping        : 2
cpu MHz         : 2261.079
cache size      : 3072 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx rdtscp lm constant_tsc up ida nonstop_tsc pni cx16 popcnt lahf_lm [8]
bogomips        : 4522.15

 Thank you
Osama mustafa

Check memory On Linux

Sometime you as DBA you need to check your memory On Operating System Level, i will give you some command will useful to you :

1-free -m / free -g

m : megabytes
g : gigabytes

              total    used     free   shared  buffers   cached 
Mem: 503 451 52 0 14 293
-/+ buffers/cache: 143 360
Swap: 1027 0 1027

 another example :

free -t -m
       total       used       free     shared    buffers     cached
Mem: 750 625 125 0 35 335
-/+ buffers/cache: 253 496
Swap: 956 0 956
Total: 1707 625 1082
2-vmstat

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 0 131620 35432 341496 0 0 42 82 737 1364 15 3 81 1
 
 
 
 
3-top 
 
 
 

4-gnome-system-monitor
 
 
 
The below Command for clear cache memory in linux 

sync; 
echo 3 > /proc/sys/vm/drop_caches
 you can make it as job in linux save in it crontab 
0 * * * * /root/clearcache.sh
 
Create a file in '/root' called 'clearcache.sh' with the following content:

#!/bin/sh  
sync; echo 3 > /proc/sys/vm/drop_caches
 
  
Thank you 
osama mustafa