System Monitoring

Updated: 2018-11-30

top

Show running processes, memory/cpu usage.

uptime

Show how long it is been running, and load average.

$ uptime
 10:11:46 up 7 days, 17:02,  1 user,  load average: 1.79, 1.86, 1.79

free

Check free memory

$ free
              total        used        free      shared  buff/cache   available
Mem:        5967380     3951608      469008       76044     1546764     1588088
Swap:       6146044      105052     6040992

Human-readable

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           5.7G        3.8G        457M         74M        1.5G        1.5G
Swap:          5.9G        102M        5.8G

vmstat

Virtual memory stats

$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0 105052 385116 114148 1433576    0    1    13   129  145    6 23 25 52  0  0

ps and pstree

Show processes

$ ps

Show in tree view

$ pstree

tcpdump

$ sudo tcpdump