Disabling performance counters (Windows)

  1. Backup your registry
  2. Open “regedit”
  3. Navigate to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services”
  4. Find the service you wish to disable performance counters for
  5. Navigate the performance key. If the key does not exist, create it.
  6. Create a DWORD entry called “Disable Performance Counters” and set the value to 1
  7. Enjoy a cool beverage.

Amazingly large null file (/var/log/lastlog)

I’ve been seeing a lot of strange size reports on some Linux machines… specifically 64-bit systems.

The reason why you see a 1.2TB file full of null info is because the “nfsnobody” user is created with a userid of “-1″ which is the highest UID available. On a 32-bit system this is “65534″ but on a 64-bit system it’s a staggering “4294967294″. Lastlog pre-allocates space for every uid it obeys and counts 4.2 billion users just to accommodate for the user “nfsnobody”. It really doesn’t use _that_ much space but most backup utilities (E.G. EMC Retrospect) don’t know how to handle null/sparse files it will hang almost indefinitely when it tries to backup that file. Here’s the quick and dirty solution:

# usermod -u 65533 nfsnobody
# groupmod -g 65533 nfsnobody
# echo "" > lastlog

Happy Linuxing!