Ineither case, the same config file format can be used, and in both cases, it's recommended you change any settings via htop's own setup instead of directly editing the config file, as it's automatically generated.
Use the setup htop provides, which the asker had already done, but the settings were not being saved upon SSH, which is likely because there is no htoprc. Upon creating one, htop will then use it to save and load settings, rather than defaulting to its stock setup.
After reading @goldilocks and @TCAllen07 response, I sought to check if I even had a htoprc to begin with. It was not present. So, even though I owned my config directory from install, if I changed the setup, the settings would be lost. To solve it, I simply created the htoprc file in it's directory using touch .config/htop/htoprc, then I edited the settings from within htop interface and used cat .config/htop/htoprc to see that the changes were saved.
You could also use a folder, shared among all your machines. Let's say that /media/shared is mounted equally on all machines. You can set it as your $HOME for htop, then it will save and load its configuration there.
I've been using htop for some time now, but I hate to have to reconfigure it each time I start it. Is there a way to save the current config of htop to a file or something or create a new default one ?
I can open the "make menuconfig" comand and select (for example and testing)"htop" and "zabbix agentd" with
When I save the config, build the image and cope it to my TP-LINK TL-WR1043ND(EU) v4 these packages aren't there.
Sounds strange, are you sure you saved the changes?
Check your .config file and search for "htop" the line should not have a "#". In the bin/packages directory there should also be a file named "htop" in the packages dir, after you run make.
mhh looks all normal to me, the package was build via make and shows up under packages, if you selected it via it should be packaged with the .bin. Maybe try a sysupgrade, which is what you should use if you already have openwrt running on it. The factory is only for the first time upgrade.
Okay... now I've got a very funny thing...
I make the image with htop and zabbix_agentd and now I havn't flashed it via "Bootloader". Now I flashed it with the LuCi WebGUI Firmware Upgrade.
Now the device got as Wireless SSID "OpenWRT" and there is luci issing.
But now I've got zabbix_agentd and htop....
I'm going to make a new image with LucI interface....
Like noted, i have not used any factory image for years. So i'm not even sure if they are supposed to be 100% identically, also keep in mind lede merged back with openwrt a few months ago. So having some mixed lede/openwrt naming is to-be expected.
You can also try join the lede irc dev channel and ask some questions, but don't expect a immediate response. As tip use the trial via irccloud for a painless irc setup, that stays connected.
Unlike `top`, htop provides a full list of processes running, instead of the top resource consuming processes. htop also uses colour and gives visual information about processor, swap and memory status.
Below is my htop configuration which I have tweaked a bit. You can give it a go with mine or just fire up htop yourself and have a mess around with the config till you find what works for you. One of the nicest things about htop is that if you make a configuration change it automatically saves on exit.
nmon is a tool designed to give a huge amount of information all on one screen. The tool can be used to get a wealth of performance statistics, allowing you to get the stats on one screen that would normally take 5 or 6 other tools.
I have only had chance to try it out recently as its only been available in the Ubuntu repository since 10.4 (Lucid Lynx).Also its not available under the Gentoo portage tree so this limits its availability quite a bit.
I found it fairly annoying having to configure the application every time it launches. I could not find a configuration file to save the config but after reading the manual I found you can set the default behaviour using an enviromental variable.
A fork had been made into procps-ng and has been maintained regularly. This was installed in Core Update 154 as procps-3.3.16 and the version of top that you now see came with that. This is also the version of top that you will see in most distributions. Debian Buster is using 3.3.15 and Ubuntu Focal and other more recent versions are using 3.3.16
Patrick, start top and press z --the colors will be black/white. Press W to save that config (it will save in /root/.config/procps/toprc) . From now on, whenever you run top, it will be black/white, not red. There are many other options how to show memory etc. When you setup as you like, W to save that config.
Columns - This menu allows you to select which columns will be displayed for each process. Htop offers many options, such as CPU usage (processor usage), RAM usage (RAM usage), process start time and others.
Meter Options - This menu allows you to set thresholds for various parameters such as CPU usage, RAM usage, etc. When a parameter reaches the set threshold, htop will display it in red to draw the user's attention.
Display Filtering - This menu allows you to configure process display filters. For example, you can hide system processes, show only the processes of a certain user, or only show processes running in a certain directory.
The F3 key in htop opens a search bar that allows the user to quickly find a process by its name or ID. To use this function, the user must simply press F3 and enter part of the name or process ID to be found. htop automatically filters the list of processes and displays only those that contain user-entered text.
In addition, the search bar can also be used to filter processes by other parameters. For example, the user can enter ">50%" to display only those processes that are using more than 50% of the processor, or "S" to display only processes in the sleeping state.
The F4 key in htop opens the filter menu, which allows the user to filter the list of processes by given parameters. When opening the filter menu, the user can select a filter type such as processor, memory, or other parameter and enter a threshold value to filter the list of processes.
For example, if the user selects the filter type "CPU" and sets the threshold to 50%, then htop will display only those processes that are using more than 50% of the CPU. Similarly, the user can filter processes by memory usage, process state, username, and other options.
The F5 key in htop switches the process view to a tree view that shows dependencies between processes and their parent processes. In this mode, processes are displayed as a tree, where each process is a child of another process, and the topmost process is the init process.
The tree view in htop allows the user to easily track dependencies between processes, identify and kill parent processes and their children. In the tree view, each process is displayed with its ID (PID), name, CPU and memory usage, and status.
The F5 key also allows the user to quickly switch between normal and tree view. When using the tree view, the user can switch between processes using the arrow keys and the Page Up and Page Down keys.
The F6 key in htop allows the user to sort processes by a given parameter. Pressing F6 brings up a list of sort options such as CPU usage, memory, startup time, and others. The user can select one of these options, and the processes will be sorted in ascending or descending order by the value of this option.
For example, if the user chooses to sort by CPU usage, the processes will be sorted in descending CPU usage, i.e. the most active processes will be displayed at the top of the list. If the user chooses to sort by memory, the processes will be sorted by memory usage, with the most expensive processes at the top of the list.
Using the F6 key, the user can also select the sort direction: ascending or descending by the value of the selected parameter. The F6 key allows you to quickly find the most expensive processes on the system and manage them more efficiently.
The F7 key in htop allows the user to change the nice priority value of a process. nice-priority is a value that determines the priority of the process in the CPU scheduling queue. The higher the nice priority value, the lower the priority of the process, and the less likely it is to be executed quickly.
The F7 key allows the user to change the nice priority of a process between -20 and 19. -20 is the highest priority and 19 is the lowest priority. Changing the nice priority value can help the user manage process priority and manage CPU usage. For example, if a process is taking up too many resources, the user can set a higher nice priority for another process to give it more CPU usage.
The F9 key in htop allows the user to terminate (kill) the selected process. After pressing F9, the user will be prompted to confirm their choice to ensure that they are not closing an important process.
When the user presses F9, htop sends a signal to the process, telling it to exit. Normally, a process receives a SIGTERM signal, which alerts the process to shutdown and gives it time to complete its activities and save data before closing.
If the process does not terminate after receiving the SIGTERM signal, the user can try to force quit the process using the "Force Quit" option. However, using this option may result in the loss of unsaved data, so it should be used with caution.
Tab - Toggle between process list and CPU usage meters
The Tab key allows you to switch between viewing processes and CPU usage metrics. When selecting CPU Metrics, the screen displays CPU usage graphs rather than a list of processes.
PgUp / PgDown - allow you to scroll up and down the list of processes.
Home / End - allow you to move to the beginning and end of the list of processes.
Space - marks the selected process.
U - filters the list of processes by the user who started the process.
Ctrl + L - Refreshes the screen and redraws htop output.
Shift + H - Displays only those processes that use the most CPU.
Shift + M - Displays only those processes that use the most memory.
Ctrl + S - saves the current settings in a configuration file.
Ctrl + R - loads settings from a configuration file.
Ctrl + F - Displays a search box at the top of the screen, allowing the user to search for a specific process by its name.
These keyboard shortcuts provide the user with additional options when working with htop, which help to make process monitoring more convenient and efficient.
3a8082e126