less than 1 minute read

  • Install and enable sysstat
    • systemctl enable --now sysstat
    • systemctl status sysstat
  • Enable sysstat data collection
    • sudo vim /etc/default/sysstat
    • ENABLED="true"
  • Check sysstat configuration
    • sudo cat /etc/cron.d/sysstat
  • Understanding uptime and load averages for 1, 5, and 15 mns.
    • uptime
    • Just uptime, no averages
    • uptime -s
    • Pretty output
    • uptime -p
    • Check uptime in seconds and idle time, respectively.
    • cat /proc/uptime
    • Learn about the proc filesystem, the pseudo-filesystem which provides an interface to kernel data structures.
    • man procfs
    • List CPUs
    • lscpu
    • How many cpus?
    • lscpu | grep '^CPU(s)'
  • Monitoring high CPU with mpstat and sar -u
    • mpstat
    • Run every 1 second for 60 seconds on all processors.
    • mpstat 1 60
    • Run every 1 second for 60 seconds on 0 processor.
    • mpstat -P 0 1 60
    • Check historical load information for all or one processor, with the System Activity Reporter.
    • sar -u / sar-u -P 0
    • Identify CPU hog using Top
    • top
  • Viewing RAM and Swap usage
    • free -h
    • cat /proc/meminfo
    • View collected memory information
    • sar -r
    • Sort top by memory usage f, Arrow Down TO MEM
    • top
      • f to open fields
      • arrow down from CPU to MEM
      • s for select
      • q for quit

Categories:

Updated: