linux

Small solution for server statistics

Purpose

Once I needed small statistics collecting and displaying solution, that I could access from my web browser on a server where PHP was not an option. Because of that Cacti was not an option. So I quickly hacked this piece of shi^H^H^H script :-)

I'm not going to explain how to setup collectd, a statistics gathering daemon which I use for myself.

Output

Sample output:

Requirements

  • collectd (for collecting data to RRD)
  • rrdtool (for RRD libraries and graphing tool)
  • simple httpd server, e.g. lighttpd (don't worry Apache works too ;)

(It's also possible to use SNMP and write data to RRD yourself)

Little step by step guide of my crappy script

1) These files should be placed under /opt/graphrrd/ Or if you want in another place (e.g. your home dir), you'll have to substitute corresponding lines in scripts.

2) The output by default will be placed in /var/www/stats/, so create that dir before running any script.

3) Some default values are in /opt/graphrrd/_values check them out.

4) To make sure everything is OK run /opt/graphrrd/graphall If you see any errors/warnings, then act according to them. Else go to step 5.

HP Pavillion dv6525em setup with Ubuntu

Several months ago I bought myself a HP Pavillion dv6525em, because my ageing Apple G4 Powerbook had become simply to weak for today's computing requirements (needles to say I was unable to play Q3A and RA2 with my housemates!

Of course it came pre-installed with Windows Vista, which was "upgraded" to XP several weeks later by me, which I consider is much better for my current needs, where I need raw power (for games and later video decoding/encoding needed for my university's final project).

Enough intro! Let's get down to business. After installing Ubuntu to this laptop, everything worked out of the box (including video acceleration of the desktop, so I was amused by Compiz-fusion:), except Broadcom wireless drivers were missing and also my laptop speaker weren't muted when I insert headphones.


The solution for wireless


For this to work, I use ndiswrapper, which is in Ubuntu's main repository. Just:

sudo apt-get install ndiswrapper ndiswrapper-utils

The actual drivers are from Windows system, I have attached them for convenience wifi.tar.bz2. Download them and extract to temporary place, we will need only the INF file:

sudo ndiswrapper -i bcmwl5.inf
sudo ndiswrapper -m

Our wireless driver is now installed but not working just yet. It's currently being blocked by another driver that is trying to run, so we need to block this other driver:

sudo sh -c  'echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist'

Now let's add it to the modules list.

Syndicate content
---