Here is a very interesting article about monitoring battery capacity with Debian :

Different ways to monitor battery capacity with Debian

More information about IBAM, the Intelligent Battery Monitor

Gnome-file-share-properties is a simple GUI application to let you receive or send files to a Bluetooth enabled device. It helps you enabling an  ObexFTP share.

Use /usr/bin/gnome-file-share-properties which is part of the gnome-user-share package.

In previous versions of GNOME, the program gnome-file-properties was to be used instead.

To install a working Perl environment to manage remote Oracle databases, you need to install the Oracle Instant Client

To install the Oracle Instant Client version 64 bits, download the rpm files as shown below :

root@localhost:~# rpm -i oracle-instantclient11.2-basic-
root@localhost:~#rpm -i oracle-instantclient11.2-odbc-
root@localhost:~#rpm -i oracle-instantclient11.2-sqlplus-
root@localhost:~#rpm -i oracle-instantclient11.2-devel-

The installation works fine.

To install DBD::Oracle perl module, use CPAN if it is not available from RHEL yum repositories.


cpan[1]> install DBD::Oracle

This command will install the module and the missing dependencies. if the development files of the Oracle Instant Client are not installed (oracle-instantclient11.2-devel- not installed), you will have the following error during DBD::Oracle perl compilation :

Unable to locate an or other suitable *.mk
file in your Oracle installation.  (I looked in
/usr/lib/oracle/11.2/client64/rdbms/demo/ /usr/lib/oracle/11.2/client64/rdbms/lib/ /usr/lib/oracle/11.2/client64/rdbms/demo/ /usr/lib/oracle/11.2/client64/rdbms/demo/ /usr/lib/oracle/11.2/client64/rdbms/demo/ /usr/lib/oracle/11.2/client64/rdbms/lib/ /usr/share/oracle/11.2/client64/ under /usr/lib/oracle/11.2/client64)

The (or file is part of the Oracle
RDBMS product.  You need to build DBD::Oracle on a
system which has one of these Oracle components installed.
(Other *.mk files such as the env_*.mk files will not work.)
Alternatively you can use Oracle Instant Client.

In the unlikely event that a suitable *.mk file is installed
somewhere non-standard you can specify where it is using the -m option:
perl Makefile.PL -m /path/to/

See the appropriate README file for your OS for more information and some alternatives.

at Makefile.PL line 1187.

Just a quick tip to avoid using the Esc key while leaving the insert mode in Vim.
This can be replaced with your own shortcut.
Put this within your own Vim configuration file vimrc :

inoremap jj <ESC>


inoremap jk<ESC>


hpacucli both provides monitoring and management features. It is HP proprietary tool which can help get technical information about this hardware RAID array.

List all controllers :

root@localhost:~#hpacucli controller all show
Smart Array P410i in Slot 0 (Embedded)

List arrays on controller in slot 0:

root@localhost:~#hpacucli ctrl slot=0 logicaldrive all show status
logicaldrive 1 (136.7 GB, RAID 1): OK

List physical drives on controller in slot 0:

root@localhost:~#hpacucli ctrl slot=0 pd all show status
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 146 GB): OK
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 146 GB): OK

More information about managing HP SmartArray RAID controllers under Linux :

complete documentation about managing SmartArray under Linux
hwraid GitHub website
Debian wiki page on managing RAID

To make a Perl script portable is to avoid using system commands as much as possible. To deal with date formats actions, you’d better use DateTime or Date::Calc modules.

For a simple formatting of the current date using localtime() Perl function :

use POSIX qw(strftime);
my $date = strftime “%d-%m-%y”, localtime;

Instead of :

my $date = qx(date +%d-%m-%y);

Both work. The first one is more Perlish ;-)

More info :
POSIX Function strftime() in Perl
DateTime Perl module
Date::Calc Perl module

To avoid typing the same lines each time you open up a new file in vim, here is a little trick to do it. Let’s have a try with a simple perl template.

fool@localhost:~$ mkdir .vim

fool@localhost:.vim$cat > perl.template <<EOF
use strict;
use warnings;
use diagnostics;

Now, in your vim’s configuration file :

fool@localhost:~$ cat >> .vimrc <<EOF
au BufNewFile *.pl 0r ~/.vim/perl.template

Anytime you create a new perl script with vim, you will find a few lines already it. Hope it helps !

To decode base64 encoded files attached to mail, there are several tools available.

base64 is a command-line utility tool.

To decode it :

fool@localhost:~$ base64 -di < input_file

where -d : decoding data and -i : ignore non-alphabet characters

This Perl one-liner can do the job as well :

fool@localhost:~$ perl -MMIME::Base64 -ne ‘print decode_base64($_) < input_file



Either the Module::CoreList or the command line utility corelist can help you list all the core modules bundled with a given version of Perl.

To know your current running version of Perl : perl -e ‘print $]’

As an example :

fool@localhost:~$ corelist -v 5.014002

Here is a sample of what you can have as information :

The following modules were in perl 5.014002 CORE
AnyDBM_File                                                      1.00
App::Cpan                                                        1.5701
App::Prove                                                       3.23
App::Prove::State                                                3.23
App::Prove::State::Result                               3.23
App::Prove::State::Result::Test                    3.23
Archive::Extract                                                 0.48
Archive::Tar                                                     1.76
Archive::Tar::Constant                                     1.76
Archive::Tar::File                                               1.76
Attribute::Handlers                                            0.89
AutoLoader                                                       5.71
AutoSplit                                                        1.06

Find core modules in Perl versions

Mails sent from crontab jobs running on your servers may content the following error message :

Unexpected EOF while looking for matching `””

syntax error: unexpected end of file

This is due to the fact that you’re using a command with % options such as the date command.

The crontab daemon misinterprets this sign %. Place a backslash quote before it to make it usable by the date command.

Have a look at this example :

***** echo $(date +%F)>>/tmp/date.txt

rewritten into this way : 

***** echo $(date +\%F)>>/tmp/date2.txt

Thanks for the tip. More details here