How to Monitor Macbook with one single command?
$sudo sysdiagnose -f ~/Desktop/
The result is a compressed file named sysdiagnose_YYYY.MM.DD_HH-MM-SS-TTTT.tar.gz and it contains the following:
Accessibility
BluetoothTraceFile.pklg
DiagnosticMessages
Etienne’s SystemConfiguration
airport_info.txt
apsd-status.txt
bc_stats.txt
bootstamps.txt
brctl.tar.gz
breadcrumbs.txt
crashes_and_spins
darwinup.txt
dig-results.txt
disks.txt
diskutil.txt
error_log.txt
filecoordination_dump.txt
footprint-all.txt
fs_usage.txt
fsck_hfs_user.log
fsck_hfs_var.log
gpt.txt
ifconfig.txt
ioreg
ipconfig.txt
kextstat.txt
launchctl-list.txt
locale.txt
logs
lsappinfo.txt
lsmp.txt
lsof.txt
lsregister.txt
microstackshots
microstackshots_lastday.txt
microstackshots_lasthour.txt
microstackshots_lastminute.txt
mount.txt
netstat
nfsstat.txt
odutil.txt
pluginkit.txt
pmset_everything.txt
powermetrics.txt
ps.txt
ps_thread.txt
reachability-info.txt
resolv.conf
scutil.txt
smcDiagnose.txt
spindump.txt
stackshot-last-sym.log
sysctl.txt
sysdiagnose.log
system_profiler.spx
talagent.txt
taskinfo.txt
thermal.txt
top.txt
var_run_resolv.conf
vm_stat.txt
zprint.txt
You can use the top
command to monitor the resources of your Macbook in real-time. The top
command is a built-in utility that shows the processes that are currently running on the system, along with information about their CPU and memory usage.
To use the top
command, open a terminal window and type top
. The output will show the list of processes, sorted by their CPU usage, with the most CPU-intensive processes at the top. You can use the q
key to exit the top
command.
Here are some of the key options you can use with the top
command:
-o
: sort the processes by a particular resource, such as CPU usage or memory usage. For example,top -o cpu
will sort the processes by CPU usage.-s
: specify the delay between updates. For example,top -s 2
will update the display every 2 seconds.-u
: show the process for a particular user. For example,top -u username
will show the processes for the user with the specified username.
You can use these options in combination to customize the output of the top
command. For example, to monitor the CPU usage of the processes owned by a particular user, you can use the following command:
top -o cpu -s 2 -u username