21 Mar, 2008  |  Posted by Danesh  |  in Internet

Beware, I received a phishing attempt today claiming that HSBC is carrying out it’s regular maintenance work and needs me to update my profile.

Always remember, banks never send us emails with action items.

hsbc phishing 2

Continue Reading ->

12 Mar, 2008  |  Posted by Danesh  |  in HowTo, Windows, hacks

I am facing the same annoying beep issue which I experienced on my Linux notebook before on my XP machine now.

Most users don’ t fancy having sounds turned on their OS. In XP turning off your sound schemes will turn off all notification sounds but then all beeps get channeled to your pc speaker instead thus begins the annoyance. I read somewhere that MS claims that this is a bug with the motherboards, ya right!!

Fortunately the fix was simple. I downloaded TweakUI from MS and unchecked the “Beep On Errors” from the general options area.

Today my DBA reported that the server she was working on was spitting out “too many open files” errors and no new processes could be started.

This is a common problem with DB servers with heavy transactions. In my environment there are 6 DB instances running on the server. No quite the optimized setup I would say.

The fix was to increase the total file descriptors kernel parameter count in the /etc/sysctl.conf file. I doubled my limit from 8192 to 16384.

The walk through,

1. Find out what the current open file descriptor limit is.

~# more /proc/sys/fs/file-max

~# 8192

or

~# sysctl -a | grep fs.file-max

~# fs.file-max = 8192

2. View how many open file descriptors are currently being used.

~# more /proc/sys/fs/file-nr

~# 8191

3. View how many files are open. The number returned might defer as 1 file descriptor can have multiple open files attached to it.

~# lsof | wc -l

~# 10325

4. Edit the kernel paramneter file /etc/sysctl.conf and add line “fs.file-max=[new value]” to it.

~# vi /etc/sysctl.conf

fs.file-max = 331287

5. Apply the changes.

~# sysctl -p
~# fs.file-max = 331287

Problem fixed.

26 Feb, 2008  |  Posted by Danesh  |  in HowTo, Linux, hacks

Most Linux desktop users don’t fancy the default fonts which ship default with Linux. Luckily there are a few ways you could easy enjoy Microsoft fonts on your Linux desktop.

The simplest way would be to use the package manager to add distro specific packages to install the fonts. openSUSE, Ubuntu and many other distros now provide the fonts with a disclaimer which you will have to agree to before the fonts get installed.

If the above did not work for you then download this rpm package: ftp://ftp.gwdg.de/pub/linux/misc/suser-jengelh/AnyDistro/noarch/MicrosoftFonts-1-jen14.noarch.rpm which will provide the fonts for you. Use your package manager to install the package or simply install it from the command line using the command below. An advantage of this rpm package is that it includes the Tahoma fonts which is not included by the distro specific packages.

rpm -ivh  MicrosoftFonts-1-jen14.noarch.rpm

The third and final way which is also the legal way would be to copy the fonts over from a licensed Windows XP computer. Move them over using winscp or a usb thumb drive,WinSCP in my case. Once moved over simply use your font’ manager to install them. In my case KDE, the font manger can be accessed at KDE Menu -> Configure Desktop -> System Administration -> Font Installer -> “Administrator Mode”.

Enjoy your fonts, drop me a comment if you need help.

20 Feb, 2008  |  Posted by Danesh  |  in HowTo, Linux, hacks

If you are like me then you must hate the “BEEP!” that comes along with Linux. Turning it off in KDE or Gnome is easy but what if you are on the virtual console? Here’s how you get rid of the “BEEP!” temporarily or permanently.

Temporary solution,

** make sure to be root or use sudo **

1. Check if you have the pcspkr module loaded.

[root@nosebleed ~]# lsmod | grep pcspkr

pcspkr                  7105  0

2. Remove the module. lsmod will return nothing if the module was removed.

[root@nosebleed ~]# rmmod pcspkr

[root@nosebleed ~]# lsmod | grep pcspkr

3. Restore the module when done.

[root@nosebleed ~]# modprobe pcspkr

[root@nosebleed ~]# lsmod | grep pcspkr

pcspkr                  7105  0

Permanent solution,

** make sure to be root or use sudo **

1. add the pcspkr module to the modprobe blacklist file.

[root@nosebleed ~]# vi /etc/modprobe.d/blacklist

Add the lines below to the file.

# pcspkr - turn off pc speaker "BEEP!"

blacklist pcspkr

2. Reboot, and check if the pcspkr module was loaded. If the blacklist file kicked in then nothing will be returned.

[root@nosebleed ~]# lsmod | grep pcspkr

This fix works for my CentOS and Ubuntu but not openSUSE as the pcspkr driver is built right into the kernel.