How to increase file descriptors max limit on Linux

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.

How to install Microsoft Core Fonts on Linux

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.

The Google Sari


View full size.

Well, looks like Google influence is everywhere today. Just look at the latest offering from designer Satya Paul. Satya Paul is known for his new age and dynamic designs. The web 2.0 of the fashion world you could say.

The sari seen above actually says Oogle and not Google but the search results that fill the sari surely is convincing.

Hopefully Google doesn’t get ideas to start making uniforms for Indian woman now.

How to run IE in openSUSE 10.3

You decided to switch desktops to Linux and now you can’t access your office IE only intranet. What do you do?

Well, you could IEs4Linux on WINE. WINE is a opensource Windows API implementation for the Linux platform and IEs4Linux is the “installer” which will download, install and get IE to work with WINE.

1. Add the WINE repository for openSUSE 10.3.

YaST2 -> Software -> Software Repositories.

http://software.opensuse.org/download/Emulators:/Wine/openSUSE_10.3/

read more

How to disable the beep in Linux

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.

© 2008-2012 The Danesh Project
Powered by Wordpress and made by Guerrilla. Hosted at ServerFreak