Download presentation
Presentation is loading. Please wait.
1
Linux203Training Module System Mgmt
2
This presentation will cover the following topics
vmstat mpstat lsof uptime uname hostname
3
vmstat vmstat by default will display the memory usage (including swap). $ vmstat procs memory swap io system cpu r b swpd free buff cache si so bi bo in cs us sy id wa st vmstat output contains the following fields: Procs – r: Total number of processes waiting to run Procs – b: Total number of busy processes Memory – swpd: Used virtual memory Memory – free: Free virtual memory Memory – buff: Memory used as buffers Memory – cache: Memory used as cache. Swap – si: Memory swapped from disk (for every second) Swap – so: Memory swapped to disk (for every second) IO – bi: Blocks in. i.e blocks received from device (for every second) IO – bo: Blocks out. i.e blocks sent to the device (for every second) System – in: Interrupts per second System – cs: Context switches CPU – us, sy, id, wa, st: CPU user time, system time, idle time, wait time
4
To execute every 2 seconds for 10 times $ 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 st ..
5
mpstat mpstat – Display basic info
By default mpstat displays CPU statistics $ mpstat Linux CAV14.fc14.x86_64 (cavisson-server-ns1) /01/ _x86_64_ (4 CPU) 02:14:39 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 02:14:39 PM all
6
Option -P ALL, displays all the individual CPUs (or Cores) along with its statistics
$ mpstat -P ALL Linux el6.x86_64 (dev-db) 07/09/2011 _x86_64_ (4 CPU) 10:28:04 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 10:28:04 PM all :28:04 PM :28:04 PM :28:04 PM :28:04 PM
7
lsof List of open files # lsof
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd DIR 8, / init 1 root txt REG 8, /sbin/init init 1 root 0u CHR 1,3 0t /dev/null
8
List opened files under a directory # lsof +D /var/log/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME rsyslogd 488 syslog 1w REG 8, /var/log/syslog rsyslogd 488 syslog 2w REG 8, /var/log/auth.log
9
uptime Displays the total uptime for the computer. $uptime
12:36:49 up 5 days, 21 min, 17 users, load average: 0.00, 0.01, 0.05
10
uname Print name of current system. $]uname -arv
Linux cavisson-server-ns CAV14.fc14.x86_64 #1 SMP Wed Sep 14 20:54:14 IST 2011 x86_64 x86_64 x86_64 GNU/Linux
11
hostname view system name (hostname) or assign a new name to system using hostname command. $]hostname cavisson-server-ns1
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.