stdout rather than the usual curses interface. This mode is intended
for debugging a single client with something like
.br
- xrestop \-b | grep \-A 15 appname
+ xrestop \-b | grep \-A 14 appname
.TP
\fB\-\-max\-samples, \-m\fP <count>
Specify number of times to gather and display results.
+++ /dev/null
-
-Name: xorg-x11-utils-xrestop
-Summary: X11 server resource usage monitor
-Version: 0.4
-Release: 7
-Group: System/X11
-License: MIT
-URL: http://www.x.org
-Source0: http://xorg.freedesktop.org/releases/individual/app/xrestop-%{version}.tar.gz
-BuildRequires: pkgconfig(xorg-macros)
-BuildRequires: pkgconfig(ncurses)
-BuildRequires: pkgconfig(xext)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(xres)
-BuildRequires: pkgconfig(xproto)
-BuildRequires: pkgconfig(ice)
-
-
-%description
-xrestop uses the X-Resource extension to provide top(1)-like statistics
-for each connected X11 client's server-side resource usage. It is intended
-as a developer tool to aid more efficient server resource usage and debug
-server-side resource leakage.
-.
-xrestop requires the X-Resource extension, supported by XFree86 4.3 and
-above, and by the freedesktop.org X server.
-
-
-%prep
-%setup -q -n xrestop-%{version}
-
-
-%build
-
-%reconfigure --disable-static \
- --libdir=%{_datadir}
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-
-
-
-
-%files
-%defattr(-,root,root,-)
-%{_bindir}/xrestop
-%{_mandir}/man1/xrestop.1.gz
-
--- /dev/null
+Summary: X Resource Monitor
+Name: xrestop
+Version: 0.4
+Release: 10
+License: GPLv2+
+Group: Development/Tools
+URL: http://www.freedesktop.org/Software/xrestop
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+BuildRequires: ncurses-devel libXres-devel libXext-devel libX11-devel
+BuildRequires: libXau-devel
+
+%description
+A utility to monitor application usage of X resources in the X Server, and
+display them in a manner similar to 'top'. This is a very useful utility
+for tracking down application X resource usage leaks.
+
+%prep
+%setup -q
+
+%build
+%reconfigure
+make %{?jobs:-j%jobs}
+# SUBDIRS=
+
+%install
+rm -rf "$RPM_BUILD_ROOT"
+make DESTDIR="$RPM_BUILD_ROOT" install
+#SUBDIRS=
+
+%remove_docs
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%files
+%defattr(-,root,root,-)
+#%doc AUTHORS COPYING NEWS README
+%{_bindir}/xrestop
+#%{_mandir}/man1/xrestop.1*
clear();
- mvprintw(0, 0, "xrestop - Display: %s",
- app->dpy_name);
+ mvprintw(0, 0, "xrestop - Display: %s:%i",
+ app->dpy_name ? app->dpy_name : "localhost", app->screen);
mvprintw(1, 0, " Monitoring %i clients. XErrors: %i", app->n_clients, app->n_xerrors);
mvprintw(2, 0, " Pixmaps: %8s total, Other: %8s total, All: %8s total",
usage(argv[0]);
}
- if (app->dpy_name == NULL)
- {
- app->dpy_name = getenv("DISPLAY");
- }
-
if ((app->dpy = XOpenDisplay(app->dpy_name)) == NULL)
{
fprintf(stderr, "%s: Unable to open display!\n", argv[0]);