Perl : Counting occurences of IP addresses in Apache logs

Tuesday, March 2nd, 2010

This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
(more…)

Linux / Unix : Disk usage and identifying biggest files

Sunday, January 17th, 2010

When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
(more…)

Gentoo Linux / Portage : How to know which package provided an installed file

Thursday, December 3rd, 2009

If there’s a file installed on your disk for which you’d like to know what package provided it, you can use the equery command like below :
(more…)

Gentoo : Xorg X Server 3D hardware acceleration

Wednesday, October 14th, 2009

You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :

1
2
ls -l /dev/dri/card0 
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0

(more…)

Gentoo : Running Cacti with LigHTTPD

Tuesday, October 13th, 2009

If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :

1
2
3
4
5
6
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting

(more…)