Skip to content

A simple Shell script to Capture CPU, Memory utilization and Number of file descriptors ( using top and lsof command) over the time and output into csv for generating reports.

Notifications You must be signed in to change notification settings

vladwa/Capture-CPU-Memory-Utilization-File-Descriptors-Shell-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CPU-and-Memory-Utilization-Shell-Script"

This shell script captures the CPU,Memory utilization and Number of File descriptors of the particular process using "top" and "lsof" command. The captured metrics are written into a .csv file. The script can be added to a cron entry to capture the metrics over the period of time.

The .csv file can be imported into Excel or can be opened with Excel for analyzing the CPU and Memory utilization by plotting the graph.

Example Run.

sh <Script_Name> <Process_to_Monitor>

Example CPU and Memory utilization to be captured for the Java process.

Assume you want to monitor process called java. In this case you will launch the script as below.

./MemWatch.sh Java

The .csv file can be easily plotted in excel to get the idea of Memory and Cpu Utilization.

About

A simple Shell script to Capture CPU, Memory utilization and Number of file descriptors ( using top and lsof command) over the time and output into csv for generating reports.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages