TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Linux

Linux Commands to Monitor System Runtime information

Introduction

In this tutorial, we will look at some of the Linux commands to monitor the system runtime performance of various resources of the system. These commands would help to monitor the load on the system during various kinds of performance testing.

free

free command displays the total amount of free and used physical and swap memory in the system. The information is obtained from /proc/meminfo

 

free memory = total – used – buffer – cache

 

free command output

top

The top command displays the current running processes along with the CPU, RAM and swap usage. The command is dynamic i.e if you leave the terminal running this command, the information keeps on updating real-time.

 

top command

The free command is not dynamic like the top command. We need to run the free command multiple times to know the memory stats. For example, during memory leak testing run the free command before the test. Run the suspected operation or activity that leaks memory. Run the free command after the action. Analyze the results to know if the operation leaks the memory.

vmstat

The vmstat command reports the virtual memory stats on the system. Information of memory, paging, block IO, CPU activity, etc.

vmstat command output

iostat

The iostat command is used to monitor the input/output device load and average transfer rates. The main reports of this command are CPU utilization and the IO device utilization report.

iostat command linux

sar

The sar command is used to collect and save system activity reports on regular basis. The files are stored under /var/log/sysstat directory by default. The files names would be saDD or saYYYYMMDD formats.

The sample output of the command:

$ sar -A

 

sar command output

Related Posts

Android Studio Setup Wizard

Linux /

Customization of Android Development Environment

Download Android Studio

Linux /

Download Android Studio Package on Linux

gedit Text Editor Ubuntu

Linux /

gedit Text Editor in Linux

Download Ubuntu Desktop

Linux /

Create Ubuntu Bootable USB Pendrive on Windows

Linux /

Linux Files

‹ Open Source Security Testing Tools› Install Oracle JDK on Ubuntu Linux

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version