2009-02-27, 00:19
#1
jag kör ubuntu på min "server dator" men jag har ett problem med conky... inbound och outbound anslutningarna visar inte när man laddar ner / upp till ftp servern... de visar dock när man kör ktorrent.... hur kan jag fixa detta?
och även om någon vet hur jag kan få den att visa när någon användare loggat in på ftp'n skulle de uppskattas med
tack på förhand
Min kod är:
och även om någon vet hur jag kan få den att visa när någon användare loggat in på ftp'n skulle de uppskattas med

Min kod är:
# UBUNTU-CONKY
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#
#
#
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_hints undecorated,below,skip_taskbar
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 0.5
# Minimum size of text area
minimum_size 400 5
# Draw shades?
draw_shades yes
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
override_utf8_locale no
xftfont Terminus:size=8
xftalpha 0.8
TEXT
${offset 240}${color slate grey}Computer Name: ${color }$nodename
${offset 240}${color slate grey}Uptime: ${color }$uptime
${offset 240}${color slate grey}CPU: ${color } $cpu%
${offset 240}${cpugraph 20,130 000000 ffffff}
${offset 240}${color slate grey}Processes: ${color }$processes
${offset 240}${color slate grey}Running: ${color }$running_processes
${offset 240}${color slate grey}Highest CPU:
${offset 240}${color #ddaa00} ${top name 1}${top_mem cpu 1}
${offset 240}${color lightgrey} ${top name 2}${top cpu 2}
${offset 240}${color lightgrey} ${top name 3}${top cpu 3}
${offset 240}${color lightgrey} ${top name 4}${top cpu 4}
${offset 240}${color slate grey}Highest MEM:
${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
${offset 240}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
${offset 240}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
${offset 240}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
${offset 240}${color slate grey}MEM: ${color } $memperc%
${offset 240}${membar 3,100}
${offset 240}${color slate grey}SWAP: ${color }$swapperc%
${offset 240}${swapbar 3,100}
${offset 240}${color slate grey}Disk space:
${offset 240}${color slate grey}HOME: ${color }${fs_used /home} / ${fs_size /home}
${offset 240}${fs_bar 3,100 /home}
${offset 240}(${fs_free /home}, ${fs_free_perc /home}%free)
${offset 240}${color slate grey}Warez: ${color }${fs_used /media/disk} / ${fs_size /media/disk}
${offset 240}${fs_bar 3,100 /media/disk}
${offset 240}(${fs_free /media/disk}, ${fs_free_perc /media/disk}%free)
${offset 240}${color slate grey}NETWORK: ${addr eth0}
${offset 240}${color}Up: ${color }${upspeed eth0} k/s
${offset 240}${color}Total: ${color }Total: ${totalup eth0}
${offset 240}${upspeedgraph eth0 20,130 000000 ffffff}
${offset 240}${color}Down: ${color }${downspeed eth0}k/s${color}
${offset 240}${color}Total: ${color }${totaldown eth0}
${offset 240}${downspeedgraph eth0 20,130 000000 ffffff}
${offset 240}${color slate grey}Port(s)${alignr}#Connections
${offset 240}${color}Inbound: ${color}${tcp_portmon 1 32767 count} ${color}Outbound: ${color}${tcp_portmon 32768 61000 count}
${alignr}${color}Total: ${color}${tcp_portmon 1 65535 count}
${offset 240}${color slate grey}Inbound Connection ${alignr} 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}
${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
${offset 240}${color slate grey}Outbound Connection ${alignr} Port${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 1} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#
#
#
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_hints undecorated,below,skip_taskbar
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 0.5
# Minimum size of text area
minimum_size 400 5
# Draw shades?
draw_shades yes
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
override_utf8_locale no
xftfont Terminus:size=8
xftalpha 0.8
TEXT
${offset 240}${color slate grey}Computer Name: ${color }$nodename
${offset 240}${color slate grey}Uptime: ${color }$uptime
${offset 240}${color slate grey}CPU: ${color } $cpu%
${offset 240}${cpugraph 20,130 000000 ffffff}
${offset 240}${color slate grey}Processes: ${color }$processes
${offset 240}${color slate grey}Running: ${color }$running_processes
${offset 240}${color slate grey}Highest CPU:
${offset 240}${color #ddaa00} ${top name 1}${top_mem cpu 1}
${offset 240}${color lightgrey} ${top name 2}${top cpu 2}
${offset 240}${color lightgrey} ${top name 3}${top cpu 3}
${offset 240}${color lightgrey} ${top name 4}${top cpu 4}
${offset 240}${color slate grey}Highest MEM:
${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
${offset 240}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
${offset 240}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
${offset 240}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
${offset 240}${color slate grey}MEM: ${color } $memperc%
${offset 240}${membar 3,100}
${offset 240}${color slate grey}SWAP: ${color }$swapperc%
${offset 240}${swapbar 3,100}
${offset 240}${color slate grey}Disk space:
${offset 240}${color slate grey}HOME: ${color }${fs_used /home} / ${fs_size /home}
${offset 240}${fs_bar 3,100 /home}
${offset 240}(${fs_free /home}, ${fs_free_perc /home}%free)
${offset 240}${color slate grey}Warez: ${color }${fs_used /media/disk} / ${fs_size /media/disk}
${offset 240}${fs_bar 3,100 /media/disk}
${offset 240}(${fs_free /media/disk}, ${fs_free_perc /media/disk}%free)
${offset 240}${color slate grey}NETWORK: ${addr eth0}
${offset 240}${color}Up: ${color }${upspeed eth0} k/s
${offset 240}${color}Total: ${color }Total: ${totalup eth0}
${offset 240}${upspeedgraph eth0 20,130 000000 ffffff}
${offset 240}${color}Down: ${color }${downspeed eth0}k/s${color}
${offset 240}${color}Total: ${color }${totaldown eth0}
${offset 240}${downspeedgraph eth0 20,130 000000 ffffff}
${offset 240}${color slate grey}Port(s)${alignr}#Connections
${offset 240}${color}Inbound: ${color}${tcp_portmon 1 32767 count} ${color}Outbound: ${color}${tcp_portmon 32768 61000 count}
${alignr}${color}Total: ${color}${tcp_portmon 1 65535 count}
${offset 240}${color slate grey}Inbound Connection ${alignr} 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}
${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
${offset 240}${color slate grey}Outbound Connection ${alignr} Port${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 1} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 3}