1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-10-02 23:19:08 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Magliano Andrea
abdb5582bd Proper handle missing statfs64
statfs64 ist atm linux specific; wrap statfs around it.

Also cleanup param.h and mount.h including: the assumption in fs.cc
that their presence is a sign of *BSDs is wrong, as they exist in
linux too with different meaning.

Besides presence of mount.h isn't detected in Conky.cmake, so
conditional including mount.h in fs.cc is useless. Is just works
because mount.h and param.h are included in freebsd.h and dragonfly.h
later on. They are unneded in linux.

Just remove conditional including of mount.h and param.h in fs.cc,
conditional wrap statfs64 in proper *BSD header files.
2012-07-06 15:13:59 +02:00
Pavel Labath
31c2f82842 Fall back to statfs if statfs64 not present
mostly needed for the dragonfly port (sf.net #3289079)
2012-07-05 16:41:58 +02:00
Magliano Andrea
98196d0e6b Preliminary import from 2.8.1 git release
* don't use kvm_* calls, just sysctl (so no suid perm necessary)

* sysctls calls in general aren't thread safe, collapse callbacks
  using same sysctls (specifically total/running procs and proc list
  ones).

  Some sysctls need two calls (first to get size of obj returned,
  second to get object self); if different threads use this schema
  on same sysctl, weird values are returned (first/second calls
  sequence should be serialized).

  In general it makes not much sense too having more threads that use
  the same sysctl; just get info once and populate all data.

* add DragonFly specific extended uname string ($version in conky.conf)
  with git version and signature

Todo:

- top process list logic is old style, use top.cc funcs.
- find a solution for cpu freq

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2012-06-28 18:56:01 +02:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Pavel Labath
09dd497314 Second part of the statfs64 patch
this also fixes the $fs_type variable.
2011-11-02 19:18:02 +01:00
Pavel Labath
dccf796b42 Use statfs64 for $fs_* to support very large volumes
bug reported by puppetm.
2011-11-01 16:17:15 +01:00
Pavel Labath
14511b19ea Make $fs_used_perc and $fs_bar report used space correctly
they reported fs->size - fs->avail, which is not correct if fs has super-user reserved blocks.

note that now $fs_used_perc and $fs_free_perc need not add up to 100%, but that is consistent
with what $fs_used and $fs_free do.
2010-08-12 20:58:21 +02:00
Nikolas Garofil
a32d9e41a4 Bugfix: memory and thread-deleting problems
For example the following config had a problem:
TEXT
$i8k_cpu_temp

I could fix it shorter, but then valgrind would still show memleaks
2010-05-05 18:46:04 +02:00
Nikolas Garofil
7791e34900 Make sure that fs.cc compiles in FreeBSD 2010-02-14 15:09:12 +01:00
Brenden Matthews
620e9876a4 C++ conversions WIP.
Currently stuck on an issue with g++ and using '%lli' with printf/scanf.
2010-01-04 19:21:12 -08:00