Start *top* command with memory sort? (or any other available field)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, I noticed those dates and the seemingly low number of downloads, but I'd bet most of the time top is installed from the procps package and that respository seems to be a standalone for top. Also notice on the main page "Last Update: 2016-02-03" so it does seem to be maintained. I also saw that first link was dead but the second was active and still seemed relevant. :) If you mentioned before I must have missed it, but what happens if you try, for instance:
Code:
top -o %MEM
?
It does not work:
Code:
$ top -o %MEM
top: unknown argument 'o'
usage: top -hv | -bcisSH -d delay -n iterations
[-u user | -U user] -p pid [,pid ...]
The "-ng" question is not completely clear for me, as you may have imagined from a few posts I did when I was reading about (...).
I forgot about the "ng" question and went to an apparently safer idea: just stick to procps package because it is the package with top in my OS.
I have downloaded "any" more recent source from ubuntu old packages repository (http://old-releases.ubuntu.com/). I extracted and compiled it, not noticing for a while that the extracted folder name is "procps-ng-3.3.9". Note the NG there!
I will not compile the .deb package and install from it. I will just save the original /usr/bin/top as something findable and replace it with the compiled "new top". It easily compiled and runs smoothly with the "-o %MEM" argument, which indicates that it will work with all others! :D
I am bit reluctant to mark this thread as solved. Although a solution is close and clear, this is far from the best that it can be, and it is also far from other much more reasonable solutions. Further, there are many still open questions that poped up in this discussion. Opinions?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I think when you're running an outdated and unsupported distro you've found about the best solution you can. If you installed a current, supported distro you'd not need to do any compiling and things would just work as you want them to.
This is a pretty good illustration of why you should use an distro that's still supported by the developers -- updates, including security and functionality updates, are made available if your distro is still supported.
Nah... it did not work as expected. After I put the "new top" in the /usr/bin folder and ran it with a normal user, its output is:
Code:
mkdir: impossible to create dir "/usr/bin/.libs": no permission
/usr/bin/ld: cannot open output file
/usr/bin/.libs/19626-lt-top: No such file or directory
collect2: ld returned 1 exit status n
Forget it. I will just use "shift+m" or "F, [some letter] [space]".
I think when you're running an outdated and unsupported distro you've found about the best solution you can. If you installed a current, supported distro you'd not need to do any compiling and things would just work as you want them to.
This is a pretty good illustration of why you should use an distro that's still supported by the developers -- updates, including security and functionality updates, are made available if your distro is still supported.
Newer and more recent distros want a much better machines than the one I currently own (which is not that bad!). I do not mind compiling a few things. In fact, some can be a bit fun.
If you demand your users to have a better machine than the one they owned with a previous release, you are not playing a fair game. We must not be pushed to buy and buy and forever buy stuff.
I'm willing to bet there's a ton of people running supported distro's on machines older & slower than what you have. There's lots of distros that are still maintained that are less resource intensive in order to be used on older, slower hardware. I know people running a modern, supported distro on old single core ATOM netbooks that have a mere 1 GB ram.
I'm willing to bet there's a ton of people running supported distro's on machines older & slower than what you have. There's lots of distros that are still maintained that are less resource intensive in order to be used on older, slower hardware. I know people running a modern, supported distro on old single core ATOM netbooks that have a mere 1 GB ram.
Your examples are toooooo updated. I have less than that... and I have seen people with even less (some running WinXP, which is kind of slow to init, but runs fine the rest of the uptime!).
Some modern browsers expend gigas of RAM, which I find totally absurd for the amount of work they do. It does not make sense to use that amount of data to do basically what computers with 233MHz and 64MiB of RAM did fine. The needs are not that much higher...
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by dedec0
Newer and more recent distros want a much better machines than the one I currently own (which is not that bad!). I do not mind compiling a few things. In fact, some can be a bit fun.
If you demand your users to have a better machine than the one they owned with a previous release, you are not playing a fair game. We must not be pushed to buy and buy and forever buy stuff.
The situation will stay like it is.
Desktop environments like KDE and Gnome may require more system requirements than they did, because their very aim is to be "modern" and "keep up with the zeitgeist" an the like. The OS itself hasn't grown all that much so if one uses something like LXDE, XFCE or a window manager then even a more modern distro can be used.
I'm willing to bet there's a ton of people running supported distro's on machines older & slower than what you have. There's lots of distros that are still maintained that are less resource intensive in order to be used on older, slower hardware. I know people running a modern, supported distro on old single core ATOM netbooks that have a mere 1 GB ram.
The OS, as it is now, have everything I need 99% of the time. Installing a distro that supports my machine would mean to change browser, possibly change other programs, change habits, change, change, change, ... time, time, time.
I tried to install Mint a while ago. Did not work. Maybe I try some other in the next spare time, but until then... it is just fine. (:
Desktop environments like KDE and Gnome may require more system requirements than they did, because their very aim is to be "modern" and "keep up with the zeitgeist" an the like. The OS itself hasn't grown all that much so if one uses something like LXDE, XFCE or a window manager then even a more modern distro can be used.
Yes, and I do not like the "aiming to look like touch blas" that Gnome 3 and Unity have gone for. So Mate Desktop was born as a fork from Gnome 2. The Gnome 3 story has many untold details. Mate lacks the great structure that Gnome projects have, but it is doing pretty good, in my opinion.
Gnome 2 does not need so much memory. It is light enough, although Lxde and Xfce sure win. The amount of memory that a browser want to use, on the other hand, is much more important because it can slow down a system to make it just being trashing virtual memory in some fairly updated machines!
I'm willing to bet there's a ton of people running supported distro's on machines older & slower than what you have. There's lots of distros that are still maintained that are less resource intensive in order to be used on older, slower hardware. I know people running a modern, supported distro on old single core ATOM netbooks that have a mere 1 GB ram.
Running Fedora Rawhide and Ubuntu 16.10 (both with Mate DE) on my Acer Aspire One ZG5 (32-bit single-core Atom N270, 1 GB RAM. Looks like Fedora (Rawhide) provides top in the package procps-ng-3.3.10-12.fc26
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.