Running tools within sysdiagnose individually

sysdiagnose is a shotgun approach, which runs almost all performance monitoring tools in succession, and generates a huge amount of output data. What if you know which of those tools you want to run, but are not sure how is best to do that?

Here is a listing of the major shell commands which are run by sysdiagnose, in the order in which it runs them. Note that where you see OUTPATH, you will have to insert a valid path to the file or folder into which output is to be generated. If anything is unclear, it is best to check the options for that command using the man command, e.g.
man taskinfo

Some commands may need to be run as root using sudo.

The two variants of ps which are used are
/bin/ps axwww -o user,uid,pid,ppid,%cpu,%mem,pri,ni,vsz,rss,wchan,tt,stat,start,time,command
for process information, and
/bin/ps axMwww -o ppid,%mem,pri,ni,vsz,rss,wchan,start,time,command
to provide information about all the threads.

Other commands include:
/usr/bin/fs_usage -w -t 10
/usr/bin/top -l9 -d -r
/usr/bin/vm_stat -c 50 0.2
/usr/sbin/spindump -file OUTPATH -sampleWithoutTarget
/usr/bin/taskinfo --threads
/usr/libexec/smcDiagnose
/usr/bin/powermetrics -i 10000 -n 1 --show-all --show-initial-usage
/System/Library/Frameworks/IOBluetooth.framework/Resources/BluetoothReporter --dumpPacketLog OUTPATH
/usr/bin/thermal config
/usr/bin/ostraceutil -breadcrumbs
/System/Library/Frameworks/CoreGraphics.framework/Resources/WSInfo
/usr/sbin/lsof -n -M -P -T -w +c 0 -s
/usr/bin/lsmp -all -v
/usr/bin/footprint -v -a
/usr/bin/mddiagnose -m -n -w -f OUTPATH
/usr/bin/vmmap -resident -dirty -purge 405
/usr/bin/heap -guessNonObjects -sumObjectFields 405
/usr/sbin/diskutil list
/usr/sbin/diskutil cs list
/usr/sbin/diskutil info -all
/bin/bash -c /usr/sbin/diskutil list | /usr/bin/grep GUID_partition_scheme | /usr/bin/grep -o -E disk[0-9]+ | /usr/bin/xargs -I {} /bin/sh -c "/usr/sbin/gpt -rvvvv show /dev/{} ; /bin/echo '*********************' "
/usr/bin/find -E /dev -regex /dev/disk[0-9]+ -exec /usr/bin/hdiutil pmap -complete -uuids {} ;
/usr/sbin/BootCacheControl statistics
/usr/bin/printf #df
/bin/df -H
/sbin/mount
/usr/sbin/sysctl -a
/usr/sbin/kextstat
/usr/bin/zprint -t -w
/usr/bin/lskq -a -v
/usr/bin/killall -INFO opendirectoryd
/usr/bin/odutil show all
/usr/bin/nfsstat -m
/usr/sbin/netstat -anW
/usr/sbin/netstat -sW
/usr/sbin/netstat -mmmW
/usr/sbin/netstat -indW
/usr/sbin/netstat -nralW
/usr/sbin/netstat -rs
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --getinfo
/sbin/ifconfig -a -L -b -m -r -v
/bin/bash -c /sbin/ifconfig -l | /usr/bin/tr ' ' ' ' | /usr/bin/grep en | /usr/bin/xargs -I {} /bin/sh -c "/bin/echo '{}' ; /usr/sbin/ipconfig getpacket {} ; /bin/echo '*********************' "
/usr/sbin/scutil -d -v -r http://www.apple.com
/usr/bin/dig -t any -c any http://www.apple.com
/usr/sbin/scutil --dns
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Resources/get-network-info -c OUTPATH
/usr/bin/pmset -g everything
/bin/bash -c /usr/sbin/system_profiler SPParallelATADataType SPAirPortDataType SPBluetoothDataType SPDiagnosticsDataType SPEthernetDataType SPExtensionsDataType SPFibreChannelDataType SPFireWireDataType SPFirewallDataType SPHardwareDataType SPHardwareRAIDDataType SPNetworkLocationDataType SPManagedClientDataType SPMemoryDataType SPNetworkDataType SPPowerDataType SPSerialATADataType SPSoftwareDataType SPUSBDataType SPNetworkVolumeDataType SPExtensionsDataType SPDisplaysDataType SPThunderboltDataType SPPrintersSoftwareDataType SPPrintersDataType SPAudioDataType -xml -timeout 40 > OUTPATH
/usr/sbin/ioreg -i -l -p IOService -w 0
/usr/sbin/ioreg -i -l -p IOACPIPlane -w 0
/usr/sbin/ioreg -i -l -p IOPower -w 0
/usr/sbin/ioreg -i -l -p IODeviceTree -w 0
/usr/sbin/ioreg -i -l -p IOUSB -w 0
/usr/sbin/ioreg -i -l -p IOFireWire -w 0
/System/Library/CoreServices/loginwindow.app/Contents/Resources/lwdumplog -sysdiagnose -d OUTPATH
/usr/sbin/spindump -microstackshots_only -microstackshots_save -microstackshots_datastore OUTPATH -microstackshots_starttime 1454536109 -microstackshots_endtime 1454622509
/usr/sbin/spindump -microstackshots_only -microstackshots_datastore OUTPATH -file OUTPATH -microstackshots_starttime 1454622449 -microstackshots_endtime 1454622509
/usr/sbin/spindump -microstackshots_only -microstackshots_datastore OUTPATH -file OUTPATH -microstackshots_starttime 1454618909 -microstackshots_endtime 1454622509
/usr/sbin/spindump -microstackshots_only -microstackshots_datastore OUTPATH -file OUTPATH -microstackshots_starttime 1454536109 -microstackshots_endtime 1454622509
/usr/bin/brctl diagnose --sysdiagnose OUTPATH
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump
/System/Library/PrivateFrameworks/CoreCapture.framework/Versions/A/Resources/collectWiFiDebugInfo.py OUTPATH
/usr/bin/lsappinfo sysdiagnose
/System/Library/PrivateFrameworks/ApplePushService.framework/apsctl status
/usr/bin/darwinup list
/System/Library/PrivateFrameworks/CoreSuggestions.framework/Tools/suggest_tool dbStats
/System/Library/PrivateFrameworks/CoreSuggestions.framework/Tools/suggest_tool dbSchema
/bin/launchctl asuser 0 /bin/launchctl list
/bin/launchctl print system/
/bin/launchctl dumpstate
/bin/launchctl asuser 501 /bin/launchctl list
/bin/launchctl print user/501
/bin/launchctl print gui/501
/bin/launchctl asuser 501 /usr/bin/defaults read -g AppleLanguages
/bin/launchctl asuser 501 /usr/bin/defaults read -g AppleLocale
/bin/launchctl asuser 501 /usr/bin/defaults read com.apple.HIToolbox
/usr/bin/sudo -u #501 /System/Library/CoreServices/talagent -log
/bin/launchctl asuser 501 /System/Library/CoreServices/talagent -winfo
/bin/launchctl asuser 501 /System/Library/CoreServices/talagent -casinfo
/bin/launchctl asuser 501 /usr/bin/pluginkit -m -D --raw
/bin/launchctl asuser 501 /System/Library/Frameworks/Accounts.framework/Versions/A/Support/acdiagnose