killall vs killall5

I learned this the hard way. In Linux, killall kills process by name whereas in Unix System V, killall does what is it is called- kill all processes. killall5 is the SystemV killall command in Linux. If you run killall5 in Linux, it will kill all processes except kernel threads(those surrounded by square bracket in ps aux output) and your login shell.

man killall5: Continue reading

Advertisements

I configured nproc limit for a user in limits.conf, it isn’t working

This post applies to RHEL 6 and RHEL 7. I changed the nproc limit for a user to 16383 in /etc/security/limits.conf.

cat >>  /etc/security/limits.conf
username         soft    nproc           16383

When I checked it with ulimits -n, it isn’t working.

su - username 
ulimits -a
1024

This is because, to prevent a fork bomb, the default limits for all users except root is set to 1024 in RHEL 6. The setting is in /etc/security/limits.d/90-nproc.conf which overrides /etc/security/limits.conf. Continue reading

How to create a new filesystem without reboot in RHEL 6

On creating a new partition in RHEL 6, you might see these messages:

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

You will also not be able to create filesystem on the new partition. Continue reading

/etc/ntp/ntp.drift.TEMP: Permission denied in /var/log/messages

NTP is not synchronized and you get “/etc/ntp/ntp.drift.TEMP: Permission denied” in /var/log/messages. This is because ntpd which run as ntp user does not have write permission to /etc/ntp. Change driftfile location to /var/lib/ntp/drift which is preferred or any directory where ntp has read,write permission.

NTP is not synchronised
Continue reading