Why I got message “invalid syntax, continuing…” when I execute “sysctl”?

Posted on

When I tried to apply new configuration in /etc/sysctl.conf, I got following message. warning: /etc/sysctl.conf(44): invalid syntax, continuing… Sounds like your changed /etc/sysctl.conf has problem. You may post the content of your /etc/sysctl.conf here to let other have a check. net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1
Read more

Maximum number of mmap()’ed ranges and how to set it on Linux?

Posted on

What’s the maximum number of mmap()‘ed ranges that a process can makes and how to set the limits on Linux? I have a program that mmap()s and mprotect()s lots ranges. After allocating many ranges, mprotect() starts to fail with ENOMEM error number. From the man page, ENOMEM means 2 possible problems: ENOMEM Internal kernel structures
Read more

Where is the source code for the free command on Linux?

Posted on

Where can I find the source code for the free command on Linux? The source code for the free commands (and many more, like kill, ps, top, sysctl) can be found in procps-ng: https://gitlab.com/procps-ng/procps procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem most commonly located at
Read more

How to make Linux automatically reboot after a kernel panic?

Posted on

After a kernel panic, it is impossible to remotely connect to the Linux server to reboot it by SSH. How to make the panic kernel automatically reboot itself? Linux kernel has a nice feature that reboots itself after a timeout when a kernel panic happened. Usually, it is disabled by default. To turn it on,
Read more

Enlarging Linux UDP buffer size

Posted on

One of the most common causes of UDP data gram lost on Linux is an undersized receive buffer on the Linux socket. How to enlarge Linux UDP buffer size? On Linux, you can change the UDP buffer size (e.g. to 26214400) by (as root): sysctl -w net.core.rmem_max=26214400 The default buffer size on Linux is 131071.
Read more

Make changes to sysctl.conf take effect without rebooting Linux?

Posted on

I made some changes to /etc/sysctl.conf. I know it will take effect next time Linux boots. However, how to make the changes to sysctl.conf take effect without rebooting Linux? You can force Linux to reload the new configuration in /etc/sysctl.conf by: execute the following command as root: sysctl -p For more details, check the manual
Read more

Lazy Linux Admins Going to Server Rooms Less: Forced Reboot, Auto Reboot after Kernel Panic and Email Notification after Reboot

Posted on

Having to go the the server room to reset servers is the most headache thing for admins managing a cluster of Linux servers in a remote site. Either you can ping the server but can not ssh to it, or you even can not ping it. There are various reasons that may cause a Linux
Read more

How to Disable IPv6 on Linux

Posted on

IPv6 is enabled by default on most Linux distros. However, IPv6 is not used for some situations for most of time and it may cause troubles and requires effort to protect the network and ensure the security. This post introduces how to disable IPv6 support on Linux (newer modern Kernel versions). First, add these lines
Read more

Setting Up Linux Network Gateway Using iptables and route

Posted on

Sharing the networking is important and setting up a gateway is a good solution to it. Building up the gateway on a Linux box is easy, cost efficient and reliable. With a Linux box, you can share the internet connection or the only cable connected to the network. The Linux box network configuration The Linux
Read more