Thursday, April 22, 2010

Increase limit on RLIMIT_NOFILE or other resources

Use setrlimit() to change the soft limit. But there is a hard limit which the setrlimit can not increase beyond.

In order to change the hard limit, you need to change the setting in following file
/etc/security/limits.conf

The syntax of the lines is as follows:

[domain] [type] [item] [value]

Use man limits.conf to see detailed explanation.

You can use command 'lsof -p [pid]' to see files opened by process pid.

Install Gnome On centos machine

Citing from

http://wiki.centos.org/FAQ/CentOS5#head-e99a7921ab6ce47e1cbf7d8cc8cadecf92b7ce94


yum --exclude=nautilus-sendto groupinstall "GNOME Desktop Environment"