Wednesday, November 26, 2008

Keyboard problem in VMware under Ubuntu 8.10

In VMWARE Server on my fresh install of Ubuntu 8.10,after powering on a Windows XP vm, I realized that I could not use the some keys properly. On hitting the left arrow key, start menu was being displayed and other arrow keys had similar issues. Also, using VMware player was completely impossible as ctrl-alt-del wasn’t working.

To fix this issue, you simply need to run the following command,

echo 'xkeymap.nokeycodeMap = true' > /etc/vmware/config

Thursday, November 13, 2008

Install Mysql Activity Report on Ubuntu

Install these two packages:

apt-get install librrd2-dev libmysqlclient15-dev

Download the Mysql Report Activity:


tar -xvzf mysqlard-1.0.0.tar.gz
cd mysqlard-1.0.0

make install

Edit /usr/local/share/mysqlard/mysqlar.php and change username and password for your Mysql Database.

Give access right to www-data user for vim /usr/local/share/mysqlard/ :

chown www-data.www-data /usr/local/share/mysqlard/mysqlar.php

Add the alias to apache config file ( I added a new conf file in /etc/apache2/conf.d/ ):

vim /etc/apache2/conf.d/mysqlard.conf

and add these lines to it:

Alias /mysqlard /usr/local/share/mysqlard

"Directory /usr/local/share/mysqlard"

php_flag register_globals off

Options Indexes FollowSymLinks

"IfModule mod_dir.c"

DirectoryIndex mysqlard.php


(change "" with <>).

Create a user in MYSQL:

GRANT USAGE ON *.* TO mysqlar@localhost;

and then change the user in mysqlar.php.

Check too all paths in these files:



Copy the following files in appropriate crontab folders:

You need to add a cron job to generate the graphs. For example :
*/5 * * * * root hourly=1 daily=1 weekly=1 monthly=1\
/usr/bin/mysqlar_graph > /dev/null

Restart apache2 service:

/etc/init.d/apache2 restart

You can access Mysql Activity Report with following url:


Apache Server Status

The Status module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form. If required this page can be made to automatically refresh (given a compatible browser). Another page gives a simple machine-readable list of the current server state.

The details given are:

  • The number of worker serving requests
  • The number of idle worker
  • The status of each worker, the number of requests that worker has performed and the total number of bytes served by the worker (*)
  • A total number of accesses and byte count served (*)
  • The time the server was started/restarted and the time it has been running for
  • Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request (*)
  • The current percentage CPU used by each worker and in total by Apache (*)
  • The current hosts and requests being processed (*)
The lines marked "(*)" are only available if ExtendedStatus is On.

To enable status reports only for browsers from the domain add this code to your /etc/apache2/apache2conf configuration file:

"Location /server-status"
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from


(change " with <>)

You can now access server statistics by using a Web browser to access the page

You can get the status page to update itself automatically if you have a browser that supports "refresh". Access the page to refresh the page every N seconds.

A machine-readable version of the status file is available by accessing the page This is useful when automatically run, see the Perl program in the /support directory of Apache, log_server_status.

Wednesday, November 12, 2008

Mount a remote folder in Ubuntu

SSHFS (Secure SHell FileSystem) is a file system for Linux capable of operating on files on a remote computer.

apt-get install sshfs

(Remote host must run the ssh daemon)

remoteuser@remotehost:/path/to/remote_dir local_mountpoint

Thursday, November 6, 2008

Zoneminder in Ubuntu

In Ubuntu run:

apt-get install zoneminder

apt-get -f install

modprobe -r zc0301
modprobe -r gspca
modprobe gspca

add this line to /etc/modprobe.d/blacklist:
blacklist zc0301

Give access right to Video Devices:

chmod 777 /dev/video(x)