LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Member Desktop Screenshots (https://www.linuxquestions.org/questions/linux-member-desktop-screenshots-94/)
-   -   The conky-ness thread! (https://www.linuxquestions.org/questions/linux-member-desktop-screenshots-94/the-conky-ness-thread-883862/)

GlennsPref 01-06-2018 06:05 PM

I came snooping, still using ver 9
 
Hi, I haven't posted here for a while. I came snooping to see what (any of) you have done to get conky 10 to work in the networking connections area.

I'm still forcing PcLinuxOs to use conky ver 9. I got so much help from here when I first set up conky, and I am forever grateful. Thank you.

I scrolled back far enough to see a post by Sector11 the he has stayed at ver 9 as well.

I tried to use a tool that was supposed to convert the conky script but it left my inbound and outbound connections full of errors.

All the best for the new year ahead, regards Glenn

weirdwolf 01-14-2018 09:42 PM

Howdy GlennsPref
using conky 1.10.6-5 and "${upspeed wlan0}" "${downspeed wlan0}" werks for me for up and down speeds but haven't been able to get "tcp_portmon" to work yet, if that's any help.

GlennsPref 01-15-2018 01:55 AM

Thank you weirdwolf, I'll keep checking back here to see some of those fantastic screenshots.https://static.xx.fbcdn.net/rsrc.php...PAXP-deijE.gif

weirdwolf 01-20-2018 07:17 PM

You're welcome and thanks as well.

GlennsPref 06-19-2018 07:56 PM

Hi, well I've managed to get it working, but alas it wasn't anything I did. lol

regarding "tcp_portmon" and Conky ver 1.10.8...

this is my Network section

Code:

${color orange}Networking:${hr 2}${color}
 ${color green}${execi 300 /home/glenn/bin/ip.sh}
 IP: ${color green}${addr eth0}  Gateway: ${color green}${gw_ip eth0}
 Down:${color green} ${downspeed eth0} k/s${color} ${alignr}Up:${color green}    ${upspeed eth0} k/s
 ${color}${downspeedgraph eth0 25,140 ff0000 0000ec}${alignr}${upspeedgraph eth0    25,140 0000ff ec0000}
 Connections in:${color green} ${tcp_portmon 1 32767 count}${color} Connections    out:${color green} ${tcp_portmon 32768 61000 count}${color} Total:${color}    ${tcp_portmon 1 65535 count}
${color} Inbound Connection ${alignr} Local Service/Port
${color} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767    lservice 0}
 ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
 ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
 ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${color} Outbound Connection ${alignr} Remote Service/Port${color}
${color} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon    32768 61000 rservice 0}
 ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice    1}
 ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice    2}
 ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice    3}

Code:

conky -version
conky 1.10.8_20171208 compiled Mon Feb 26 02:54:16 CST 2018 for Linux 4.15.6-pclos1 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib64/conky


 General:
  * math
  * hddtemp
  * portmon
  * HTTP
  * IPv6
  * IRC
  * Curl
  * RSS
  * ICal
  * iconv
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * eve-online
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * HTTP-port: 10080
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

I have 2 issues now, :-)

I made a compound error here, A typo, that I was sure I checked... xinerarama not ximerarama!
(The window won't go on the far right monitor-screen.
It used to be enough to have "alignment = 'top_right'," but in the old syntax.
and ximerarama_head has no effect (I read that somewhere...) ) end error... sorry.

and, I can't get it to display the hardware info from dmidecode... If I take the code and paste it into a terminal like Konsole (kde5, Plasma) I get the details formatted as desired.

Any guidance on these features would be appreciated. TIA

here is the total script /etc/conky/conky.conf
Code:

conky.config = {
        alignment = 'top_right',
        ximerama_head = 2,
        background = false,
        border_width = 1,
        cpu_avg_samples = 2,
        default_color = 'white',
        default_outline_color = 'white',
        default_shade_color = 'white',
        draw_borders = false,
        draw_graph_borders = true,
        draw_outline = false,
        draw_shades = false,
    use_xft = true,
    xftalpha = 1.0,
    font = 'Ubuntu:style=Medium:size=8',
        gap_x = 5,
        gap_y = 60,
        minimum_width = 5, minimum_height = 5,
        net_avg_samples = 2,
        no_buffers = true,
        out_to_console = false,
        out_to_stderr = false,
        extra_newline = false,
        stippled_borders = 0,
        update_interval = 0.5,
        uppercase = false,
        use_spacer = 'none',
        show_graph_scale = false,
        show_graph_range = false,
        own_window = true,
        own_window_class = 'Conky',
        own_window_type = 'normal',
        --own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- suspended untill ximerama_head = n, is fixed
        own_window_transparent = false, -- suspended untill ximerama_head = n, is fixed


};

conky.text = [[

${color red}System ${hr 2}$color
${color}${exec whoami} @ $nodename: $sysname, $kernel on $machine
${exec dmidecode --type baseboard | grep 'Product' | cut -d' ' -f3-} by ${exec dmidecode --type baseboard | grep 'Manufacturer' | cut -d' ' -f2-}
Uptime:${color green}$uptime
${color white}${time %A %B %e, %G} ${color green}${time %I:%M:%S}${time %p} ${time %Z}
${color white}Processes:${color green} $processes ${color white}Running:${color green} $running_processes ${color white}
${color red}Cpu ${hr 1}$color
${color white}CPU Temp:${alignr}${color green}${exec sensors | grep -n 'temp1' | sed -n 2p | awk -F'+' '{print $2}' | awk -F' ' '{print $1}'}
${color white}CPU Usage:${color green}${cpu cpu0}% ${color gray}${cpubar}
${color red}Graphics GeForce GTX 1060 6GB${hr 2}$color
${color white}GPU, Mem Freq:${alignr}${color green}${execpi 5 nvidia-settings -t -q GPUCurrentClockFreqs | sed -n 2p} MHz
${color white}GPU Mem Used:${alignr}${color green}${execpi 5 nvidia-settings -t -q UsedDedicatedGPUMemory} Mb
${color white}GPU Temp:${alignr}${color green}${execpi 5 nvidia-settings -t -q GPUCoreTemp | sed -n 2p} °C
${color cyan}Cooling ${hr 1}$color
${color white}Noctua NH-U12P-se2:${alignr}${color green}${exec sensors | grep -n 'fan1' | awk -F'+' '{print $1}' | awk -F' ' '{print $2}'} rpm
${color white}Top Case Fan:${alignr}${color green}${exec sensors | grep -n 'fan2' | awk -F'+' '{print $1}' | awk -F' ' '{print $2}'} rpm
${color white}Rear Case Fan:${alignr}${color green}${exec sensors | grep -n 'fan3' | awk -F'+' '{print $1}' | awk -F' ' '{print $2}'} rpm
${color white}Front Case Fan:${alignr}${color green}${exec sensors | grep -n 'fan4' | awk -F'+' '{print $1}' | awk -F' ' '{print $2}'} rpm
${color white}GPU Fan:${alignr}${color green}${execi 5 nvidia-settings -t -q GPUCurrentFanSpeed} %
${color orange}Disks:${hr 2}${color}
${color} /dev/sdb2 ${color}(${fs_type /}) /: ${alignr} /dev/sdb4 ${color}(${fs_type /home}) /home:
${fs_used /} used of ${fs_size /} ${alignr} ${fs_used /home} used of ${fs_size /home}
Disk I/O - ${color green}${diskio /dev/sdb2} ${color white}${alignr} Disk I/O - ${color green}${diskio /dev/sdb4}
${color red}Memory ${hr 2}$color
${color white}RAM used:${alignr}${color green} $memperc% ($mem/$memmax)
${color gray}${membar 6}$color
${color white}Swap used:${alignr}${color green} $swapperc% ($swap/$swapmax)
${color gray}${swapbar 6}$color
${color orange}Networking:${hr 2}${color}
 ${color green}${execi 300 /home/glenn/bin/ip.sh}
 IP: ${color green}${addr eth0}  Gateway: ${color green}${gw_ip eth0}
 Down:${color green} ${downspeed eth0} k/s${color} ${alignr}Up:${color green}    ${upspeed eth0} k/s
 ${color}${downspeedgraph eth0 25,140 ff0000 0000ec}${alignr}${upspeedgraph eth0    25,140 0000ff ec0000}
 Connections in:${color green} ${tcp_portmon 1 32767 count}${color} Connections    out:${color green} ${tcp_portmon 32768 61000 count}${color} Total:${color}    ${tcp_portmon 1 65535 count}
${color} Inbound Connection ${alignr} Local Service/Port
${color} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767    lservice 0}
 ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
 ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
 ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${color} Outbound Connection ${alignr} Remote Service/Port${color}
${color} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon    32768 61000 rservice 0}
 ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice    1}
 ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice    2}
 ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice    3}
${color red}Top ${hr 1}$color
${color}Name              ${alignr} PID    CPU%  MEM%
${color yellow} ${top name 1} ${alignr} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${alignr} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${alignr} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${alignr} ${top pid 4} ${top cpu 4} ${top mem 4}
${color lightgrey} ${top name 5} ${alignr} ${top pid 5} ${top cpu 5} ${top mem 5}
${color}Mem usage
${color yellow} ${top_mem name 1} ${alignr} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${alignr} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${alignr} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color lightgrey} ${top_mem name 4} ${alignr} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${color lightgrey} ${top_mem name 5} ${alignr} ${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5}
]];

Thank you for your time and efforts, Regards Glenn

ondoho 06-20-2018 12:58 AM

Quote:

Originally Posted by GlennsPref (Post 5869476)
xinerarama not ximerarama!

it's actually xinerama.

Quote:

and, I can't get it to display the hardware info from dmidecode... If I take the code and paste it into a terminal like Konsole (kde5, Plasma) I get the details formatted as desired.
then you can use that command in an exec variable:
Code:

${execi 60 /path/to/script}

GlennsPref 06-20-2018 08:01 AM

Thank you ondoho, I had typos on my typos. I swear I haven't been drinking. :-)

I tried the "execi 60" in the script line but it hasn't changed anything.

Code:

${execi 60 dmidecode --type baseboard | grep 'Product' | cut -d' ' -f3-} by ${execi 60 dmidecode --type baseboard | grep 'Manufacturer' | cut -d' ' -f2-}
I'll leave it in and see what it's like in the morning.

Thank you for your interest.

ondoho 06-20-2018 01:48 PM

on my system dmidecode requires superuser privileges.
would require some tweaking to get it to work in conky.

GlennsPref 06-20-2018 07:13 PM

Hmm, it worked before with conky ver 1.9.xx

I'll look further into the syntax changes.

Thank you.

ondoho 06-21-2018 06:54 PM

Quote:

Originally Posted by GlennsPref (Post 5869900)
Hmm, it worked before with conky ver 1.9.xx

I'll look further into the syntax changes.

are you not first testing your shell commands in a shell before incorporating them into conky?
not sure what syntax changes you are talking about.

GlennsPref 06-21-2018 08:24 PM

Yes I do test them in the shell, conky on my system is owned by root:root and I can't edit it from my user account. ...so, I thought dmidecode and /dev/mem would not need extra permission. I must have changed access permission at some earlier incantation of my installation of this system. (I got a new 2Tb Harddrive and re-installed from clean partitions without any system files backup)

Anyway, I was just trying to be fancy and have the info looked up and reproduced on screen.

I've just typed the info in, so it looks the same.

Thanks, regards Glenn

GlennsPref 06-21-2018 08:25 PM

Quote:

Originally Posted by ondoho (Post 5870315)
are you not first testing your shell commands in a shell before incorporating them into conky?
not sure what syntax changes you are talking about.

You are quite right, I was on the wrong path there... My bad.

ondoho 06-22-2018 05:22 AM

Quote:

Originally Posted by GlennsPref (Post 5870345)
conky on my system is owned by root:root

you mean the conky executable in /usr/bin is owned by root? that's normal.
you should still have rights to & execute it as a normal user, not as root. unless you're running puppy or something. :rolleyes:

GlennsPref 06-22-2018 06:38 PM

I mean the config file in /etc/conky.

I just can't remember what I was doing to allow it to work, I stopped using sudo about 3 years ago.

I thought maybe, I was giving access to dmidecode and/or /dev/mem to the normal user account (me).

Thanks anyway. Glenn

Bindestreck 10-13-2019 06:27 AM

https://images-wixmp-ed30a86b8c4ca88...KZ5rm9TZqFRqIY

A conky that will be used on a raspberry pi4 connected to a monitor with resolution 900x14400 (a monitor take from an old laptop).


All times are GMT -5. The time now is 02:15 PM.