OS X, like most modern operating systems, uses a virtual memory system for managing memory. Among other purposes, this allows the operating system to treat the computer as having an unlimited pool of memory. To achieve this, the OS will page unused parts of RAM out to a disk store known as the swapfile.
Of course, RAM is not unlimited, so OS X groups RAM into four categories: wired, active, inactive, and free. Wired memory is required by the operating system, and can never be paged out of memory. Active memory is memory used by currently-running programs. Inactive memory was used recently by programs which have now been terminated (or haven't been unused in a long time). Free memory is, as the name suggests, RAM that is not being used.
When you launch a program, it gets loaded into active memory. When you quit a program, however, it doesn't get removed from RAM; rather, it gets bumped into inactive memory. This is why it is often faster to re-launch a program -- it is still in RAM (try this with a big program like Firefox).
Once all your memory is used (free memory is 0), the OS will write out inactive memory to the swapfile to make more room in active memory.
If a program gets paged out to the swapfile, and you re-launch it, it'll get pulled from the swapfile into active memory.
So in short, you actually shouldn't care if your free memory is low. In fact, you want it to be low -- free memory is wasted memory (as the OS isn't using it for anything).
When examining how much memory your computer is using, you actually want to pay attention mostly to Swap used, which tells you the size of the virtual memory swapfile, and Page ins, which tells you how often the OS has to pull memory from the swapfile into active memory.
The -HUP
option is the signal that's sent to the processes by the killall
command. It can be a little hard to tell, but the relevant entry in the killall
manual is:
-SIGNAL Send a different signal instead of the default TERM. The signal may be specified
either as a name (with or without a leading SIG), or numerically.
The difference between the default TERM
signal that killall
sends and the HUP
signal depends largely on the program you're sending the signal to. At the program end, they receive a different interrupt signal value. So the program can catch the interrupts and decide, based on the value, if they should do one thing or the other.
The TERM
signal (historically the "terminate signal") is usually sent to a program to request its termination (which is a politer version of forcing its termination with the KILL
signal). The program is free to catch and ignore the TERM
signal. It doesn't have to terminate if it doesn't want to and it can completely ignore this signal.
The HUP
signal (historically the "hangup signal") is usually sent to a program to request that it restarts and re-reads all its configuration in the process. The actual behaviour of the program depends on the program-specific implementation. Not all programs catch HUP
and they aren't required to by convention or dogma. For example, the Apache web server will catch a HUP
signal and re-read all its configuration files but it won't restart any processes.
If you want to truly terminate the processes and not worry about whether they're going to catch and obey the signal uses the KILL
signal. It cannot be caught or ignored and results in process termination.
For a good review of available POSIX signals see this Wikipedia article.
Best Answer
From the fs_usage man page:
PgIn and PgOut are page-in and page-out.
RdMeta and WrMeta are reading and writing file metadata.
RdData and WrData are reading and writing to the file.