At the command line, it's df to show which volumes are getting full ( df -h for human-readable sizes), and du to see how much space is used by each subfolder (and subsubfolder and.) (I mostly use sudo du -xhd1 /path/to/folder to give a human-readable listing that only goes one folder level deep). There are a bunch of third-party utilities that give more detail. If you want to see what files (/folders) are taking up all your space, you can get a basic summary with Apple menu > About This Mac > Storage tab, and a little more info by clicking the Manage button there. At the command line, it's ls (I use ls to show hidden files and various obscure attributes). Apple makes a fair bit of the filesystem invisible in the Finder (which is sort of a "don't mess with this unless you know what you're doing" indication) if you want to see the normally-hidden parts, you can toggle show-all mode with Command-Shift-Period (this also works in standard open and save file dialogs). At the command line, diskutil is its counterpart.įor files: if you just want to look around, it's Finder in the GUI. Recent versions hide some of the complexity of what's going on, which I find just makes it more confusing to show full info, choose "Show All Disks" from the View menu (or the View pop-up in the toolbar). Memory management is thoroughly automated, so there aren't really any tools to configure it.įor disks: Disk Utility is the GUI tool of choice, both to see how things are formatted and to make changes (erase/format/partition/etc). You can get some whole-system virtual memory stats from vm_stat (warning: these stats are in pages, not KB or MB or anything like that) or sysctl vm.swapusage (or if you want to drink from the firehose, sysctl -a vm). Apple doesn't provide a GUI for interacting with this, but there is a third-party option: LaunchControl from soma-zone.įor memory: since that's pretty much used by processes, use the process monitoring tools to see what's going on. (Warning: on some other OSes, killall does different, and much more lethal, things, so think before you type.)Ī lot of the process management in macOS (especially running background processes) is handled by launchd, and you can query and manage it from the command line with launchctl (warning: this can be a bit confusing). You can use kill to kill processes by PID, or killall to kill them by name (/program). Check the man page for lots more options. ps is the other main tool by default, it only shows your command-line processes, so use ps -A (or -ax or -e) to show all processes. And it shows overall stats at the top of the screen. top -orsize will show top "real memory" usage instead. ![]() ![]() I use top -u -s5 to show top CPU-using processes (updated every 5 seconds, because the default of 1 second is too fast). And it can kill (force-exit) running programs.Īt the command line, top is my favorite tool. ![]() You can also view open files and network ports for processes you own by selecting them, and clicking the Inspect (circle-with-an-"i"-in-it) button in the toolbar, then selecting the Open Files and Ports tab. It can also view other per-process things like memory usage, and disk and network activity (and it also gives some overall stats at the bottom of the window). I'll give you a summary of the most relevant ones.įor viewing processes in the GUI, Activity Monitor is the primary tool. There are a lot of tools, both in the graphical interface and at the command line, for viewing and configuring these various parts of macOS' operations.
0 Comments
Leave a Reply. |