Reputation: 59
I want to display memory (RAM) of some commmand in Linux. For example, I write to command line this command - for run Python script:
python 'someScript.py'
I want to display how much memory this command (process) uses.
Upvotes: 1
Views: 84
Reputation: 9102
ps aux | grep "myscrip_name" | awk '{print $4}'
To display the % of memory being used by the running process myscript_name
. Obviously can get the memory used when you know the % used.
Upvotes: 1
Reputation: 2077
You can use 'time' command
/usr/bin/time -v python 'someScript.py'
note that this is not a built-in shell command
Upvotes: 2
Reputation: 1019
there are many commands that you can use:
proc/meminfo
top
htop
among this command I think top
is suitable for you, top clearly highlights which processes are consuming the most CPU cycles and memory
Upvotes: 1