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
|