main · play · work · me
philesight Add ϲomment
Info
name Philesight
author Ico Doornekamp
email philesight@zevv.nl

Summary

Philesight is a tool to browse your filesystem and see where the diskspace is being used at a glance. Philesight is implemented as a simple command line program that generates PNG files; a wrapper CGI script is supplied to allow navigating through the filesystem. Click the image on top for an online demo.

Philesight is actually a clone of the filelight program. Wheres filelight is ment as an interactive, user friendly application for the X-windows desktop, philesight is designed to run on a remote server without graphical user interface.

Download

philesight-20091214.tgz

Demo

Click on the image for online demo.

License

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Support

Mail the author

README


Summary 
=======

Philesight is a tool to browse your filesystem and see where the diskspace is
being used at a glance. Philesight is implemented as a simple command line
program that generates PNG files; a wrapper CGI script is supplied to allow
navigating through the filesystem. 

Philesight is actually a clone of the filelight program. Wheres filelight is
ment as an interactive, user friendly application for the X-windows desktop,
philesight is designed to run on a remote server without graphical user
interface. 


Usage 
=====

Philesight can be run in different modes: first, the filesystem is indexed
and the results are stored in a database. When the database is generated, the
tool can used to generate PNG files with the graphs. The database should be
updated every once in a while of course.

 * Index bulding: 
 
 	./philesight --db {db} --index {path}

   {db} is the name of the database file that will be generated. It is a good
   idea to throw away existing database files before indexing to avoid removed
   files showing in your graph.

   {path} is the top-level directory to start indexing. Usually, '/' is a 
   good choice.

   This process might take some time, since it traverses the whole tree
   from path-to-index downward and stores the data into the db. Make
   sure to remove previous database files before indexing.


 * PNG generating: In this mode, philesight generates a graph of the
   filesystem from path and 4 levels downward. i
   
   	./philesight --db {db} --path {path} --draw {png}

   {db} is the filename of the index file that was generated earlier,
   {path} is the directory which should be drawn, and {png} is the filename
   of the to-be-generated PNG image file


 * CGI: Philesight comes with a CGI module that can be run from within a 
   web server. Edit the configurable parameters in the top of this file
   to point to the database. Make sure the database file is readable by
   the webserver and the philesight.rb module can be found by the CGI.

   Available options:

   * $path_db: Path to database file.

   * $path_cache: Optional path to a directory used for caching generated
     images. Note that this directory should be writable by the httpd user.
     All images older then $cache_maxage seconds are automatically deleted
     every time the CGI is invoked.

   * $img_size: graph size. 800 pixels is a good choice.

   * $img_rings: number of rings = depth of graph. 3 or 4 should be ok
   
   * $img_gradients: use gradient colors in graph (set to 'false' to generate
     smaller PNG files)

   * $show_list: render list of directories and their sizes blow graph.




Dependencies
============

Philesight is written in ruby1.8, and requires the berkely-db4 and cairo
ruby libraries.

On debian, the following should be sufficient:

  # apt-get install libdb4.2-ruby1.8 libcairo-ruby1.8 

On Fedora 10, use

  # yum -y update                                                                                  
  # yum -y install ruby ruby-cairo ruby-bdb      

I've been told the following should work on RedHat/Centos

  # yum -y update                                                                      
  # cd /etc/yum.repos.d/                                                               
  # wget http://centos.karan.org/kbsingh-CentOS-Extras.repo                            
  # wget http://ruby.gfd-dennou.org/products/rpm/RPMS/CentOS/CentOS-DennouRuby.repo         
  # yum -y --enablerepo=kbs-CentOS-Testing install ruby bitmap-fonts ruby-bdb ruby-cairo                                                                         


License
=======

This package is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 dated June, 1991. This package is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

Changelog
=========

2009-12-14	Added --one-file-system option (thanks Simon Bland)

2009-02-18	Removed recently added internationalisation support because
		required libraries are not available in major linux distro's

2009-02-12	Fixed code for ruby 1.9.1 compatibility, added support for
		non-latin1 filenames. (thanks Stanislav Sedov)

2009-01-05	Added --skip option for skipping files while indexing
		Updated documentation for RedHat/Centos dependencies

2008-11-20	Updated documentation; added caching support

2008-11-19	Better escaping of CGI parameters, fixed breaking on '+' in 
		pathnames

2008-11-18	Updated documentation for installation on RedHat/Centos

2008-05-29	Added option (use_gradients) to enable/disable gradients
		in circular graph. Added option to set graph size.

2008-04-16	Added optional table with file list to cgi, some bugfixes,
		increased default graph size to 800. (thanks Guillaume Sachot)

2008-03-17	Fixed bug where no image was shown with CGI's running
		on apache-mpm-worker.

2007-03-12	Fixed crash when indexing file named 'rest'

2006-12-09	Workaround for segmentaion fault with ruby 1.8.5


Bugs
====

    * Philesight is a ruby program, and thus is not particulary fast.
    * Indexing could probably be more efficient.
    * Proper error handling is mostly missing. 
    * Caching is very untested

 
On Wed Dec 12 19:08:43 CET 2007, bill r wrote:
Do you also provide debian packages ?
On Fri Feb 27 17:13:33 CET 2009, Syteks wrote:
Awesome tool for my Centos server, thanks Ico!
On Mon Mar 23 19:09:10 CET 2009, Smar wrote:
Any repository?
On Mon May 11 15:53:56 CEST 2009, doc wrote:
hmmm root@*:/opt/lampp/htdocs/jason/philesight# ./philesight --db spaces --index / --draw drives.png ./philesight.rb:7:in `require': no such file to load -- bdb (LoadError) from ./philesight.rb:7 from ./philesight:5 root@*:/opt/lampp/htdocs/jason/philesight# ./philesight --db spaces.db --index / --draw drives.png ./philesight.rb:7:in `require': no such file to load -- bdb (LoadError) from ./philesight.rb:7 from ./philesight:5 yeah, i installed the the packages and still cant get it to run on a current commandline ubuntu system. :(
On Wed May 27 01:33:11 CEST 2009, neyz wrote:
Beautiful tool, thanks ALOT you just made my day :)
On Tue Jun 2 03:52:13 CEST 2009, /KRM wrote:
I'm also getting the: "`require': no such file to load -- bdb" error. I've got cairo, rcairo and the Berkley dbs installed, but it seems that philesight cannot load the Berkley stuff. Not knowing squat about ruby, i've no idea how to tell it where to find it.
On Mon Oct 5 15:55:54 CEST 2009, gmork123@gmail.com wrote:
nice tool! is use it on my openvz host, which has a lot of (bind) mounts. So I added rio (rio.rubyforge.org) and changed some code to skip mounted dirs ( rio(f_full).mountpoint?() ) Wessel Louwris
On Tue Oct 6 00:46:00 CEST 2009, Essid wrote:
Good Job,a must have tool for any data server Thanks :D
On Thu Oct 8 10:27:25 CEST 2009, yuhl wrote:
to make it work under ubuntu: - read /usr/share/doc/libdb4.6-ruby1.8/README.Debian - invoke update-alternatives --config bdb-1.8.rb - then you will be able to do a: require 'bdb' - so philesight will work
On Tue Nov 24 15:00:59 CET 2009, remke wrote:
Nice tool. Would be nice if I can exclude dir's (like nfs directories, proc, ...) With kind regard, r[dot]schuurmans[at]gmail[dot]com
On Mon Feb 1 12:06:34 CET 2010, krepver wrote:
Thx for the tool! Works great in ubuntu server 8.04. Had to make a ln -s /usr/bin/ruby1.8 /usr/bin/ruby and it worked.
On Thu Feb 11 14:21:01 CET 2010, Tony wrote:
Absolutely awesome thankyou. I installed on a CentOS 5.3 system by following the instructions in your README. I did however had to install the following as well: db4-utils db4 db4-devel ruby-cairo ruby-cairo-devel ruby-cairo-debuginfo (probably didn't need the development packages but I like to have them on my system) The above also installed several other dependencies. Thanks again, Tony.
On Wed Feb 24 17:09:36 CET 2010, Jodokus wrote:
Brilliant tool, thanks! Keep up the good work. Works for my Gentoo boxes.