In Linux, what is the difference between “buffers” and “cache” reported by the free command?

The “cached” total will also include some other memory allocations, such as any tmpfs filesytems. To see this in effect try: mkdir t mount -t tmpfs none t dd if=/dev/zero of=t/zero.file bs=10240 count=10240 sync; echo 3 > /proc/sys/vm/drop_caches; free -m umount t sync; echo 3 > /proc/sys/vm/drop_caches; free -m and you will see the “cache” … Read more

Testing UDP port connectivity

There is no such thing as an “open” UDP port, at least not in the sense most people are used to think (which is answering something like “OK, I’ve accepted your connection”). UDP is session-less, so “a port” (read: the UDP protocol in the operating system IP stack) will never respond “success” on its own. … Read more

Practical maximum open file descriptors (ulimit -n) for a high volume system

These limits came from a time where multiple “normal” users (not apps) would share the server, and we needed ways to protect them from using too many resources. They are very low for high performance servers and we generally set them to a very high number. (24k or so) If you need higher numbers, you … Read more

What does “debconf: delaying package configuration, since apt-utils is not installed” mean?

apt-utils contains the /usr/bin/apt-extracttemplates program which is used when packages need to ask you questions about how to be configured. This package being Priority: important, means it should really be installed except in rare circumstances. If there is configuration pending, dpkg-reconfigure [package] will perform it. If you missed configuring a number of packages and don’t … Read more

Best way to disable swap in Linux

Identify configured swap devices and files with cat /proc/swaps. Turn off all swap devices and files with swapoff -a. Remove any matching reference found in /etc/fstab. Optional: Destroy any swap devices or files found in step 1 to prevent their reuse. Due to your concerns about leaking sensitive information, you may wish to consider performing … Read more

How to check the physical status of an ethernet port in Linux?

$ ethtool <eth?> For example: $ ethtool eth0 provides: Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal … Read more