X-Git-Url: https://git.saurik.com/apple/configd.git/blobdiff_plain/bda8ce6bde503c8aa95a6f09eaff112229c3686a..942cecd7bb3d0412e584f1a3ca1871e3c0384926:/get-mobility-info diff --git a/get-mobility-info b/get-mobility-info index f802b93..6df85fd 100755 --- a/get-mobility-info +++ b/get-mobility-info @@ -536,53 +536,22 @@ if [ -x /usr/bin/what -a -x /usr/bin/sum -a -x /bin/ls ]; then fi # -# to give a chance for "networkd" and the DNS service to finish dumping their -# state, the last thing we do is collect the logs -# - -# -# system log, kernel.log, early boot log messages -# -if [ -x /usr/bin/syslog ]; then - # - # save the recent activity - # - ${PRIV} /usr/bin/syslog -T local.3 \ - | ${TAIL_25000} > syslog - - # - # save just the "kernel" activity (in case some of the - # interesting/relevant message are before the messages - # captured above. - # - ${PRIV} /usr/bin/syslog -T local.3 -k Facility kern \ - | ${TAIL_25000} > kernel - - if [ -d /var/log/DiagnosticMessages ]; then - # save any MessageTracer activity - ${PRIV} /usr/bin/syslog -d /var/log/DiagnosticMessages \ - -F raw \ - -T local.3 \ - | ${TAIL_25000} > DiagnosticMessages - fi -else - if [ -f /var/log/system.log ]; then - ${PRIV} ${TAIL_25000} /var/log/system.log > system.log - fi - if [ -f /var/log/kernel.log ]; then - ${PRIV} ${TAIL_25000} /var/log/kernel.log > kernel.log +# collect the logarchive +# +if [ -x /usr/bin/log ]; then + LOGARCHIVE_START_TIME=`date -v -1d +"%Y-%m-%d %H:%M:%S"` + LOGARCHIVE_OUTPUT="system_logs.logarchive" + ${PRIV} /usr/bin/log collect --livedata --output "${LOGARCHIVE_OUTPUT}" --start "${LOGARCHIVE_START_TIME}" 2>/dev/null + if [ -d ${LOGARCHIVE_OUTPUT} ]; then + ${PRIV} chown -R ${UID} "${LOGARCHIVE_OUTPUT}" fi fi -if [ -x /sbin/dmesg ]; then - ${PRIV} /sbin/dmesg > dmesg -fi # -# IPConfiguration log +# dmesg # -if [ -f /var/log/com.apple.IPConfiguration.bootp ]; then - ${PRIV} ${TAIL_2000} /var/log/com.apple.IPConfiguration.bootp \ - > com.apple.IPConfiguration.bootp +if [ -x /sbin/dmesg ]; then + ${PRIV} /sbin/dmesg > dmesg fi # @@ -612,13 +581,6 @@ do fi done -# -# application firewall log -# -if [ -f /var/log/appfirewall.log ]; then - ${PRIV} ${TAIL_2000} /var/log/appfirewall.log > appfirewall.log -fi - if [ -x /bin/ls ]; then # # collect crash reports @@ -654,19 +616,6 @@ if [ -x /bin/ls ]; then fi done done - - # - # collect any verbose logging output - # - /bin/ls -1 /Library/Logs/CrashReporter/com.apple.networking.*.log* \ - 2>/dev/null \ - | while read log - do - if [ -f "${log}" ]; then - b="`basename ${log}`" - ${PRIV} cat "${log}" > "${b}" 2>&1 - fi - done fi #