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

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

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

Packit Service 407539
Introduction
Packit Service 407539

Many modern UNIX systems like Solaris, BSD or Digitial Unix

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

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

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

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

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

    Packit Service 407539
    Packit Service 407539

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

    Packit Service 407539

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

    Packit Service 407539
    Packit Service 407539
    Packit Service 407539
    Packit Service 407539

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