Skip to main content
Solved

Sysdiagnose "Programatically" in Self Service?

  • June 13, 2022
  • 2 replies
  • 25 views

Forum|alt.badge.img+13

Does anyone have a script that they use to run sysdiagnose from Self Service? Just having the command in a script, it requires you to press "enter", and gives an error in the logs stating:

Script result: Triggering sysdiagnose programmatically from CLI with incorrect arguments. Exiting. This tool generates files that allow Apple to investigate issues with your computer and help improve Apple products. The files might contain personal information found on your device or associated with your iCloud accounts, including but not limited to your name, serial numbers of your device, your device name, your attached peripheral devices, your user name, your email address and email settings, file paths, file names, Siri suggestions, your computer's IP addresses, and network connection information. This information is used by Apple in accordance with its privacy policy (www.apple.com/privacy) and is not shared with any other company. By using this tool and sending the results to Apple, you consent to Apple using the contents of these files to improve Apple products. Press 'Enter' to continue. Ctrl+\\ to cancel. File: /var/tmp/mat-debug-31596.log

Best answer by PhillyPhoto

Thanks, @AVmcclint! I created this script, expanding on that option:

#!/bin/sh # Run SysDiagnose programatically and then reveal the file to the user sysD=`sysdiagnose -u` sysDFile=`echo $sysD | awk '{print $NF}' | awk '{ print substr( $0, 2 ) }' | awk '{ print substr( $0, 1, length($0)-2 ) }'` open -R $sysDFile

 

2 replies

AVmcclint
Forum|alt.badge.img+21
  • Esteemed Contributor
  • 1043 replies
  • June 13, 2022

try 

sysdiagnose -u

man sysdiagnose  says  

-u Disable UI feedback

 and that seems to work on my system.

 


Forum|alt.badge.img+13
  • Author
  • Valued Contributor
  • 217 replies
  • Answer
  • June 13, 2022

Thanks, @AVmcclint! I created this script, expanding on that option:

#!/bin/sh # Run SysDiagnose programatically and then reveal the file to the user sysD=`sysdiagnose -u` sysDFile=`echo $sysD | awk '{print $NF}' | awk '{ print substr( $0, 2 ) }' | awk '{ print substr( $0, 1, length($0)-2 ) }'` open -R $sysDFile