Estou tentando formatar um arquivo XML (2.6G) usando a ferramenta xmllint
e redirecionando a saída para um arquivo como:
xmllint --format response.xml > formatted.xml
Quando o processo é iniciado, ele está ocupando toda a memória disponível. A saída de:
free -m -c 10000 -s 30
É dado abaixo:
total used free shared buff/cache available
Mem: 15290 92 15111 8 86 14974
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 92 15111 8 86 14974
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 12706 1084 8 1498 2292
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 148 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 147 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15085 148 8 55 79
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 148 8 55 79
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 147 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 148 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 147 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15086 148 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 147 8 55 78
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 147 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 147 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 147 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 147 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15087 146 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15088 146 8 55 77
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15088 146 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15088 146 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15088 146 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15088 145 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15089 145 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15089 145 8 55 75
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15089 145 8 55 76
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15089 145 8 55 75
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15089 145 8 55 75
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15090 144 8 55 75
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15090 144 8 55 75
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15090 144 8 55 74
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15090 144 8 55 74
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15090 143 8 55 74
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15091 143 8 55 74
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15091 143 8 55 74
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15091 143 8 55 73
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15091 142 8 55 73
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15092 142 8 55 73
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15092 142 8 55 73
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15092 142 8 55 73
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15092 142 8 55 72
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15092 141 8 55 72
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 141 8 55 72
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 141 8 55 72
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 141 8 55 72
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 141 8 55 71
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 141 8 55 71
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15093 140 8 55 71
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15094 140 8 55 71
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15094 140 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15094 140 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15094 139 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15094 139 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15095 139 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15095 139 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15095 139 8 55 70
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15095 139 8 55 69
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15095 139 8 55 69
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 138 8 55 69
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 138 8 55 69
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 138 8 55 69
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 138 8 55 68
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 137 8 55 68
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15096 137 8 55 68
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15097 137 8 55 68
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15097 137 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15097 137 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15097 136 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15097 136 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15098 136 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15098 136 8 55 67
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15098 136 8 55 66
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15098 135 8 55 66
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15099 135 8 55 66
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15099 135 8 55 66
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15099 135 8 55 65
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15099 135 8 55 65
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15099 134 8 55 65
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15100 134 8 55 64
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 15101 133 8 55 64
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 94 15134 8 61 14983
Swap: 0 0 0
total used free shared buff/cache available
Mem: 15290 94 15133 8 61 14983
Swap: 0 0 0
Depois de um tempo, o processo é eliminado automaticamente após o registro de Killed
no console. Como processar / formatar arquivos enormes usando xmllint
?
A versão do sistema operacional é:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial