4

I have a fairly large number of terminals open -> exactly 9, but each one has from 4-12 tabs open. They have been open for a lengthy number of days. Now, I see on the Activity Monitor that the 'Terminal' app is using 9.38 GB of memory. I don't want to lose the history/setup of these and the rest my system, so re-booting is not an option for another week or so.

Is there any other way? Can I found out which tab is using the most memory and just close the top one or two?

Thanks for any suggestions.

JoeG
  • 185
  • 1
    What is the "Terminal" app, and by curiosity why you right "Terminal" inside quotes, and the app part without it..... ? What this means? Terminal app is a application that runs in terminal, or it is something like a X terminal for the OS X. – Luciano Andress Martini Jul 29 '16 at 16:46
  • Yes, the "Terminal" Mac OSX application is something like X-Terms for OSX – JoeG Jul 29 '16 at 17:26
  • Doesn't ps or top let you see me,ory usage by instance of a program? Or does terminal.app run everything in one instance? – Wyatt Ward Jul 29 '16 at 17:30
  • Very better now, how many lines of roll your xterminal is allowed to save on screen, maybe the roll is growing too much, and i think you can configure it to save less lines! – Luciano Andress Martini Jul 29 '16 at 17:43
  • The OP is asking about a Mac, @LucianoAndressMartini – Rui F Ribeiro Jul 29 '16 at 18:25
  • Upload a screenshot from Activity Monitor and then, from top command used in Terminal! –  Jul 29 '16 at 18:45

1 Answers1

8

Your Terminal app in OS/X is configured to save all the lines of the current session since it was opened as long as it has memory. You must limit the number of number of rows saved by the Terminal app.

Please goto Terminal->Preferences->Profiles, edit your active template, and where you can see Scrollback, change the radio button from "Limit to available memory" to "Limit number of rows to", and place there a reasonable number (1000 to 2000 maybe).

This setting only applies to new Window Terminal sessions, I am afraid, so you must close the current ones, and open new ones.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
  • This is exactly i am saying in the comments. – Luciano Andress Martini Jul 29 '16 at 18:46
  • 1
    I do agree you were right on the money, but not "exactly"...this is not xterminal, not Linux, and these are the exact steps to do it in "El Capitan". They are not very intuitive, in my opinion... Abraços! – Rui F Ribeiro Jul 29 '16 at 18:48
  • 1
    but i know is something like a xterminal and not exactly that, see my first comment! =] Thank you. Abraços! – Luciano Andress Martini Jul 29 '16 at 18:51
  • 1
    This should be a global option in the app, and not hidden under each profile...OS/X is getting feature creep as time goes by. – Rui F Ribeiro Jul 29 '16 at 18:52
  • i have the strong suspicion that since recent it has a bug/design fault that lets it keep collecting even IF you disabled or restricted it. it doesn't write the files, but it has retained the same performance issues. – Florian Heigl Feb 02 '23 at 03:42
  • @FlorianHeigl Have not noticed it, however I was a late Big Sur adopter, still using Monterey and have a 16GB machine. – Rui F Ribeiro Feb 03 '23 at 10:12
  • @RuiFRibeiro thanks for taking the time. I might be at that point in life where i just need to reinstall ... – Florian Heigl Feb 04 '23 at 11:42