How can I set default settings for htop?
up vote
35
down vote
favorite
Occasionally, I need to check resources on several machines throughout our data-centers for consolidation recommendations and the like. I prefer htop, mostly because of the interactive feel and the display.
Is there a way to default some settings to my setup for htop? For example, one thing I'd like to always have shown is the average CPU load.
important note: Setting this on specific boxes isn't something feasible - I'm looking for maybe a way to set this dynamically every time I ssh into the box.
Is this possible at all?
ssh display-settings htop
add a comment |
up vote
35
down vote
favorite
Occasionally, I need to check resources on several machines throughout our data-centers for consolidation recommendations and the like. I prefer htop, mostly because of the interactive feel and the display.
Is there a way to default some settings to my setup for htop? For example, one thing I'd like to always have shown is the average CPU load.
important note: Setting this on specific boxes isn't something feasible - I'm looking for maybe a way to set this dynamically every time I ssh into the box.
Is this possible at all?
ssh display-settings htop
1
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19
add a comment |
up vote
35
down vote
favorite
up vote
35
down vote
favorite
Occasionally, I need to check resources on several machines throughout our data-centers for consolidation recommendations and the like. I prefer htop, mostly because of the interactive feel and the display.
Is there a way to default some settings to my setup for htop? For example, one thing I'd like to always have shown is the average CPU load.
important note: Setting this on specific boxes isn't something feasible - I'm looking for maybe a way to set this dynamically every time I ssh into the box.
Is this possible at all?
ssh display-settings htop
Occasionally, I need to check resources on several machines throughout our data-centers for consolidation recommendations and the like. I prefer htop, mostly because of the interactive feel and the display.
Is there a way to default some settings to my setup for htop? For example, one thing I'd like to always have shown is the average CPU load.
important note: Setting this on specific boxes isn't something feasible - I'm looking for maybe a way to set this dynamically every time I ssh into the box.
Is this possible at all?
ssh display-settings htop
ssh display-settings htop
asked Aug 1 '14 at 16:12
MrDuk
5451516
5451516
1
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19
add a comment |
1
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19
1
1
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19
add a comment |
7 Answers
7
active
oldest
votes
up vote
33
down vote
accepted
htop
has a setup screen, accessed via F2, that allows you to customize the top part of the display, including adding or removing a "Load average" field and setting it's style (text, bar, etc.).
These seem to be auto saved in $HOME/.config/htop/htoprc
, which warns:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
I.e., edit that at your own risk. However, you should be able to transfer it from one system to another (version differences might occasionally cause a bit of an issue).
You could also set up a configuration, quit, and then copy the file, so that you could maintain a set of different configurations by swapping/symlinking whichever one with htoprc
.
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
add a comment |
up vote
18
down vote
The easiest way is to use the setup in the program and then save and exit the program with F10, not with CTRL-C. Next time you can close the program the way you like.
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
add a comment |
up vote
2
down vote
For any Mac users, the htop
config file may be located in either of two places:
- under a config subdirectory in home:
$HOME/.config/htop/htoprc
- right at the home directory:
$HOME/.htoprc
,
The first option (under .config/htop/
is preferred -- as mentioned in
htop's manpage as well as my own experiments.
On a 2014 MacBook Pro, the second location was used, while on a 2017 MacBook Pro the first location is used, though in both cases Homebrew was used to install htop
, and both laptops are (as of 10/29/17) running macOS 10.12.6. (thanks to @iconoclast for pointing out the discrepancy)
In either 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.
on my Mac it's at$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
add a comment |
up vote
0
down vote
Just had the same problem, but quitting htop with F10 didn't help save the settings. It appeared that this user's ~/.config
belonged to root.
To check this:
$user@host:~$ ls -hal ~ |grep config
drwx------ 4 root root 4.0K Mar 25 2015 .config
If it lists any user other than you, you should chown
the directory to make your htop able to write in it:
sudo chown user:mygroup ~/.config
(replace "user" and "mygroup" with your username and group)
There is a "softer" way when you just give yourself permission to write but do not change the owner. But I cannot imagine why one should not own their ~/.config
. Please tell me if I'm wrong.
Also encountered this. I know I have runsudo htop
at some point, which likely wound up saving the config file with root's user and group.
– user86616
Feb 27 '17 at 16:53
add a comment |
up vote
0
down vote
Okay, though this post may be old, I had the same issue.
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.
OS: Fedora 25
LK: 4.9.9-200.fc25.x86_64
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
add a comment |
up vote
0
down vote
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.
HOME=/media/shared htop
This will start htop
with a clean configuragion. Setup and close htop
with F10
(or q
). You could also copy your current configuration:
cp ~/.config/htop/htoprc /media/shared/.config/htop/htoprc
Now launch htop
on your other machine(s):
HOME=/media/shared htop
It should be configured as you did on your previous machine. :)
1
Don't be "smart" and set$HOME
globally in your shell session by doingexport HOME=/media/shared
. This may cause headaches. :-)
– hzpc-joostk
Aug 1 '17 at 16:07
add a comment |
up vote
0
down vote
Reset the settings in the config file
This are the default settings for htop on a Ubuntu 18.04 system. Replace the content of the file $HOME/.config/htop/htoprc
and you should be fine. Make a backup first.
# Beware! This file is rewritten by htop when settings are changed in the interface.
# # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
add a comment |
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
33
down vote
accepted
htop
has a setup screen, accessed via F2, that allows you to customize the top part of the display, including adding or removing a "Load average" field and setting it's style (text, bar, etc.).
These seem to be auto saved in $HOME/.config/htop/htoprc
, which warns:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
I.e., edit that at your own risk. However, you should be able to transfer it from one system to another (version differences might occasionally cause a bit of an issue).
You could also set up a configuration, quit, and then copy the file, so that you could maintain a set of different configurations by swapping/symlinking whichever one with htoprc
.
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
add a comment |
up vote
33
down vote
accepted
htop
has a setup screen, accessed via F2, that allows you to customize the top part of the display, including adding or removing a "Load average" field and setting it's style (text, bar, etc.).
These seem to be auto saved in $HOME/.config/htop/htoprc
, which warns:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
I.e., edit that at your own risk. However, you should be able to transfer it from one system to another (version differences might occasionally cause a bit of an issue).
You could also set up a configuration, quit, and then copy the file, so that you could maintain a set of different configurations by swapping/symlinking whichever one with htoprc
.
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
add a comment |
up vote
33
down vote
accepted
up vote
33
down vote
accepted
htop
has a setup screen, accessed via F2, that allows you to customize the top part of the display, including adding or removing a "Load average" field and setting it's style (text, bar, etc.).
These seem to be auto saved in $HOME/.config/htop/htoprc
, which warns:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
I.e., edit that at your own risk. However, you should be able to transfer it from one system to another (version differences might occasionally cause a bit of an issue).
You could also set up a configuration, quit, and then copy the file, so that you could maintain a set of different configurations by swapping/symlinking whichever one with htoprc
.
htop
has a setup screen, accessed via F2, that allows you to customize the top part of the display, including adding or removing a "Load average" field and setting it's style (text, bar, etc.).
These seem to be auto saved in $HOME/.config/htop/htoprc
, which warns:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
I.e., edit that at your own risk. However, you should be able to transfer it from one system to another (version differences might occasionally cause a bit of an issue).
You could also set up a configuration, quit, and then copy the file, so that you could maintain a set of different configurations by swapping/symlinking whichever one with htoprc
.
answered Aug 1 '14 at 17:39
goldilocks
60.9k13148203
60.9k13148203
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
add a comment |
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Thanks. I just blindly copied htop config from a good looking server to ugly looking server. It made the ugly looking server look great!
– Thamme Gowda
Oct 11 '17 at 15:42
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
Also, note that if you lose permission to your htoprc, such as by accidentally touching it as root/sudo, htop will be unable to update this file and silently fail to save your changes.
– Cerin
Dec 19 '17 at 0:50
add a comment |
up vote
18
down vote
The easiest way is to use the setup in the program and then save and exit the program with F10, not with CTRL-C. Next time you can close the program the way you like.
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
add a comment |
up vote
18
down vote
The easiest way is to use the setup in the program and then save and exit the program with F10, not with CTRL-C. Next time you can close the program the way you like.
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
add a comment |
up vote
18
down vote
up vote
18
down vote
The easiest way is to use the setup in the program and then save and exit the program with F10, not with CTRL-C. Next time you can close the program the way you like.
The easiest way is to use the setup in the program and then save and exit the program with F10, not with CTRL-C. Next time you can close the program the way you like.
edited Apr 22 '15 at 15:46
Community♦
1
1
answered Jan 27 '15 at 16:05
keiner
18112
18112
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
add a comment |
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
3
3
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
TL;DR: Exit with F10, not CTRL-C.
– camomileCase
Aug 15 '16 at 19:14
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
At least on linux, quitting with 'Q' also does NOT save your changes... ;(
– ljwobker
Dec 29 '17 at 0:06
add a comment |
up vote
2
down vote
For any Mac users, the htop
config file may be located in either of two places:
- under a config subdirectory in home:
$HOME/.config/htop/htoprc
- right at the home directory:
$HOME/.htoprc
,
The first option (under .config/htop/
is preferred -- as mentioned in
htop's manpage as well as my own experiments.
On a 2014 MacBook Pro, the second location was used, while on a 2017 MacBook Pro the first location is used, though in both cases Homebrew was used to install htop
, and both laptops are (as of 10/29/17) running macOS 10.12.6. (thanks to @iconoclast for pointing out the discrepancy)
In either 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.
on my Mac it's at$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
add a comment |
up vote
2
down vote
For any Mac users, the htop
config file may be located in either of two places:
- under a config subdirectory in home:
$HOME/.config/htop/htoprc
- right at the home directory:
$HOME/.htoprc
,
The first option (under .config/htop/
is preferred -- as mentioned in
htop's manpage as well as my own experiments.
On a 2014 MacBook Pro, the second location was used, while on a 2017 MacBook Pro the first location is used, though in both cases Homebrew was used to install htop
, and both laptops are (as of 10/29/17) running macOS 10.12.6. (thanks to @iconoclast for pointing out the discrepancy)
In either 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.
on my Mac it's at$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
add a comment |
up vote
2
down vote
up vote
2
down vote
For any Mac users, the htop
config file may be located in either of two places:
- under a config subdirectory in home:
$HOME/.config/htop/htoprc
- right at the home directory:
$HOME/.htoprc
,
The first option (under .config/htop/
is preferred -- as mentioned in
htop's manpage as well as my own experiments.
On a 2014 MacBook Pro, the second location was used, while on a 2017 MacBook Pro the first location is used, though in both cases Homebrew was used to install htop
, and both laptops are (as of 10/29/17) running macOS 10.12.6. (thanks to @iconoclast for pointing out the discrepancy)
In either 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.
For any Mac users, the htop
config file may be located in either of two places:
- under a config subdirectory in home:
$HOME/.config/htop/htoprc
- right at the home directory:
$HOME/.htoprc
,
The first option (under .config/htop/
is preferred -- as mentioned in
htop's manpage as well as my own experiments.
On a 2014 MacBook Pro, the second location was used, while on a 2017 MacBook Pro the first location is used, though in both cases Homebrew was used to install htop
, and both laptops are (as of 10/29/17) running macOS 10.12.6. (thanks to @iconoclast for pointing out the discrepancy)
In either 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.
edited Oct 30 '17 at 1:22
answered Feb 22 '15 at 2:49
TCAllen07
1214
1214
on my Mac it's at$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
add a comment |
on my Mac it's at$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
on my Mac it's at
$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
on my Mac it's at
$HOME/.config/htop/htoprc
– iconoclast
Jun 13 '16 at 0:52
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
Yeah, the same is true for my own newer MBP. Not sure why the difference exists, but I updated the answer to reflect it. Thanks for the note!
– TCAllen07
Oct 30 '17 at 1:23
add a comment |
up vote
0
down vote
Just had the same problem, but quitting htop with F10 didn't help save the settings. It appeared that this user's ~/.config
belonged to root.
To check this:
$user@host:~$ ls -hal ~ |grep config
drwx------ 4 root root 4.0K Mar 25 2015 .config
If it lists any user other than you, you should chown
the directory to make your htop able to write in it:
sudo chown user:mygroup ~/.config
(replace "user" and "mygroup" with your username and group)
There is a "softer" way when you just give yourself permission to write but do not change the owner. But I cannot imagine why one should not own their ~/.config
. Please tell me if I'm wrong.
Also encountered this. I know I have runsudo htop
at some point, which likely wound up saving the config file with root's user and group.
– user86616
Feb 27 '17 at 16:53
add a comment |
up vote
0
down vote
Just had the same problem, but quitting htop with F10 didn't help save the settings. It appeared that this user's ~/.config
belonged to root.
To check this:
$user@host:~$ ls -hal ~ |grep config
drwx------ 4 root root 4.0K Mar 25 2015 .config
If it lists any user other than you, you should chown
the directory to make your htop able to write in it:
sudo chown user:mygroup ~/.config
(replace "user" and "mygroup" with your username and group)
There is a "softer" way when you just give yourself permission to write but do not change the owner. But I cannot imagine why one should not own their ~/.config
. Please tell me if I'm wrong.
Also encountered this. I know I have runsudo htop
at some point, which likely wound up saving the config file with root's user and group.
– user86616
Feb 27 '17 at 16:53
add a comment |
up vote
0
down vote
up vote
0
down vote
Just had the same problem, but quitting htop with F10 didn't help save the settings. It appeared that this user's ~/.config
belonged to root.
To check this:
$user@host:~$ ls -hal ~ |grep config
drwx------ 4 root root 4.0K Mar 25 2015 .config
If it lists any user other than you, you should chown
the directory to make your htop able to write in it:
sudo chown user:mygroup ~/.config
(replace "user" and "mygroup" with your username and group)
There is a "softer" way when you just give yourself permission to write but do not change the owner. But I cannot imagine why one should not own their ~/.config
. Please tell me if I'm wrong.
Just had the same problem, but quitting htop with F10 didn't help save the settings. It appeared that this user's ~/.config
belonged to root.
To check this:
$user@host:~$ ls -hal ~ |grep config
drwx------ 4 root root 4.0K Mar 25 2015 .config
If it lists any user other than you, you should chown
the directory to make your htop able to write in it:
sudo chown user:mygroup ~/.config
(replace "user" and "mygroup" with your username and group)
There is a "softer" way when you just give yourself permission to write but do not change the owner. But I cannot imagine why one should not own their ~/.config
. Please tell me if I'm wrong.
edited Nov 27 '15 at 6:16
answered Nov 16 '15 at 13:11
Nick Volynkin
20227
20227
Also encountered this. I know I have runsudo htop
at some point, which likely wound up saving the config file with root's user and group.
– user86616
Feb 27 '17 at 16:53
add a comment |
Also encountered this. I know I have runsudo htop
at some point, which likely wound up saving the config file with root's user and group.
– user86616
Feb 27 '17 at 16:53
Also encountered this. I know I have run
sudo htop
at some point, which likely wound up saving the config file with root's user and group.– user86616
Feb 27 '17 at 16:53
Also encountered this. I know I have run
sudo htop
at some point, which likely wound up saving the config file with root's user and group.– user86616
Feb 27 '17 at 16:53
add a comment |
up vote
0
down vote
Okay, though this post may be old, I had the same issue.
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.
OS: Fedora 25
LK: 4.9.9-200.fc25.x86_64
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
add a comment |
up vote
0
down vote
Okay, though this post may be old, I had the same issue.
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.
OS: Fedora 25
LK: 4.9.9-200.fc25.x86_64
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
add a comment |
up vote
0
down vote
up vote
0
down vote
Okay, though this post may be old, I had the same issue.
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.
OS: Fedora 25
LK: 4.9.9-200.fc25.x86_64
Okay, though this post may be old, I had the same issue.
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.
OS: Fedora 25
LK: 4.9.9-200.fc25.x86_64
edited Feb 15 '17 at 13:45
answered Feb 15 '17 at 12:08
Th'Ink-King
11
11
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
add a comment |
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
@Fox the answer is in fact provided. It's too use the setup htop provides, which the asked 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.
– Th'Ink-King
Feb 15 '17 at 12:19
add a comment |
up vote
0
down vote
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.
HOME=/media/shared htop
This will start htop
with a clean configuragion. Setup and close htop
with F10
(or q
). You could also copy your current configuration:
cp ~/.config/htop/htoprc /media/shared/.config/htop/htoprc
Now launch htop
on your other machine(s):
HOME=/media/shared htop
It should be configured as you did on your previous machine. :)
1
Don't be "smart" and set$HOME
globally in your shell session by doingexport HOME=/media/shared
. This may cause headaches. :-)
– hzpc-joostk
Aug 1 '17 at 16:07
add a comment |
up vote
0
down vote
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.
HOME=/media/shared htop
This will start htop
with a clean configuragion. Setup and close htop
with F10
(or q
). You could also copy your current configuration:
cp ~/.config/htop/htoprc /media/shared/.config/htop/htoprc
Now launch htop
on your other machine(s):
HOME=/media/shared htop
It should be configured as you did on your previous machine. :)
1
Don't be "smart" and set$HOME
globally in your shell session by doingexport HOME=/media/shared
. This may cause headaches. :-)
– hzpc-joostk
Aug 1 '17 at 16:07
add a comment |
up vote
0
down vote
up vote
0
down vote
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.
HOME=/media/shared htop
This will start htop
with a clean configuragion. Setup and close htop
with F10
(or q
). You could also copy your current configuration:
cp ~/.config/htop/htoprc /media/shared/.config/htop/htoprc
Now launch htop
on your other machine(s):
HOME=/media/shared htop
It should be configured as you did on your previous machine. :)
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.
HOME=/media/shared htop
This will start htop
with a clean configuragion. Setup and close htop
with F10
(or q
). You could also copy your current configuration:
cp ~/.config/htop/htoprc /media/shared/.config/htop/htoprc
Now launch htop
on your other machine(s):
HOME=/media/shared htop
It should be configured as you did on your previous machine. :)
answered Aug 1 '17 at 16:05
hzpc-joostk
1
1
1
Don't be "smart" and set$HOME
globally in your shell session by doingexport HOME=/media/shared
. This may cause headaches. :-)
– hzpc-joostk
Aug 1 '17 at 16:07
add a comment |
1
Don't be "smart" and set$HOME
globally in your shell session by doingexport HOME=/media/shared
. This may cause headaches. :-)
– hzpc-joostk
Aug 1 '17 at 16:07
1
1
Don't be "smart" and set
$HOME
globally in your shell session by doing export HOME=/media/shared
. This may cause headaches. :-)– hzpc-joostk
Aug 1 '17 at 16:07
Don't be "smart" and set
$HOME
globally in your shell session by doing export HOME=/media/shared
. This may cause headaches. :-)– hzpc-joostk
Aug 1 '17 at 16:07
add a comment |
up vote
0
down vote
Reset the settings in the config file
This are the default settings for htop on a Ubuntu 18.04 system. Replace the content of the file $HOME/.config/htop/htoprc
and you should be fine. Make a backup first.
# Beware! This file is rewritten by htop when settings are changed in the interface.
# # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
add a comment |
up vote
0
down vote
Reset the settings in the config file
This are the default settings for htop on a Ubuntu 18.04 system. Replace the content of the file $HOME/.config/htop/htoprc
and you should be fine. Make a backup first.
# Beware! This file is rewritten by htop when settings are changed in the interface.
# # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
add a comment |
up vote
0
down vote
up vote
0
down vote
Reset the settings in the config file
This are the default settings for htop on a Ubuntu 18.04 system. Replace the content of the file $HOME/.config/htop/htoprc
and you should be fine. Make a backup first.
# Beware! This file is rewritten by htop when settings are changed in the interface.
# # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
Reset the settings in the config file
This are the default settings for htop on a Ubuntu 18.04 system. Replace the content of the file $HOME/.config/htop/htoprc
and you should be fine. Make a backup first.
# Beware! This file is rewritten by htop when settings are changed in the interface.
# # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
answered Nov 14 at 10:16
Stefan
60126
60126
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f147885%2fhow-can-i-set-default-settings-for-htop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Isn't that what the numbers for Load averages at the top show? This answer explains what they mean.
– Anko
Aug 1 '14 at 16:19