Blame doc/reference/html/libgtop-white-paper.html

Packit d37888
Packit d37888
<html>
Packit d37888
<head>
Packit d37888
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit d37888
<title>White paper: Libgtop Reference Manual</title>
Packit d37888
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit d37888
<link rel="home" href="index.html" title="Libgtop Reference Manual">
Packit d37888
<link rel="up" href="index.html" title="Libgtop Reference Manual">
Packit d37888
<link rel="prev" href="index.html" title="Libgtop Reference Manual">
Packit d37888
<link rel="next" href="libgtop-white-paper-overview.html" title="Overview">
Packit d37888
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
Packit d37888
<link rel="stylesheet" href="style.css" type="text/css">
Packit d37888
</head>
Packit d37888
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit d37888
Packit d37888
Packit d37888
Home
Packit d37888
Packit d37888
Prev
Packit d37888
Next
Packit d37888
Packit d37888
Packit d37888

Packit d37888
White paper
Packit d37888
Packit d37888
Introduction
Packit d37888
Overview
Packit d37888
Packit d37888
Interface Design: Things that need to be considered
Packit d37888
Server Implementation: The LibGTop "server"
Packit d37888
Packit d37888
Packit d37888
Packit d37888

Packit d37888
Introduction
Packit d37888

Many modern UNIX systems like Solaris, BSD or Digitial Unix

Packit d37888
      only allow priviledged processes to read information like CPU and 
Packit d37888
      Memory Usage or information about running processes.

Packit d37888
    Packit d37888
  • Packit d37888
          BSD, for instance, doesn't have any other way to get those data than reading
    Packit d37888
          directly from @file{/dev/kmem} and you need to be in the @code{kmem} group to
    Packit d37888
          be able to read this.

    Packit d37888
  • Packit d37888
          Other systems, like Digital Unix, allow all users to get things like CPU and
    Packit d37888
          Memory statistics, but only root may read information about any process other
    Packit d37888
          than the current one (you may not even get information about your own processes
    Packit d37888
          if you're not root).

    Packit d37888
  • Packit d37888
          Linux has a very nice @file{/proc} filesystem, but reading and parsing
    Packit d37888
          @file{/proc} is very slow and inefficient.

    Packit d37888
  • Packit d37888
          Solaris is a bit better, but you still need to be in the @code{sys} group or
    Packit d37888
          even root to get some data.

    Packit d37888
    Packit d37888

    Packit d37888
          Because of this system utilities like @code{ps}, @code{uptime} or @code{top}
    Packit d37888
          often are setgid kmem or setuid root. Usually, they're also very specific to
    Packit d37888
          the system they're written for and not easily portable to other systems without
    Packit d37888
          a lot of work.

    Packit d37888

    Packit d37888
          This, of cause, becomes a problem for graphical tools like @code{gtop} - making
    Packit d37888
          a GTK+ program setgid or even setuid would be a security hole as big as you can
    Packit d37888
          drive the entire X11 source code through. For the GNOME project, we also needed
    Packit d37888
          some kind of library which provides all the required information in a portable
    Packit d37888
          since there's more than just one single program that wants to use them - for
    Packit d37888
          instance @code{gtop} and the @code{multiload}, @code{cpumemusage} and
    Packit d37888
          @code{netload} panel applets.

    Packit d37888
    Packit d37888
    Packit d37888
    Packit d37888

    Generated by GTK-Doc V1.25
    Packit d37888
    </body>
    Packit d37888
    </html>