Originally Posted by
Al1000
I thought it would be more interesting to get conky to display the user rather than the PID for the top running processes. But with some chromium-browser processes, conky says the user is root, whereas top in the terminal says it's me.
I don't understand why conky's output should be different from what top says. Does anyone know how I might get conky to display the user correctly?
Here is my conky.conf, and a screenshot of top reporting the users of all chromium-browser processes to be me, and conky reporting some of them to be root.
Code:
alignment top_right
background true
border_width 1
cpu_avg_samples 2
default_color green
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
gap_x 5
gap_y 110
minimum_size 5 5
net_avg_samples 2
double_buffer yes
out_to_console no
own_window yes
own_window_argb_visual yes
own_window_argb_value 100
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 03.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
TEXT
${color}${scroll 16 $nodename - $sysname $kernel on $machine | }
${color white}$hr
${color}Uptime:$uptime
${color white}$hr
${color}RAM Usage:$mem/$memmax - $memperc% ${membar 7}
Swap Usage:$swap/$swapmax - $swapperc% ${swapbar 7}
${color white}$hr
${color}CPU 1: ${cpu cpu1}% ${cpubar cpu1}
CPU 2: ${cpu cpu2}% ${cpubar cpu2}
Frequency: ${freq}MHz
CPU 1 Temp: ${hwmon 1 temp 1}C CPU 2 Temp: ${hwmon 2 temp 1}C
${color white}$hr
${color}File systems: ${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color white}$hr
${color}Networking:
Up:${upspeed eth1}k/s Down:${downspeed eth1}k/s
${color white}$hr
${color}Processes:$processes Running:$running_processes
${color white}$hr
${color}Name CPU% MEM% USER
${top name 1} ${top cpu 1} ${top mem 1} ${top user 1}
${top name 2} ${top cpu 2} ${top mem 2} ${top user 2}
${top name 3} ${top cpu 3} ${top mem 3} ${top user 3}
${top name 4} ${top cpu 4} ${top mem 4} ${top user 4}
${top name 5} ${top cpu 5} ${top mem 5} ${top user 5}
snapshot18.jpg
Thanks for sharing that. I added user to the mix and when I bring up Chromium it starts with owned by me but sometimes several other Chromium processes pop up and some of them say root on them as well.
Code:
##################################
## TOP CPU PROCESSES ##
##################################
${voffset -21}${font DroidSans:bold:size=8.5}${color4}TOP CPU PROCESSES${offset 8}${color6}${voffset -2}${hr 1}${font}
#${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}Name${goto 100}CPU${goto 163}MEM${alignr}USER${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 1}${goto 100}${font DroidSans:size=8.3}${top mem_res 1}${goto 160}${top cpu 1}%${alignr}${top user 1}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 2}${goto 100}${font DroidSans:size=8.3}${top mem_res 2}${goto 160}${top cpu 2}%${alignr}${top user 2}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 3}${goto 100}${font DroidSans:size=8.3}${top mem_res 3}${goto 160}${top cpu 3}%${alignr}${top user 3}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 4}${goto 100}${font DroidSans:size=8.3}${top mem_res 4}${goto 160}${top cpu 4}%${alignr}${top user 4}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 5}${goto 100}${font DroidSans:size=8.3}${top mem_res 5}${goto 160}${top cpu 5}%${alignr}${top user 5}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 6}${goto 100}${font DroidSans:size=8.3}${top mem_res 6}${goto 160}${top cpu 6}%${alignr}${top user 6}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 7}${goto 100}${font DroidSans:size=8.3}${top mem_res 7}${goto 160}${top cpu 7}%${alignr}${top user 7}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 8}${goto 100}${font DroidSans:size=8.3}${top mem_res 8}${goto 160}${top cpu 8}%${alignr}${top user 8}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 9}${goto 100}${font DroidSans:size=8.3}${top mem_res 9}${goto 160}${top cpu 9}%${alignr}${top user 9}${font}
${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color0}${offset 5}${top name 10}${goto 100}${font DroidSans:size=8.3}${top mem_res 10}${goto 160}${top cpu 10}%${alignr}${top user 10}${font}
I didn't have enough room to display the titles so I comment that line out.
Originally Posted by
paramvir
Like they say many roads to a city [Rome ???] lol
Cheaper approaches perhaps ...
Code:
SED
$alignr${color3}${pre_exec sed -n 's/"//g;s/.*DESCRIPTION=//p' /etc/*release }
AWK
$alignr${color3}${pre_exec awk '$1 ~ /DESCRIPTION/ { gsub(/.*DESCRIPTION=|\"/,""); print}' /etc/*release }
cheers
Both of those yield this:
Code:
cavsfan@cavsfan-MS-7529:~$ sed -n 's/"//g;s/.*DESCRIPTION=//p' /etc/*release
Ubuntu Vivid Vervet (development branch)
cavsfan@cavsfan-MS-7529:~$ awk '$1 ~ /DESCRIPTION/ { gsub(/.*DESCRIPTION=|\"/,""); print}' /etc/*release
Ubuntu Vivid Vervet (development branch)
Which is good but that cannot be displayed in the space available.
This is what is displaying and it's all I have room for in VinDSL's conky:
Code:
cavsfan@cavsfan-MS-7529:~$ cat /etc/*release | grep 'RELEASE' | awk -F'=' '{print $2}'
15.04
I think that error was a fluke. I am not getting it any more in the new release Vivid.
Bookmarks