V
V
vlarkanov2018-04-05 19:46:12
linux
vlarkanov, 2018-04-05 19:46:12

How to measure CPU load and memory usage when using a script?

Hello. I'm debugging the script (according to the execution time and resource consumption metrics). Over time, everything is simple, I run time ./script.sh - after the completion of the script, I get the execution time. Is it possible to obtain data on the average load per percent, memory usage in a similar way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Archie Kuznetsov, 2018-04-05
@Wolf4ara

perf to help you =)

O
Oleg, 2018-04-06
@hobo-mts

See files: /proc/loadavg , /proc/$$/status and top -bn1 output

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question