-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"conky: statfs64 '/media/usbstick': No such file or directory" spam in ~/.xsession-errors #208
Comments
This bug becomes more important when considering this script: http://www.linuxforums.org/forum/ubuntu-linux/169744-conky-display-all-mounted-drives-post944444.html#post944444 |
I looked at the code and the rest of this issue which is not covered in #205, would need a major(?) rewrite, because it seems that every But that may not be the only problem. It seems like the Would such a rewrite even be welcome? |
I agree with adding the argument, as a matter of fact you could remove I can not comment on your second paragraph. If you feel like digging into this issue I would say a rewrite would be appreciated. |
I have encountered the same problem (conky 1.10.6). |
Duplicate #334. Closing. |
Having the same problem with
#! /bin/sh
DIR=$(conky-colors --finddir=scripts/conkyHD1.py)
pythoncmd="$DIR/scripts/conkyHD1.py $@"
cmd="/usr/bin/python $pythoncmd"
exec $cmd #!/usr/bin/env python3
import sys
from os.path import abspath, dirname
directory = dirname(abspath(__file__))
sys.path.insert(0, directory)
from hdcommon import get_partitions
print("${voffset 4}")
for device, devicename in get_partitions():
var_map = {'device': device, 'devicename': devicename}
print("${voffset -10}${offset 0}${color0}${font ConkyColors:size=15}i${font}${color}${offset 6}"
"${voffset -10}%(devicename)s: ${font Ubuntu:style=Bold:size=8}${color1}"
"${fs_free_perc %(device)s}%%${color}${font}\n" % var_map)
print("${voffset -10}${offset 1}${color0}${fs_bar 4,17 %(device)s}${color}${offset 10}"
"${voffset -2}F: ${font Ubuntu:style=Bold:size=8}${color2}${fs_free %(device)s}${color}"
"${font} U: ${font Ubuntu:style=Bold:size=8}${color2}${fs_used %(device)s}${color}${font}\n" % var_map)
print("${voffset -10}") #!/usr/bin/env python3
import os
from os.path import normpath, basename, ismount
from subprocess import Popen, PIPE
def get_partitions():
p_lsblk = Popen(['lsblk'], stdout=PIPE)
p_awk = Popen(['awk', '{print $7}'], stdin=p_lsblk.stdout, stdout=PIPE)
p_grep = Popen(['grep', '/'], stdin=p_awk.stdout, stdout=PIPE)
p_lsblk.stdout.close()
p_awk.stdout.close()
output = p_grep.communicate()[0]
for line in output.splitlines():
device = line.rstrip().decode('utf-8')
if not ismount(device):
continue
if device.startswith('/snap/') or device == '/boot/efi':
continue
if (device == "/"):
yield device, "Root"
else:
yield device, basename(normpath(device)).capitalize() |
|
Looks like the only workaround for now is
which is also annoying because it flickers. |
fixes brndnmtthws#208 hopefully properly by tracking which fs_stats entries are actually being used as an aside, also fixes the niche but possible issue of slowly running out of fs_stats entries despite never having too many at one time
I make heavy use of the
if_mounted
directive to create an almost comprehensive disk usage stat for all my mounted devices similar to the windows workplace view, because I miss this in Linux. The problem is, that some directories are only created by the xfce auto mount service whenever that device, e.g. USB thumb drive is actually mounted. This means if that device is not mountedif_mounted
won't work, because it can't even find the folder. As a result the following commandwill spam my
.xsession-errors
with the message in the title. I only noticed this, because that file is ~500MB large. The lines containing 'conky' are 198715 out of 5771768. So roughly 4% While it is not a major part, it still is not nothing.I tried solving this problem by using
if_existing
but it doesn't seem to work.Neither
EXISTS
norAND MOUNTED
will be displayed, but it seems statfs64 will be called anyway. Note that commenting outfs_type
will quelch that warning message. So it doesn't seem to stem fromif_mounted
. Instead it seems thatif_mounted
anif_existed
control only what is displayed, but not what is executed. I think this should be changed.Furthermore deleting e.g. the lines with
mimi
will still callstatfs64
even after the config-file is autoreloaded. I have to restart conky completely to quelch that statfs64 call. I think this also is a very minor bug.The text was updated successfully, but these errors were encountered: