I would like do real-time monitoring, discussing one part of it here about counting quickly. No packages about it in homebrew.
How can you have RAM-based filesystem in OSX?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Mac OS includes support for RAM-based filesystems via
ramfs. Everything is RAM backed so it's incredibly fast with near zero latency, but the contents are lost upon reboot.
To create one and mount it under
/tmp/mymount, create a script with the following contents and run it:
#!/bin/sh NUMSECTORS=128000 # a sector is 512 bytes mydev=`hdiutil attach -nomount ram://$NUMSECTORS` newfs_hfs $mydev mkdir /tmp/mymount mount -t hfs $mydev /tmp/mymount
The above was adapted from the
hdiutil manual page
You can also do it in a one-liner (adapted from here):
diskutil erasevolume HFS+ 'RAM Disk' $(hdiutil attach -nomount ram://XXXXX)
XXXXX is the size in 2048 byte blocks. There is also a useful script in this post on Superuser.