RHEL-6 (1)
KNOW
YOUR SYSTEM-P1
Under "KNOW YOUR SYSTEM"
Under "KNOW YOUR SYSTEM"
§ What is the name of my system?
§ What is the IP of my system?
§ Which OS installed in my system?
§ What is the kernel version of that OS?
§ What is the release version of OS?
§ How much memory installed in my system?
§ How much swap space specified in my system?
§ How to know only about swap space?
§ When I should be alarmed about memory status?
§ Where the swap is mounted?
§ How to check memory status in real time?
§ How much RAM installed and in which slot?
§ How much Ram my MB can support?
§ How to know the info about PCI devices installed in
my system?
§ How to know about the USB devices in my system?
§ How to know about the block devices in my system?
[root@rhel6-test1 ~]# hostname
rhel6-test1
[root@rhel6-test1 ~]# ifconfig -a
bond0
Link encap:Ethernet HWaddr
00:0C:29:32:41:7C
inet addr:192.168.234.200
Bcast:192.168.234.255
Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe32:417c/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST
MTU:1500 Metric:1
RX packets:29518 errors:0 dropped:0 overruns:0 frame:0
TX packets:4932 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9837915 (9.3 MiB) TX
bytes:603117 (588.9 KiB)
[root@rhel6-test1 ~]# uname
Linux
[root@rhel6-test1 ~]# uname -a
Linux rhel6-test1 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64
x86_64 GNU/Linux
OR
[root@rhel6-test1 ~]# uname -or
2.6.32-358.el6.x86_64 GNU/Linux
OR
[root@rhel6-test1 ~]# cat
/proc/version
Linux version 2.6.32-358.el6.x86_64
(mockbuild@x86-022.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red
Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jan 29 11:47:41 EST 2013
[root@rhel6-test1 ~]# cat
/etc/redhat-release
Red Hat Enterprise Linux Server release 6.4
(Santiago)
MEMORY (PHYSICAL &
SWAP):-
[root@rhel6-server ~]# free -m
total used free
shared buffers cached
Mem:
1873 748 1125 0 81 324
-/+ buffers/cache: 341 1531
Swap:
1023 0 1023
[root@rhel6-server ~]# free -mt
total used free
shared buffers cached
Mem:
1873 750
1123 0 83 325
-/+ buffers/cache: 341 1532
Swap:
1023 0 1023
Total:
2897 750 2147
The -/+ buffers/cache line shows how much
memory is used and free from the perspective of the applications.
Expected and harmless behavior:
·
free memory is close
to 0
·
used memory is close
to total
·
available memory (or
"free + buffers/cache") has enough room (let's say, 20%+ of total)
·
swap used does not
change
Warning signs of a genuine low memory
situation that you may want to look into:
·
available memory (or
"free + buffers/cache") is close to zero
·
swap used increases
or fluctuates
[root@rhel6-server ~]# free -s 2
[root@rhel6-server ~]# free -s 5
-c 2
-s 2: in every 2 seconds
-c 2: count to 2, then exit.
[root@rhel6-server ~]# top
top - 09:49:49 up 14 min, 1 user,
load average: 0.03, 0.07, 0.11
Tasks: 119 total, 1 running, 118 sleeping, 0 stopped,
0 zombie
Cpu(s):
2.3%us, 4.7%sy, 0.0%ni, 91.3%id, 1.6%wa,
0.0%hi, 0.1%si, 0.0%st
Mem:
1918656k total, 348368k
used, 1570288k free, 21888k buffers
Swap:
1048568k total, 0k
used, 1048568k free, 145208k cached
[root@rhel6-server ~]# swapon
--summary
Filename Type Size
Used Priority
/dev/sda5 partition 1048568 0 -1
[root@rhel6-server ~]# cat
/proc/swaps
Filename Type Size Used
Priority
/dev/sda5 partition 1048568 0 -1
Now I want to check the memory usage in real
time.
[root@rhel6-server ~]# watch -n 2
free
Every 2.0s: free
Fri Feb 17 05:10:50 2017
total used free
shared buffers cached
Mem:
1918656 767304 1151352 0
84236 332800
-/+ buffers/cache: 350268
1568388
Swap:
1048568 0 1048568
^C
[root@rhel6-server ~]# watch -n 1
vmstat
Every 1.0s: vmstat
Fri Feb 17 05:12:28 2017
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 1151468 84292 332828 0
0 21 7
50 99 0 1
98 1
0
^C
[root@rhel6-server ~]# dmidecode
-t 17
# dmidecode 2.11
SMBIOS 2.4 present.
Handle 0x00E3, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x00E2
Error Information Handle: No Error
Total Width: 32 bits
Data Width: 32 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: RAM slot #0
Bank Locator: RAM slot #0
Type: DRAM
Type Detail: EDO
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
[root@rhel6-server ~]# dmidecode
-t 16
# dmidecode 2.11
SMBIOS 2.4 present.
Handle 0x00E2, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 1 TB
Error Information Handle: Not Provided
Number Of Devices: 64
[root@rhel6-server ~]# cat
/proc/meminfo
PCI DEVICES:-
The lspci command lists out all the pci
buses and details about the devices connected to them. The vga adapter,
graphics card, network adapter, usb ports, sata controllers, etc………
[root@rhel6-server ~]# lspci |more
00:00.0 Host bridge: Intel Corporation
440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation
440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation
82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation
82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation
82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual
Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware
SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic /
Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultr
a320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev
02)
00:15.0 PCI bridge: VMware PCI Express Root
Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root
Port (rev 01)
[root@rhel6-server ~]# lspci -v |
grep -i "eth"
02:01.0 Ethernet controller: Intel
Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:02.0 Ethernet controller: Intel
Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:03.0 Ethernet controller: Intel Corporation
82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:04.0 Ethernet controller: Intel
Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
[root@rhel6-server ~]# lspci -v | grep -i
"scsi"
00:10.0 SCSI storage controller: LSI Logic /
Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
Subsystem: VMware LSI Logic Parallel SCSI Controller
[root@rhel6-server ~]# lspci -v | grep -i
"usb"
02:00.0 USB controller: VMware USB1.1 UHCI
Controller (prog-if 00 [UHCI])
02:06.0 USB controller: VMware USB2 EHCI
Controller (prog-if 20 [EHCI])
Subsystem: VMware USB2 EHCI Controller
USB DEVICES:-
[root@rhel6-server ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux
Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux
Foundation 1.1 root hub
Bus 002 Device 002: ID 0e0f:0003 VMware,
Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware,
Inc. Virtual USB Hub
Bus 002 Device 004: ID 0e0f:0008 VMware,
Inc.
BLOCK DEVICES:-
Here we can also find the info about usb
devices if connected.
[root@rhel6-server ~]# lsblk
NAME
MAJ:MIN RM SIZE RO TYPE
MOUNTPOINT
sr0
11:0 1 3.5G 0
rom /media/RHEL_6.4 x86_64 Disc 1
sda
8:0 0 20G 0
disk
├─sda1
8:1 0 500M 0
part /boot
├─sda2
8:2 0 3G 0
part /opt
├─sda3
8:3 0 1G 0
part /home
├─sda4
8:4 0 1K 0
part
├─sda5
8:5 0 1G 0
part [SWAP]
└─sda6
8:6 0 14.6G 0 part /
No comments:
Post a Comment