mercredi 30 septembre 2009

mardi 15 septembre 2009

Kernel Mode Setting (kms)

http://www.ubuntulinux.fr/index.php?post/2009/06/09/Tester-le-Kernel-Mode-Setting-(kms)-avec-une-carte-ATI


«Le kms est le fait que c'est le noyau qui apporte la gestion des accès à la carte graphique. Cela permet par exemple de faire tourner le serveur graphique sans lui donner de permissions de type root. Cela permettra également d'avoir des messages d'erreurs graphiques (l'écran marron de la mort ?). Et cela permettra d'éviter d'avoir des écrans qui scintillent/clignotent lors de changements de résolutions ou de basculements entre terminaux.»

dimanche 23 août 2009

live network trafic view ? iptraf, iftop

A explorer

http://www.commentcamarche.net/faq/sujet-848-linux-trafic-entrant-sortant-en-temps-reel


On trouvera ci dessous les extraits des deux manpages de iptraf et ethstatus.
Intéressant pour comptabiliser la quantité de données qui circulent sur les différentes interfaces, ainsi que pour monitorer quelles sont les connexions ouvertes.

Après un bref test, "ethstatus" m'a cependant l'air d'utiliser beaucoup de ressources CPU, et semble être surtout un reformatage des infos d'ifconfig. Peu intéressant donc.

Au contraire, "iptraf" était plus léger et apportait plus d'informations.

Egalement, iftop fourni plus d'informations et permet de lister les connextions courantes un peu comme "top" le ferait.






IPTRAF(8) IPTRAF(8)

NAME
iptraf - Interactive Colorful IP LAN Monitor

SYNOPSIS
iptraf { [ -f ] [ -q ] [ -u ] [ { -i iface | -g | -d iface | -s iface |
-z iface | -l iface } [ -t timeout ] [ -B [ -L logfile ] ] ] | [ -h ] }

DESCRIPTION
iptraf is an ncurses-based IP LAN monitor that generates various net‐
work statistics including TCP info, UDP counts, ICMP and OSPF informa‐
tion, Ethernet load info, node stats, IP checksum errors, and others.

If the command is issued without any command-line options, the program
comes up in interactive mode, with the various facilities accessed
through the main menu.



IFTOP(8) IFTOP(8)

NAME
iftop - display bandwidth usage on an interface by host

SYNOPSIS
iftop -h | [-nNpbBP] [-i interface] [-f filter code] [-F net/mask]

DESCRIPTION
iftop listens to network traffic on a named interface, or on the first
interface it can find which looks like an external interface if none is
specified, and displays a table of current bandwidth usage by pairs of
hosts. iftop must be run with sufficient permissions to monitor all
network traffic on the interface; see pcap(3) for more information, but
on most systems this means that it must be run as root.

By default, iftop will look up the hostnames associated with addresses
it finds in packets. This can cause substantial traffic of itself, and
may result in a confusing display. You may wish to suppress display of
DNS traffic by using filter code such as not port domain, or switch it
off entirely, by using the -n option or by pressing R when the program
is running.

By default, iftop counts all IP packets that pass through the filter,
and the direction of the packet is determined according to the direc‐
tion the packet is moving across the interface. Using the -F option it
is possible to get iftop to show packets entering and leaving a given
network. For example, iftop -F 10.0.0.0/255.0.0.0 will analyse packets
flowing in and out of the 10.* network.

lundi 20 juillet 2009

open microblogging tool (or : An open source twitter)

Laconi.ca is used on the website identi.ca as an open microblogging
tool. Microblogging is well known with the famous Twitter that allows
post of ~140 characters


The platform is freely (AGPL) available at :

http://laconi.ca/

There are plenty of plugins and application that can use it, and for
example it is working with :
* webinterface
* Jabber/GTalk
* email
* SMS


For those who only want to try it, they even made a concurrent of
twitter using the platform :

http://identi.ca/

tag: web, blog, php, opensource

jeudi 16 juillet 2009

Jgraph, command line tool for graphics

Command-line graph production.

The input describe some plotting or curving with a language quite straightforward to read and write, and produces an image (ps, eps, gif, ...).


Main Website :
http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.html

Some examples & first hands on Jgraph :
http://www.cs.utk.edu/~plank/plank/classes/cs494/494/notes/Jgraph/lecture.html

"Brief Description"
"Jgraph is a program that takes the description of a graph or graphs as input, and produces a postscript file on the standard output. Jgraph is ideal for plotting any mixture of scatter point graphs, line graphs, and/or bar graphs, and embedding the output into LaTeX, or any other text processing system that can read postscript. "


There are 2 JGraph, and the most referenced on the web search engines is a Java library. This is obviously NOT about that jgraph...

PDF tool kit : pdftk

pdftk is a toolkit available for example on ubuntu repositories. It seems to be from the "PDF Hacks" book.


Main Webpage :
http://www.accesspdf.com/pdftk/


List of the features found on the website (Latest Version: 1.41, Released: November 28, 2006) :

  • Merge PDF Documents
  • Split PDF Pages into a New Document
  • Rotate PDF Pages or Documents
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
  • Apply a Background Watermark or a Foreground Stamp
  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
  • Update PDF Metadata
  • Attach Files to PDF Pages or the PDF Document
  • Unpack PDF Attachments
  • Burst a PDF Document into Single Pages
  • Uncompress and Re-Compress Page Streams
  • Repair Corrupted PDF (Where Possible)

vendredi 10 juillet 2009

svn + ssh on NetBSD

Problème : sur une machine uniquement accessible en ssh, je souhaite installer un serveur svn pour la gestion de version. Je souhaite avoir plusieurs utilisateurs. Ces utilisateurs doivent pouvoir faire des "checkout", des "commit", et autres opérations avec svn, mais ne doivent pas pouvoir se logguer sur le serveur pour autre chose que pour utiliser le serveur.

1ère étape :
Création d'un utilisateur svn qui sera celui utiliser pour se logguer sur le serveur.

1.1 Authentification par clefs publique/privée ssh

 Chaque utilisateur créé une clef ssh ( ssh-keygen ). Ajouter la clef publique générée dans ~/.ssh/authorized_keys

cat clef.pub > ~svn/.ssh/authorized_keys

Maintenant les utilisateurs peuvent se logguer directement en tant que l'utilisateur svn.

Allons voir un peu plus avant le contenu du fichier ~svn/.ssh/authorized_keys ...
Chaque ligne est indépendante, et de la la forme
  command="COMMAND" TYPE KEY COMMENT

En utilisant cette syntaxe, pour restreindre l'accès uniquement au service svn, on peut également ajouter "no-port-forwarding" ainsi que "no-agent-forwarding,no-X11-forwarding,no-pty"
  command="svnserve -t",no-port-forwarding TYPE KEY COMMENT

ainsi l'on utilisera une fois la clef ssh enregistrée (ssh-agent bash; ssh-add clef)

svn co svn+ssh://svn@host/path/to/base/repos




1.2 Plusieurs utilisateurs
Pour l'instant tout le monde se loggue en tant qu'utilisateur "svn". En particulier, il est ainsi impossible de différentier les auteurs des différents commits effectués.



ajouter l'option "--tunnel-user=user" également pour l'identifier.


2ème étape : Eviter d'avoir à afficher tout le path sur le serveur

Si le repo est dans /path/to/base/repos, alors :
  command="svnserve -r /path/to/base/",no-port-forwarding TYPE KEY COMMENT

Attention
:
il semble que l'option -r et l'option -t soient incompatibles si l'on utilise pas l'option --tunnel-user


3 Et Au Final...

Nous obtenons dans le fichier ~svn/.ssh/authorized_keys :
   command="/path/to/svnserve -t -r /repository/root --tunnel-user=alice",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE1 KEY1 COMMENT1
command="/path/to/svnserve -t -r /repository/root --tunnel-user=bob",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE2 KEY2 COMMENT2



1.4 liens/remerciements.



lundi 6 juillet 2009

PowerTOP

PowerTOP présente une fenêtre ressemblant à ce que rend la commande "top", mais en fonction de l'utilisation des ressources en terme d'énergie.
Il tourne pour les processeurs Intel, et propose même des suggestions sur comment diminuer la consommation (dé-activation de certains modules, augmentation du temps de certaines vérification faites trop souvent, etc.)

site web :
http://www.linuxpowertop.org


Message d'erreur

J'avais un message m'indiquant :
"no ACPI power usage estimate available"

Bien que n'empèchant pas powertop de tourner, il a pour effet de ne pas m'indiquer quelle est la consommation à un instant donné, ce que powertop sait faire (vu tourner lors d'une démo).

Trouvé un début de solution ici : Smop.co.uk:Power Saving on Linux. Il faut débrancher son portable de la source principale d'énergie. Malheureusement le changement n'est pas persistant, donc cette solution n'est pas parfaite.






NAME
powertop - program to analyze power consumption on Intel-based laptops

SYNOPSIS
powertop

DESCRIPTION
This manual page documents briefly the powertop commands.

powertop is a program that shows the power consumption on Intel-based
laptops and makes suggestions on how to extend battery lifetime.
The program is more fully described at http://www.linuxpowertop.org

mardi 2 juin 2009

Rubber : a LaTeX processing tool

I still have to test it with other .tex files, but I just discovered and tried "rubber", and LaTeX compilation seems to be pretty fast (for an 8 pages document).


It seems that it proposes a tool that compiles and analyses the LaTeX source file to generate either a ps, pdf or dvi, and to run the needed tools : makeindex, bibtex, etc. and all by itself without having to write a complicated makefile.



From "rubber" man pages :

NAME
rubber - a building system for LaTeX documents

SYNOPSIS
rubber [options] sources ...
rubber-pipe [options]

DESCRIPTION
Rubber is a wrapper for LaTeX and companion programs. Its purpose is,
given a LaTeX source to process, to compile it enough times to resolve
all references, possibly running satellite programs such as BibTeX,
makeindex, Metapost, etc. to produce appropriate data files.

The command rubber builds the specified documents completely. The
source files may be either LaTeX sources (in which case the suffix .tex
may be omitted) or documents in a format Rubber knows how to translate
into LaTeX (this currently means CWEB or Literate Haskell documents).
If one compilation fails, the whole process stops, including the compi‐
lation of the next documents on the command line, and rubber returns a
non-zero exit code.


Some Links :

mardi 21 avril 2009

date relative

Utilisation de la commande date pour calculer une date relative en nombre d'heures à partir d'une autre date.

  1. 1ère étape : entrer la date initiale avec date
    $ date --date='2009-03-23 12:00'


  2. 2ème étape : utiliser le résultat obtenu comme base pour y ajouter un décalage en nombre d'heures, soit donc :
    $ date --date="$(date --date='2009-03-23 12:00') +1001 hours"
    Mon May 4 06:00:00 CEST 2009