在我的Linux机器上使用osquery(如果重要的话,请使用CentOS 7),当使用osqueryi
交互式shell运行每个查询时,我会自动获得有关迁移的详细信息输出。有什么方法可以静默/隐藏此类输出并仅返回结果?
# osqueryi --json "SELECT * FROM memory_info";
I0228 15:39:12.077577 6039 database.cpp:563] Checking database version for migration
I0228 15:39:12.077644 6039 database.cpp:587] Performing migration: 0 -> 1
I0228 15:39:12.077657 6039 database.cpp:619] Migration 0 -> 1 successfully completed!
I0228 15:39:12.077663 6039 database.cpp:587] Performing migration: 1 -> 2
I0228 15:39:12.077672 6039 database.cpp:619] Migration 1 -> 2 successfully completed!
[{"active":"320831488","buffers":"2158592","cached":"379183104","inactive":"130363392","memory_free":"1393258496","memory_total":"1928024064","swap_cached":"0","swap_free":"1610608640","swap_total":"1610608640"}]
# osqueryi --json "SELECT * FROM memory_info";
[{"active":"320831488","buffers":"2158592","cached":"379183104","inactive":"130363392","memory_free":"1393258496","memory_total":"1928024064","swap_cached":"0","swap_free":"1610608640","swap_total":"1610608640"}]
答案 0 :(得分:1)
您可以在命令行中添加--logger_min_status 1
,但是希望https://github.com/facebook/osquery/pull/5530默认会解决此问题。