Wednesday, November 16, 2011

ip_conntrack problem: error: "net.ipv4.ip_conntrack_max" is an unknown key

To fix this issue do the following:

1. modprobe ip_conntrack
2. lsmod |grep conn -- if you see entries it means modules have been loaded correctly
3. sysctl -w -- to write the changes you made under /etc/sysctl.conf
4. sysctl -p -- to view the changes and see if it was actually loaded.

Thursday, November 3, 2011

Command to check CronJobs

There are times that you need to immediately check if there are run-away cron entries hidden somewhere. This terminal command will save you time doing just that.

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

Now, if for example you need to issue this remotely you can do it like this:

ssh someusername@some_remote_host sudo for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done