In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Saturday, August 8, 2009

important linux commands

  1. Command to Check the RAM Size

ORACLE:/home/oracle>free -m
total used free shared buffers cached
Mem: 998 976 22 0 56 540
-/+ buffers/cache: 379 619
Swap: 4502 77 4425

ORACLE:/home/oracle>dmesg | grep RAM
BIOS-provided physical RAM map:
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize

ORACLE:/home/oracle>vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 78976 27396 57228 547856 0 0 16 32 575 359 3 0 97 0

ORACLE:/home/oracle>vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 78976 30396 58040 543516 0 0 16 32 575 357 3 0 97 0
0 0 78976 30252 58040 543516 0 0 0 0 1014 218 0 0 100 0
0 0 78976 30252 58040 543516 0 0 0 24 1016 171 0 0 100 0
0 0 78976 30252 58048 543508 0 0 0 166 1038 200 0 0 100 0
0 0 78976 30252 58048 543508 0 0 0 0 1012 184 0 0 99 0
0 0 78976 30252 58048 543508 0 0 0 24 1014 201 0 0 100 0
0 0 78976 30252 58052 543504 0 0 0 30 1015 194 0 0 100 0
0 0 78976 30316 58052 543764 0 0 0 48 1021 181 0 0 100 0
0 0 78976 30252 58060 543756 0 0 0 32 1015 198 1 0 100 0
0 0 78976 30252 58068 543748 0 0 0 32 1015 213 0 0 100 0

and top command also shows up free space

2.to check free disk space
ORACLE:/home/oracle>df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 20161172 7177644 11959388 38% /
/dev/sda3 50394996 4415128 43419912 10% /d01
/dev/sda2 50394996 1476324 46358716 4% /d02
/dev/sda6 28344028 77888 26826316 1% /d03
none 511344 0 511344 0% /dev/shm

ORACLE:/home/oracle>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 6.9G 12G 38% /
/dev/sda3 49G 4.3G 42G 10% /d01
/dev/sda2 49G 1.5G 45G 4% /d02
/dev/sda6 28G 77M 26G 1% /d03
none 500M 0 500M 0% /dev/shm

3.uptime - Tell how long the system has been running.

ORACLE:/home/oracle>uptime
18:38:23 up 7:40, 9 users, load average: 0.28, 0.13, 0.10


4.Display Number of CPUs in Linux
To see the number of CPUs on a Linux server, you can cat the /proc/cpuinfo file.
cat /proc/cpuinfo grep processor

ORACLE:/home/oracle>cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Intel(R) Core(TM)2 Duo CPU E8200 @ 2.66GHz
stepping : 6
cpu MHz : 2666.830
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl est tm2 xtpr
bogomips : 5336.09

scp secure copy

ORACLE:/home/oracle>scp $ORACLE_HOME/dbs/initstby.ora oracle@10.11.12.7:/db/oracle/product/10.2.0/dbs/initstby.ora
oracle@10.11.12.7's password:
initstby.ora 100% 1120 1.1KB/s 00:00





No comments:

free counters
 
Share/Bookmark