![格式化大文件时 xmllint 被终止](https://linux22.com/image/120467/%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%A4%A7%E6%96%87%E4%BB%B6%E6%97%B6%20xmllint%20%E8%A2%AB%E7%BB%88%E6%AD%A2.png)
我正在尝试使用工具格式化 XML 文件(2.6G)xmllint
并将输出重定向到文件,如下所示:
xmllint --format response.xml > formatted.xml
当进程启动时,它会占用所有可用内存。输出:
free -m -c 10000 -s 30
给出如下:
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
过了一段时间,登录Killed
控制台后,该进程被自动杀死。如何使用处理/格式化大文件xmllint
?
操作系统版本是:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial