Skip to main content
deleted 13 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell script to run a scala program which I want to have its memory usage tracked.

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell script to run a scala program which I want to have its memory usage tracked.

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

I'm using a shell script to run a scala program which I want to have its memory usage tracked.

added 2 characters in body; edited tags; edited title
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265

How to use top in a shell filescript to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell filescript to run a scala program which I want to have its memory usage tracked.

How to use top in a shell file to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell file to run a scala program which I want to have its memory usage tracked.

How to use top in a shell script to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell script to run a scala program which I want to have its memory usage tracked.

Source Link

How to use top in a shell file to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using

   runtime.totalMemory - runtime.freeMemory

But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.

If it helps, I'm using a shell file to run a scala program which I want to have its memory usage tracked.