Commit Graph

130 Commits

Author SHA1 Message Date
Bill Wilson 0602b3c15f Change fs usage data from 32 bit to 64 bit
Also stop compiler warnings if compiling md5c.c.
2015-07-15 12:32:48 -05:00
Bill Wilson 285adc8acd Avoid possible busy loop in read_server_setup()
A patch from Joe Garcia.  A ssh tunnel can be up but possibly not
connected to anything in which case gkrellm_getline() can return 0.
This patch prevents a busy loop by limiting the 0 return retries.
2014-11-05 17:46:37 -06:00
Jindřich Makovička f3f67b7919 fix copy/paste error
This regression was introduced by commit
6365d18ad0
2014-10-26 21:58:55 +01:00
Bill Wilson e15c0d4a02 Fix deprecated allow-shring & allow-grow warnings
Reported by Troy Engel, avoid recent GTK version deprecated warnings
by using gtk_window_set_resizable().
2014-10-21 18:49:41 -05:00
Bill Wilson 2846b9a6f2 CPU config
Add one more CPU chart text format string option as
final change before the rc1 tarball release.
2014-10-16 11:57:37 -05:00
Bill Wilson 62c2fe4ad4 Config appearance and one option change
Edit one of the CPU chart text format string options.

Fix gkrellm_category_vbox() so the returned vbox will be expanded like
it should be.  This exposed a clock config box packing needing a change.

The Disk Launch Commands vbox was packed into the wrong box.
2014-10-15 13:50:40 -05:00
Bill Wilson 8b1833342e Update version and dates
Change version to 2.3.6-RC1 for a soon to be release candidate.

Update Copyright dates to 2014 (touches almost all files)
2014-10-14 20:16:43 -05:00
Bill Wilson e89ca2982a For SMP machines add individual CPU chart enables and CPU panel label hiding.
- Replace SMP real CPU group enable with individual real CPU enables.
  I've had requests for this feature from people with 24 - 32 cpu machines
  where there is insufficient vertical space for all cpu charts and they
  want to split the CPU charts into multiple gkrellm stacks with --config.

- Add option to show/hide CPU panel labels so only a krell can be in the
  panels. Not showing CPU panel labels saves vertical space - for systems
  with medium to large numbers of CPUs.  I find it useful with 4+ CPUs.
  To make up for no panel label, added new chart label format string options
  that draw the CPU label on the chart.
  Temp and fan sensors cannot be relocated to CPU panels if labels not shown.
2014-10-14 16:42:38 -05:00
Bill Wilson 60df57eaa6 Cleanups and patches
mail.c: replace deprecated g_mutex_new() with g_mutex_init() and
fix const discarded warnings.

plugins.c: gkrellm_place_plugin() change code that inserts plugins into
monitor_list to avoid compiler warnings.

Patch from Ville Skytta: fix issues flagged by cppcheck:
 - netbsd.c: add some close(fd) calls before returns in gkrellm_sys_battery_init().
 - winops-win32.c: add a free() in gkrellm_winop_place_gkrellm().

Bugfixes:
 - chart.c: flag config modified when changing a chart's Resolution per Grid.
 - fix memory leaks in multiple files: add g_thread_unref() for all GThread
   pointers returned from g_thread_new() calls.
2014-10-11 19:37:47 -05:00
Stefan Gehn 56bd6fac14 Enable ASLR and DEP on Windows builds
Always enable ASLR and DEP when building GKrellM on Windows. Since
GKrellM also does network communication bugs like buffer overflows and
the like may eventually allow remote code execution. By enabling these
build flags such attacks should be quite a bit more complicated
(although still not impossible).
2014-10-05 12:22:42 +02:00
Stefan Gehn 1ffcfaca72 Use same cc/pkg-config in make and configure
- Export the CC and PKG_CONFIG variables before calling configure scripts,
especially for cross compilation and modified environments, otherwise
configure might detect libraries that are not usable by the compiler
later on

- Replace the hardcoded pkg-config calls in configure with a variable
  that may be overridden by Makefile
2014-10-05 12:22:42 +02:00
Stefan Gehn 5cd8fb8db0 Fix configure script in cross compile environments
Do not try to execute generated executables. Altough this is a nice
idea in theory it breaks on cross compile environments which usually
cannot execute binaries of the target platform.
2014-10-05 12:22:42 +02:00
Stefan Gehn 320055e6c1 Drop configure dependency on Gtk+2
Remove Gtk+2 compile and link flags from all configure tests because:
- no test code depends on Gtk+2
- gkrellmd does not need Gtk+2 at all
- the cflags variable in the src/configure was misspelled and thus did
  not have any effect
2014-10-05 12:22:42 +02:00
Stefan Gehn b0b6b5d559 Share makefile rules and vars between client/server
Move all make variables and rules duplicated between gkrellm and
gkrellmd makefiles into a common file that can be included. This
avoids duplication and hopefully avoids the two makefiles getting out
of sync too much. This is also a preparation to ease overriding
toolchain binaries (compiler, linker, pkgconfig) as part of windows
cross compiling.

This change also puts the "ar" tool into a variable that can be
overridden if needed.

Please note that this change uses the GNU Make specific include
statement but AFAICS the makefiles already depend on GNU extensions in
other areas (":=" and "ifdef" are non-standard make syntax).
2014-10-05 12:18:35 +02:00
Stefan Gehn 434d79d413 Add option to enable/disable new network interfaces by default
Apply a slightly modified version of a patch provided by Pierre Neyron
that allows to enable/disable new network interfaces by default.

This feature is especially helpful for VM or container setups where many
network interfaces are created.
2014-08-23 17:25:05 +02:00
Stefan Gehn eb0a44b64b Spelling fixes
Fix several spelling mistakes in code comments as well as the Changelog.

Thanks to Ville Skyttä for providing the patch.
2014-07-12 22:48:16 +02:00
Stefan Gehn 4ff218d726 Drop GLib 1.x compatibility for gkrellmd
GLib version 1 is very outdated by now and not available in any recent
Linux distribution. Keeping this code around without actually being
able to test it makes little sense so let's get rid of that.
2014-07-12 22:45:33 +02:00
Stefan Gehn 5c40eea518 Fix inconsistent path generation and checks on win32
- Always check the return value of
  g_win32_get_package_installation_directory_of_module, this call may
  fail and return NULL
- g_build_filename is documented as never returning NULL, no need to
  check for that
2014-07-12 22:45:14 +02:00
Stefan Gehn 33133c63ae Remove compatibility code for GLib < 2.32
Since the minimum GLib version is now 2.32 the code paths for older GLib
2 versions can be removed too.
2014-07-12 22:45:14 +02:00
Stefan Gehn 6e3ee7db10 Port to GLib >= 2.32 GThread API
- Use g_thread_new instead of g_thread create
- Drop explicit call of g_thread_init, it is done implicitely by GLib
  since 2.32
- Since this bumps the minimum required GLib version add and extend the
  pkg-config based version checks to error out on older GLib versions
2014-07-12 22:45:08 +02:00
Stefan Gehn 766bcc70f5 Fix signedness warnings for sscanf calls 2014-07-09 22:23:41 +02:00
Stefan Gehn b9f24e8c80 Use g_strdup instead of standard strdup
The remaining codebase uses g_strdup() already so do the same for the
chime command too. This fixes a gcc warning caused by a missing include
for strdup().
2014-07-09 22:23:41 +02:00
Stefan Gehn cfc573790e Disable unused X11 SM code parts
Move all variable and struct init code into if 0 blocks like the code
that is supposed to use this. Eventually this whole cruft can be
dropped altogether in case GKrellM can be ported to use Gtk+ session
management.
2014-07-09 22:23:41 +02:00
Stefan Gehn b279d76837 Remove set but unread variables
- Adding a sensor in the mbmon support stored the added sensor in a
  pointer but never used it afterwards
- Drop pixbuf width in draw_left_frame_overlap, the code unlike other
  drawing helpers does not use the pixbuf width
- Remove unused scroll selection from net_stats_page

This fixes several set but unread warnings when compiling with a recent
gcc (encountered with gcc 4.8.2).
2014-07-09 22:23:41 +02:00
Stefan Gehn 720ac43b8c Add support for GPU-Z sensor information on Windows
Read sensor information from the GPU-Z shared memory area if present.
As with all sensor backends on Windows this needs the GPU-Z tool
running in the background.
2014-07-09 22:06:19 +02:00
Stefan Gehn d712ce32ce Wait as short as possible after starting win32 sensor app
Do not use a fixed 5 second delay after having a started a windows
sensor application, instead try to access the shared memory area
repeatedly and only give up after 10 seconds. Please note that for this
feature to be usable the sensor app must be found in PATH.
2014-07-09 22:06:19 +02:00
Stefan Gehn ff5cd65678 Simplify win32 shared memory access
- Move opening and closing of a win32 shared memory area into helper
  functions. shm_open ensures that the data pointer is valid and
  otherwise gets rid of the opened file handle right away. shm_close
  cleans up both the handle and the data pointer if needed.

- Redo the initial check for presence of a sensor tool that uses a
  shared memory area for its sensor data by using the above two
  functions

- Port all sensor value reading to use shm_open/shm_close as well

This gets rid of some code duplication and also lowers the indentation
level in several areas which hopefully makes the code a bit easier to
read. Additionally all the win32 API calls are limited to two functions.
2014-07-09 22:06:19 +02:00
Stefan Gehn 4991b98879 Move win32 sensor code into own file
The window sysdep code is quite long by now and since I plan to add
more to it let's split things up to have smaller portions of code to
work on.
2014-07-09 22:06:18 +02:00
Stefan Gehn d33190cc0b Remove unsupported linker flags for windows builds
Do not use the default LINK_FLAGS value for windows builds, the default
"-E" linker option only causes warnings for MinGW since it's essentially
ignored by the linker.

The flag is also unneeded since linking plugins against the gkrellm
binary is not done on win32 so none of the gkrellm/gkrellmd functions
need to be exported, the API is manually exposed via the win32-specific
libgkrellm/libgkrellmd static libs.
2014-07-09 22:04:42 +02:00
Stefan Gehn da95bca5c5 Simplify setting default installation prefix
Just setting a default value for PREFIX should have the same result as
an explicit check for an empty INSTALLROOT variable.
2014-04-18 09:29:57 +02:00
Stefan Gehn eb0ded8d55 Use binary extension during gkrellm build
Honor the BINEXT variable in the gkrellm and gkrellmd target to enforce
building with the correct extension. This is needed for recent mingw-w64
cross toolchains since those do not automatically append ".exe" when
linking.
2014-04-18 09:29:27 +02:00
Stefan Gehn 3a487e3271 Check all battery variants when polling
On Thinkpads T410s sysfs may switch between energy_full/_now and
charge_full/_now files across suspend/resume. Instead of polling only
one set of files always try all variants when checking battery levels.
This fixes a battery level of 0 in GKrellM after resume.

Thanks to Joern Engel for tracking this down and for providing a patch
via the Debian bugtracker.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630117
2013-07-29 20:23:15 +02:00
Stefan Gehn 8abd662cd6 Add missing include and link args for gmodule
Explicitely add needed include arguments as well as linker arguments
for gmodule. Before this change we relied on gmodule being an implicit
dependency pulled in via the gtk+-2.0 module, this does not seem to be
the case anymore with >=gdk-pixbuf-2.24 and >=pango-1.30.

Thanks for Alexandre Rostovtsev for bringing this up on the mailinglist
and for providing a first patch.

See also https://bugs.gentoo.org/show_bug.cgi?id=428532
2013-07-20 14:08:38 +02:00
Stefan Gehn 956bd11b50 Treat cifs as remote filesystem
Mark mount points of type cifs as remote filesystems to make gkrellm use
nfs-timeout as polling interval instead of the standard fs-timeout which
should only be used to poll local filesystems.

Thanks to Gerard Neil for submitting this patch.
2013-07-20 14:02:15 +02:00
Stefan Gehn 0db8bfd07a Do not scan autofs mount points
Accessing mount points to determine free space actually triggers a
mounting operation of autofs mounts. This results in all autofs mount
points to be always-mounted while gkrellm is running, something which
is hardly desirable.

Thanks to Gerard Neil for submitting this patch.
2013-07-20 14:02:07 +02:00
Stefan Gehn 207a0519ac Do not free nullpointer in Darwin disk reading
Calling CFRelease() on a NULL value is wrong and causes crashes.
This should fix MacPorts ticket #29565.
2011-12-05 17:12:28 +01:00
Stefan Gehn fdc17315b7 Do not include gcrypt.h for newer GnuTLS versions
Not linking against Libgcrypt is not enough, we also should not try to
include headers. This fixes GnuTLS >= 2.12 detection when Libgcrypt
headers are not installed/found.
2011-11-26 20:00:53 +01:00
Stefan Gehn 752e5965b1 Only use Libgcrypt for GnuTLS < 2.12
Only initialize Libgcrypt threading functions on GnuTLS < 2.12 which
does not do this automatically. Also drop explicit linking against
Libgcrypt on newer GnuTLS version.

This should allow GKrellM to work with a GnuTLS that uses Nettle instead
of Libgcrypt as its cryptographic backend.
2011-08-27 16:51:46 +02:00
Bill Wilson 50b126e085 Patch from Neil Booth: Add multiple CPU capability to CPU monitor for
Dragonfly.  Acquired dragonfly.c from web so could apply patch.
I have no clue why I never had a dragonfly.c.
2011-08-08 16:06:26 -05:00
Bill Wilson 40c7cb01ce Store lockfiles under /var/lock/gkrellm-UID directories to make
lockfiles work for multiple users.
2011-08-08 15:53:14 -05:00
Bill Wilson 6365d18ad0 And some more Jindrich Makovicka patch changes for GTK3 compatibility. 2011-08-08 15:48:18 -05:00
Bill Wilson 7fee71d39f More GTK3 compatibility changes in mail.c from Jindrich Makovich 2011-08-08 15:44:46 -05:00
Bill Wilson 873fed3c1e Patch from Jindrich Makovicka: update multiple GKrellM files to compile
with -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE for GTK3 compatibility.
Replaces GtkItemFactory and GtkTooltips.
2011-08-08 15:39:22 -05:00
Bill Wilson 421cb3102e Add nvidia-smi interface to linux.c for getting nvidia GPU temperatures 2011-08-08 15:13:31 -05:00
Stefan Gehn f1d238478d Fix reading of speedfan shared memory area on win64, make the "handle" field a 32bit signed integer instead of a void pointer (whose length differs depending on the arch gkrellm was built for) 2010-10-09 16:14:11 +00:00
Stefan Gehn 065787f24f Merge with gkrellm-2.3.5.tar.bz2 (release tarball) 2010-10-08 06:55:09 +00:00
Stefan Gehn bf3d25c568 Merge with gkrellm-2.3.5-pre2.tar.bz2 2010-10-06 21:38:56 +00:00
Stefan Gehn 6bd26e8401 Allow disk paths of (almost) any length in both gkrellm and gkrellmd.
monitor.c: serve_disk_data() now uses a dynamic buffer for to-be-sent disk-lines instead of relying on a very short static array.
client.c: read_server_setup() now uses a static read buffer that is as big/small as the global server_buf. client_disk_line_from_server() now uses a dynamic string for disk names.
2010-10-06 20:50:45 +00:00
Stefan Gehn c67cf611a6 - gkrellm.h. Bump maximum line-/item-length for config to 512 (needed for long disk names on Darwin).
- src/disk.c, server/monitor.c: Add gkrellm_disk_add_by_name() that allows creating disks with a custom label from sysdep code.
- src/Makefile, server/Makefile: Cleanup of darwin/darwin9/macosx targets. All custom variables are now set in src/Makefile and server/Makefile to allow easy building inside these subdirs. Removed very old link-flags which were used before OS X 10.3.
- All Makefiles: Remove unused GTK_CONFIG definitions, they were neither passed as an argument nor executed anywhere.
- Makefile: Update comments documenting Darwin and OS X targets (darwin, darwin9 and macosx)
- src/sysdeps/darwin.c: Use utmpx instead of deprecated utmp.
- src/sysdeps/darwin.c: Fix possible leak in gkrellm_sys_cpu_init(), pinfo was never free'd.
- src/sysdeps/darwin.c: Rewrite disk device enumeration and performance gathering. The previous implementation failed as soon as a single device contained no medium, resulting in no/wrong performance data for all subsequent devices. Also provides labels for krells based on real device-names (uses new gkrellm_disk_add_by_name()).
2010-09-23 15:31:24 +00:00
Stefan Gehn d36c3ec662 Fix missing format-strings to avoid compiler warnings 2010-09-23 15:06:21 +00:00