Linux 桌面系统监控工具Conky 显示系统资源信息

先放效果图

下面开始安装教程

首先声明我使用的是ubuntu20.04

在终端中输入

sudo apt-get install conky-all

 

使用wget下载conky-manager

wget --no-check-certificate https://github.com/teejee2008/conky-manager/releases/download/v2.4/conky-manager-v2.4-amd64.run

给予权限

chmod +x ./conky-manager-v2.4-amd64.run

 执行程序

sudo ./conky-manager-v2.4-amd64.run

安装完成后终端执行

conky-manager

并打开程序目录

cd ~/.conky/

新建一个文件夹yxconky并进入文件夹新建一个文件yx_conky

写入以下代码

default_color white
double_buffer yes
no_buffers yes
update_interval 1.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0

double_buffer yes
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders n0
minimum_size 300 1
maximum_width 406
default_color ffffff
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 39
gap_y 100
cpu_avg_samples 2
override_utf8_locale no
uppercase no # set to yes if you want all text to be in uppercase
use_spacer no
use_xft yes
xftfont Monospace:size=11
override_utf8_locale yes
use_spacer no
minimum_size 300 1
TEXT


# 系统信息总览
${color white}${font :bold:size=12}[SYSTEM] $font$color $alignr$time
Hostname: $alignr $nodename
Kernel: $alignr $kernel
#System load: $alignr $loadavg
Running Processes: $alignr $running_processes/$processes
Running Threads: $alignr $running_threads/$threads
Uptime: ${font :bold:size=11}$alignr $color $uptime

# 显示当前四核CPU的频率、使用率的数值和示意图
${color white}${font :bold:size=12}[PROCESSORS]: $font${freq_g dyn}GHz (${cpu cpu}%) ${alignr 100}
${cpubar cpu}

# 列出排名前五的CPU消耗进程
${font :bold:size=9}Name $alignc PID $alignr CPU $font
${top name 1} $alignc ${top pid 1} $alignr ${top cpu 1}%
${top name 2} $alignc ${top pid 2} $alignr ${top cpu 2}%
${top name 3} $alignc ${top pid 3} $alignr ${top cpu 3}%
#${top name 4} $alignc ${top pid 4} $alignr ${top cpu 4}%
#${top name 5} $alignc ${top pid 5} $alignr ${top cpu 5}%

# 显示计算机当前内存的使用情况
${color white}${font :bold:size=12}[MEMORY] $font:$color $mem/$memmax - $memperc%
${membar}

# 列出排名前五的内存消耗进程
${font :bold:size=9}Name $alignc PID $alignr RAM $font
${top_mem name 1} $alignc ${top_mem pid 1} $alignr ${top_mem mem 1}%
${top_mem name 2} $alignc ${top_mem pid 2} $alignr ${top_mem mem 2}%
${top_mem name 3} $alignc ${top_mem pid 3} $alignr ${top_mem mem 3}%
#${top_mem name 4} $alignc ${top_mem pid 4} $alignr ${top_mem mem 4}%
#${top_mem name 5} $alignc ${top_mem pid 5} $alignr ${top_mem mem 5}%

# 显示root磁盘分区
${color white}${font :bold:size=12}[DISK]: $font${color}${alignr}root: ${fs_free /} / ${fs_size /}
${fs_bar 4 /}

# 显示网络使用情况
${color white}${font :bold:size=12}[NETWORK] $font$color
wlp3s0 IP : $alignr${addr wlp3s0}
Download: $alignr ${downspeed wlp3s0}/s
Upload: $alignr ${upspeed wlp3s0}/s
${downspeedgraph wlp3s0 324D23 77B753}
enp0s25 IP : $alignr${addr enp0s25}
Download: $alignr ${downspeed enp0s25}/s
Upload: $alignr ${upspeed enp0s25}/s
${downspeedgraph enp0s25 324D23 77B753}

保存,打开conky-manager勾选yx_conky文件并进入该程序设置界面打开开机自启动

完成

后续:

 

conky-manager不可用,配置步骤如下:

 

1、用户主目录新建 .conkyrc文件

 

pipci@UOS:~$ vi .conkyrc

 

2、将conky的配置内容复制到上面的文件

 

内容可以参考:https://www.cnblogs.com/pipci/p/15980272.html

 

3、创建conky的桌面图标文件

 

pipci@UOS:~$ cat /usr/share/applications/conky.desktop 
[Desktop Entry]
Name=conky
Comment=conky
Terminal=false
Icon=/home/pipci/.local/AppImage/conky/haha.png
Exec=conky
Type=Application
MimeType=inode/directory;
Categories=Utility;FileTools;FileManager;
Keywords=folder;managerdddddd;explore;disk;filesystem;orthodox;copy;queue;queuing;operations;
pipci@UOS:~$ 

 

4、设置开机启动(如下为UOS系统,其它系统也支持设置应用程序自启动)

 

 

 参考:

https://www.cnblogs.com/top66zhoulei/p/12302818.html

posted @ 2022-03-08 14:28  pipci  阅读(1047)  评论(0编辑  收藏  举报