AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-660438

Juergen's questions

Martin Hope
Juergen
Asked: 2020-08-10 14:57:24 +0800 CST

日志压缩不起作用

  • 4

尽管默认情况下启用了压缩(我没有在 中更改它/etc/systemd/journald.conf),但我的 Ubuntu 18 LTS 服务器中的日志文件似乎没有被压缩,并journalctl声称可以看到压缩文件:

# journalctl --header | grep PRESS | uniq
Incompatible Flags: COMPRESSED-LZ4

# journalctl --disk-usage
Archived and active journals take up 4.0G in the file system.

# journalctl -o verbose | wc
4 GB in 90 Mio lines  # about the same size as the journal files itself

# journalctl -o verbose | gzip | wc -c
193 MB  # reduced by a factor of 20

grep -v '^#' /etc/systemd/journald.conf
[Journal]
Storage=persistent
SystemMaxUse=4G
SystemKeepFree=4G
SystemMaxFileSize=100M
MaxFileSec=1week
SyncIntervalSec=1
LineMax=1K
ForwardToConsole=yes
MaxLevelConsole=crit
MaxLevelWall=alert
RateLimitIntervalSec=2min
RateLimitBurst=2000

当我尝试压缩其中一个/var/log/journal/*/*.journal文件时,我看到减少了 5 倍,而我知道已经压缩的数据不能被另一个压缩器压缩,所以这些文件似乎是未压缩的。

我怎样才能systemd-journald压缩我的日记?

systemd-journald
  • 1 个回答
  • 1264 Views
Martin Hope
Juergen
Asked: 2019-01-25 04:51:28 +0800 CST

apt-get 与 Ubuntu 14 中的私有存储库一起使用,但在 Ubuntu 18 中因 GPG 错误“签名无效”而失败

  • 0

我的私有包存储库在 Ubuntu 14 LTS 中验证正常,但在 Ubuntu 18 LTS 中验证失败。
我没有找到导致不同行为的 Ubuntu 版本的差异。

# Hostname, User, Password, Directory, Distribution, Component and Signature are my
# private values in the following code snippets:
apt-get update
Err:2 http://Hostname/Directory Distribution InRelease
  The following signatures were invalid: Signature

恰当的配置:

cat /etc/apt/sources.list.d/Distribution.list
deb [arch=amd64] http://User:Password@Hostname/Directory/ Distribution Component

下载InRelease文件并手动验证其签名成功(在 Ubuntu 14 和 Ubuntu 18 上结果相同):

wget --server-response -O- http://User:Password@Hostname/Directory/dists/Distribution/InRelease > ./InRelease
gpg --verify --keyring /etc/apt/trusted.gpg.d/Distribution.gpg ./InRelease

gpg: Signature made ...
gpg:                using RSA key ...
gpg: Good signature from "..." [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: SameSignatureAsInTheAptGetOutputAbove

我怎样才能调试到根本原因?

repository apt gnupg
  • 1 个回答
  • 155 Views
Martin Hope
Juergen
Asked: 2018-10-27 04:19:09 +0800 CST

查找 Ubuntu 团队不支持的已安装软件包

  • 9

我如何检查我是否安装了/etc/apt/sources.list“完全不受 Ubuntu 团队支持”的任何 Universe 或 Multiverse 软件包?
我正在寻找的是 Ubuntu 18 LTS 服务器(无 GUI)的命令行,用于按组件列出已安装的软件包,包括无法从apt-get(不是配置的存档的一部分/etc/apt/sources.list)获得的已安装软件包。
aptitude versions '?name(.)'列出可用的包及其安装状态,但不输出其源组件,也不输出apt-cache.

package-management apt
  • 4 个回答
  • 2483 Views
Martin Hope
Juergen
Asked: 2018-08-18 04:47:43 +0800 CST

less 调用 nano 而不是 vi

  • 3

在 Ubuntu 18 LTS 服务器的默认配置中,按 V 键less调用nano编辑器,而不是vi在没有设置环境变量时$LESSEDIT调用编辑$VISUAL器$EDITOR。

我能够恢复man lesswith中记录的正确行为,update-alternatives --set editor /usr/bin/vim.basic但这证明less执行editor而不是vi.

这是一个文档错误(Ubuntu 行为故意与默认上游less行为不同)还是一个错误,或者是我的错(我错过了什么)?

vim command-line less
  • 1 个回答
  • 1234 Views
Martin Hope
Juergen
Asked: 2017-08-25 02:33:28 +0800 CST

logger -s 在 Ubuntu 16 LTS 中打印 <13>

  • 1

在以前的 LTS 版本中,该logger -s命令只是将文本打印到 stderr:
Ubuntu 14 LTS ( package bsdutils, current version 1:2.20.1-5.1ubuntu20.9) 和
Ubuntu 12 LTS ( package bsdutils, current version 1:2.20.1-1ubuntu3.1):

logger -s -t test text
test: text

但是在当前的 LTS 版本中,它会添加一些奇怪的文本:
Ubuntu 16 LTS ( package bsdutils, current version 1:2.27.1-6ubuntu3.3):

logger -s -t test text
<13>Aug 24 12:19:04 test: text

我了解新版本中已添加日期。
但这是什么<13>意思?(syslog本身不包含该<13>字符串。)

编辑:奖金问题:我怎样才能摆脱它?

16.04
  • 1 个回答
  • 324 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve