1 votos

Registros unificados | macOS High Sierra

Tengo macOS unificado de registros de Sistema en .logarchive formato. Cualquier intento de analizar la .logarchive en el Sistema B usando log show comando proporciona la siguiente error:

bash-3.2#log show /tmp/unifiedlogsv2/unifiedlogs.logarchive
        ==========
    /private/tmp/unifiedlogsv2/unifiedlogs.logarchive
        ==========
    log: Archive format needs updating (to version 3), doing so will render the archive unreadable by older tools.
    Re-run log with --force if you want to allow this upgrade

Cuando se ejecuta con --force opción, se muestra el siguiente error:

bash-3.2# log show --force /tmp/unifiedlogsv2/unifiedlogs.logarchive|more
log: warning: The log archive contains partial or missing metadata
log: Could not open log archive: The log archive format is corrupt and cannot be read
==========
/private/tmp/unifiedlogsv2/unifiedlogs.logarchive
==========

El mismo logarchive abre bien en la Consola. Mi objetivo es analizar la logarchive el uso de la log show comando. Alguna sugerencia de cómo hacerlo?

3voto

slm Puntos 118

El man log página muestra dos interruptores, --file <file> & --arcive archive que es probable que tengas que incluir uno de ellos cuando se trabaja con archivos de otro sistema que no están en el sistema local.

log show [--archive archive | --file file] [--predicate filter] [--source] [--style default | compact | json | syslog] [--color auto | always | none]
     [--start date/time] [--end date/time] [--[no-]info] [--[no-]debug] [--[no-]signpost] [--last time [m|h|d]] [--timezone local | timezone]

La página man expone en detalle los 2 interruptores así:

    --archive archive
                     Display events stored in the given archive. The archive 
                     must be a valid log archive bundle with the suffix
                     .logarchive.

    --file file      Display events stored in the given .tracev3 file. In order 
                     to be decoded, the file must be contained within
                     a valid .logarchive bundle, or part of the system logs 
                     directory.

Ejemplo

Puesto que usted está trabajando con .logarchive archivos de formato es probable que usted desea utilizar el --archive switch:

$ log show --archive /tmp/unifiedlogsv2/unifiedlogs.logarchive

AppleAyuda.com

AppleAyuda es una comunidad de usuarios de los productos de Apple en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X