/usr/share/gtk-doc/html/libgtop/libgtop-white-paper.html is in libgtop2-doc 2.34.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>White paper: Libgtop Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Libgtop Reference Manual">
<link rel="up" href="index.html" title="Libgtop Reference Manual">
<link rel="prev" href="index.html" title="Libgtop Reference Manual">
<link rel="next" href="libgtop-white-paper-overview.html" title="Overview">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="index.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgtop-white-paper-overview.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h1 class="title">
<a name="libgtop-white-paper"></a>White paper</h1></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="sect1"><a href="libgtop-white-paper.html#libgtop-white-paper-introduction">Introduction</a></span></dt>
<dt><span class="sect1"><a href="libgtop-white-paper-overview.html">Overview</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="libgtop-white-paper-overview.html#libgtop-white-paper-overview-design">Interface Design: Things that need to be considered</a></span></dt>
<dt><span class="sect2"><a href="libgtop-white-paper-overview.html#libgtop-white-paper-overview-server">Server Implementation: The LibGTop "server"</a></span></dt>
</dl></dd>
</dl></div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="libgtop-white-paper-introduction"></a>Introduction</h2></div></div></div>
<p>Many modern UNIX systems like Solaris, BSD or Digitial Unix
only allow priviledged processes to read information like CPU and
Memory Usage or information about running processes.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
BSD, for instance, doesn't have any other way to get those data than reading
directly from @file{/dev/kmem} and you need to be in the @code{kmem} group to
be able to read this.</p></li>
<li class="listitem"><p>
Other systems, like Digital Unix, allow all users to get things like CPU and
Memory statistics, but only root may read information about any process other
than the current one (you may not even get information about your own processes
if you're not root).</p></li>
<li class="listitem"><p>
Linux has a very nice @file{/proc} filesystem, but reading and parsing
@file{/proc} is very slow and inefficient.</p></li>
<li class="listitem"><p>
Solaris is a bit better, but you still need to be in the @code{sys} group or
even root to get some data.</p></li>
</ul></div>
<p>
Because of this system utilities like @code{ps}, @code{uptime} or @code{top}
often are setgid kmem or setuid root. Usually, they're also very specific to
the system they're written for and not easily portable to other systems without
a lot of work.</p>
<p>
This, of cause, becomes a problem for graphical tools like @code{gtop} - making
a GTK+ program setgid or even setuid would be a security hole as big as you can
drive the entire X11 source code through. For the GNOME project, we also needed
some kind of library which provides all the required information in a portable
since there's more than just one single program that wants to use them - for
instance @code{gtop} and the @code{multiload}, @code{cpumemusage} and
@code{netload} panel applets.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|