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-840985

Rychu's questions

Martin Hope
Rychu
Asked: 2022-02-19 02:32:25 +0800 CST

更换处理器后,Motd 温度读数不正确

  • 1

我最近将我的 CPU 和 MOBO 更改为安装在技嘉 B660M DS3H DD4 主板上的 i5-12400。从那时起,我一直有错误的motd温度读数:

Welcome to Ubuntu 21.10 (GNU/Linux 5.13.0-28-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Feb 18 11:25:17 AM CET 2022

  System load:    1.26      Processes:                        450
  Usage of /home: unknown   Users logged in:                  0
  Memory usage:   10%       IPv4 address for xxx:             yyy
  Swap usage:     0%        IPv4 address for xxx:             yyy
  Temperature:    46.0 C    IPv4 address for xxx:             yyy

更改后,我执行了lm-sensors程序并从中sensors得到:

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +16.8°C  (crit = +20.8°C)
temp2:        +27.8°C  (crit = +105.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +38.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +36.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:        +34.0°C  (high = +80.0°C, crit = +100.0°C)
Core 2:        +35.0°C  (high = +80.0°C, crit = +100.0°C)
Core 3:        +34.0°C  (high = +80.0°C, crit = +100.0°C)
Core 4:        +34.0°C  (high = +80.0°C, crit = +100.0°C)
Core 5:        +34.0°C  (high = +80.0°C, crit = +100.0°C)

为了确定哪个读数正确,我快速重启到 UEFI 并显示 38.0°C。当系统motd再次启动时显示46.0 C。

这是我可以解决的问题吗?

temperature
  • 1 个回答
  • 101 Views
Martin Hope
Rychu
Asked: 2022-02-19 02:12:17 +0800 CST

了解 Ubuntu 中的内存使用情况 - 从 20.04 升级到 Ubuntu 21.10 后,我的内存使用情况急剧增加

  • 0

在互联网上阅读了很多不同的文章后,我仍然对如何准确地找到正在使用我的记忆的内容感到困惑。

从 20.04 升级到 Ubuntu Server 21.10 后,我的内存使用量急剧增加,我试图找出造成这种情况的原因。

当我登录服务器时,有一些受欢迎的统计数据显示:Memory usage: 65%.

当我跑步时,free -m我得到:

               total        used        free      shared  buff/cache   available
Mem:           31881       20575        9669         162        1636       10680
Swap:           8191           0        8191

到目前为止,它匹配。我知道这里有一些混乱,我的实际可用内存是free + buff/cache或类似的,但后来我在互联网上找到了一个命令,它返回所有进程的内存消耗总和:

$ echo $(ps -o rss= ax | tr '\n' +) 0 | bc
5978056

这给了5-6GB。它与从返回的任何值都不匹配free -m。按内存列排序的结果top似乎证实了这一点:

top - 10:53:49 up 3 days, 13:28,  1 user,  load average: 0.11, 0.10, 0.09
Tasks: 451 total,   1 running, 438 sleeping,   0 stopped,  12 zombie
%Cpu(s):  0.2 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  31881.4 total,   9791.5 free,  20453.8 used,   1636.1 buff/cache
MiB Swap:   8192.0 total,   8192.0 free,      0.0 used.  10801.7 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   3930 mssql     20   0   20.6g   1.1g  44584 S   2.0   3.4 116:22.67 sqlservr
   3115 mysql     20   0 5336868 726652  19148 S   0.3   2.2  11:29.69 mariadbd
  19021 www-data  20   0  438324 231656 169396 S   0.0   0.7   3:31.67 php-fpm8.0
   3348 www-data  20   0  438112 231096 171232 S   0.0   0.7   3:52.81 php-fpm8.0
   3349 www-data  20   0  436832 227820 168664 S   0.0   0.7   3:26.81 php-fpm8.0
   3356 www-data  20   0  429292 223864 171360 S   0.0   0.7   3:59.62 php-fpm8.0
   3354 www-data  20   0  427580 221492 170016 S   0.0   0.7   3:47.99 php-fpm8.0
   3357 www-data  20   0  428052 221336 169144 S   0.0   0.7   3:51.86 php-fpm8.0
   3355 www-data  20   0  427056 220772 170064 S   0.0   0.7   3:35.60 php-fpm8.0
   3345 www-data  20   0  427080 220116 169212 S   0.0   0.7   3:51.67 php-fpm8.0
   3365 www-data  20   0  425712 220024 171216 S   0.0   0.7   3:42.05 php-fpm8.0
  19700 www-data  20   0  424868 218940 169908 S   0.0   0.7   3:39.68 php-fpm8.0
   3363 www-data  20   0  423260 218804 171252 S   0.0   0.7   3:45.00 php-fpm8.0
   3341 www-data  20   0  423184 217468 170044 S   0.0   0.7   3:49.10 php-fpm8.0
   3353 www-data  20   0  421016 214860 169556 S   0.0   0.7   3:30.55 php-fpm8.0
   3351 www-data  20   0  420432 212680 169256 S   0.0   0.7   3:25.20 php-fpm8.0
   2674 www-data  20   0   22.7g 169652  41068 S   0.0   0.5   3:03.73 dotnet
   2696 git       20   0 2181008 165396  43788 S   0.0   0.5   7:55.15 gitea
   1324 root      19  -1  134508  72360  71296 S   0.0   0.2   0:15.71 systemd-journal
   4159 root      20   0 2052028  62724  31824 S   0.0   0.2   4:02.05 dockerd
2289460 root      20   0 1910052  39892  20176 S   0.0   0.1   0:23.22 snapd
   2726 root      20   0 2011284  31740  16344 S   0.0   0.1   8:44.13 containerd
   2703 root      20   0  270968  26244  19164 S   0.0   0.1   0:23.63 php-fpm8.0
   3251 www-data  20   0  102500  21180  16652 S   0.0   0.1   6:46.80 nginx
   2734 root      20   0 1139124  20408   7864 S   0.3   0.1  14:21.22 fail2ban-server
   3254 www-data  20   0  101948  20048  16336 S   0.0   0.1   0:02.27 nginx
   4165 minidlna  20   0  239012  19372  14324 S   0.0   0.1   0:39.26 minidlnad
   2017 root      rt   0  280960  18584   8772 S   0.3   0.1   0:47.47 multipathd
   2801 root      20   0  112464  18560   9988 S   0.0   0.1   0:00.05 unattended-upgr
   4242 root      20   0   84880  17604  14660 S   0.0   0.1   0:15.41 smbd
   2664 root      20   0   34740  17488   8508 S   0.0   0.1   0:00.08 networkd-dispat
   3253 www-data  20   0  101372  17020  13748 S   0.0   0.1   0:00.18 nginx
 203855 root      20   0  295244  16160  13364 S   0.0   0.0   0:02.36 packagekitd
   2700 mssql     20   0   72632  14852   6224 S   0.0   0.0   0:00.85 sqlservr
   3257 www-data  20   0  101240  14756  11540 S   0.0   0.0   0:00.02 nginx
   4234 root      20   0   22436  12928   3544 S   0.0   0.0   0:10.19 ddclient - slee
   4160 root      20   0   70756  12212   9912 S   0.0   0.0   0:09.06 nmbd
   2676 root      20   0  395152  11632   8612 S   0.0   0.0   0:53.73 udisksd
   2591 systemd+  20   0   23640  11164   7108 S   0.0   0.0   1:26.88 systemd-resolve
      1 root      20   0  166644  10784   5516 S   0.0   0.0   0:29.92 systemd
   4561 root      20   0   26968  10156   7144 S   0.0   0.0   0:44.81 portainer
   4288 root      20   0   84864   9184   6240 S   0.0   0.0   0:00.99 lpqd
1319978 rychu     20   0   15832   8848   6896 S   0.0   0.0   0:00.06 systemd
   4284 root      20   0   82640   8748   5956 S   0.0   0.0   0:00.59 smbd-notifyd
   3255 www-data  20   0  101088   8668   5496 S   0.0   0.0   0:00.00 nginx
   2706 redis     20   0   70552   8420   6348 S   0.0   0.0  13:27.82 redis-server
1319928 root      20   0   14860   8112   6648 S   0.0   0.0   0:00.03 sshd
   2671 root      20   0  126992   7576   6720 S   0.0   0.0   0:22.24 thermald

这是我的snap list输出:

$ snap list
Name                 Version    Rev    Tracking       Publisher   Notes
canonical-livepatch  10.1.2     126    latest/stable  canonical✓  -
core                 16-2.54.3  12725  latest/stable  canonical✓  core
core18               20211215   2284   latest/stable  canonical✓  base
core20               20220114   1328   latest/stable  canonical✓  base
lxd                  4.0.8      21835  4.0/stable/…   canonical✓  -

所以我很困惑我的~14GB 已用内存在哪里?

ram
  • 3 个回答
  • 521 Views
Martin Hope
Rychu
Asked: 2022-01-25 12:54:31 +0800 CST

任何人都知道为什么在 Ubuntu 21.10 中“atd”被“屏蔽”了吗?它是错误还是功能?

  • 1

我最近从 Ubuntu Server 20.04.3 升级到 21.10 并且刚刚注意到atd进程被标记为masked.

这是有意的还是应该被揭露?

$ systemctl status atd
○ atd.service
     Loaded: masked (Reason: Unit atd.service is masked.)
     Active: inactive (dead)
server
  • 1 个回答
  • 86 Views
Martin Hope
Rychu
Asked: 2022-01-25 07:15:51 +0800 CST

在 ZFS 引导和主板更改上使用 root 的 Ubuntu

  • 0

我很快将我的主板(以及 CPU 和 RAM btw.)从 Asrock J5005-ITX 更换为带有 Intel B660 芯片的新主板。我有 Ubuntu 服务器从 ZFS 池引导根。

我应该如何为迁移做准备?我应该在之前仔细检查什么,我应该期待我应该提前准备解决方案的任何特定问题吗?

从我一直在阅读的内容来看,此类硬件迁移大多是安全的,但我没有找到太多关于迁移的信息,特别是从 ZFS 引导系统时。

该系统最初是 Ubuntu Server 18.04,使用本指南配置了 ZFS 池https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2018.04%20Root%20on%20ZFS.html但现在已升级到 21.10 以获得与 Alder Lake 的最高兼容性。

boot
  • 1 个回答
  • 187 Views
Martin Hope
Rychu
Asked: 2020-08-09 02:52:26 +0800 CST

TAR `--listed-incremental` 始终是 ZFS(和 Ubuntu)升级后的完整备份

  • 0

TL;博士

在将我的 ZFS 池从 0.7.x 升级到 0.8.3(以及 Ubuntu 从 18.04.x 升级到 20.04.1)之后,我的 Nextcloud 数据备份(几乎)始终是完整备份。在升级之前,一切都很好,加上我的另一个系统 rpool 的行为符合预期。

真实的故事

我配置了两个 TAR 备份。系统备份,现在一切都很好,Nextcloud 数据备份,也很好,但现在不行了。它在 ZFS 0.7.x 和 Ubuntu 18.04.x 上运行了一年多。前段时间我迁移到 Ubuntu 20.04,然后是 20.04.1,自从第一次升级以来,Nextcloud 备份一直(几乎)一直是完整备份。就像十分之一一样,它会按预期进行增量备份,但不幸的是,它更像是一个小故障而不是规则。

果汁

我的备份没什么特别的:

tar -cpz \
    --listed-incremental="$backupIncrementalMetadataFullFileName" \
    --exclude="$backupLocation" \
    --exclude="*RychuSrv*Backup*.*" \
    "/srv/nextcloud/${nextcloudFolderName}" \
        | tee "$tarBackupFullFileName" \
        | gpg [censored]

ZFS 发生了吗?

我将注意力集中在 ZFS 上,因为……还有什么?:) 但我不知道是什么导致了这种情况发生。我尝试将我的行为rpool与 Nextcloud 的行为进行比较,除了日期或指南等明显差异外,我没有发现任何有意义的东西。具有不同值的属性是:

  • 设备
  • 创建txg
  • 自动修剪(rpool是 SSD)
  • canmount(备份的 hason和rpool's has noauto)

我知道可能对问题产生影响的其他功能/属性是atime,realtime并且两个池都是on.

文件看起来如何

因此,备份的主要是文件夹中的图像和视频文件,其中大多数文件已经很长时间没有更改。例如:

# ls -1l . | tail -n 500 | head -n 10
-rw-r--r-- 1 www-data www-data    2113359 Jan  5  2020 IMG_20200105_172639.jpg
-rw-r--r-- 1 www-data www-data    2029782 Jan  5  2020 IMG_20200105_172641.jpg
-rw-r--r-- 1 www-data www-data    2374428 Jan  5  2020 IMG_20200105_172652.jpg
-rw-r--r-- 1 www-data www-data    2523738 Jan  5  2020 IMG_20200105_172654.jpg
-rw-r--r-- 1 www-data www-data    3405077 Jan  6  2020 IMG_20200106_083530.jpg
-rw-r--r-- 1 www-data www-data    1989491 Jan  6  2020 IMG_20200106_183744.jpg
-rw-r--r-- 1 www-data www-data    2220897 Jan 11  2020 IMG_20200111_131056.jpg
-rw-r--r-- 1 www-data www-data    2850718 Jan 11  2020 IMG_20200111_132928.jpg
-rw-r--r-- 1 www-data www-data    2095188 Jan 11  2020 IMG_20200111_132956.jpg
-rw-r--r-- 1 www-data www-data    2312352 Jan 11  2020 IMG_20200111_133414.jpg

# stat IMG_20200111_131056.jpg
  File: IMG_20200111_131056.jpg
  Size: 2220897         Blocks: 4369       IO Block: 131072 regular file
Device: 43h/67d Inode: 328087      Links: 1
Access: (0644/-rw-r--r--)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2020-08-05 00:16:30.136312800 +0200
Modify: 2020-01-11 13:10:57.000000000 +0100
Change: 2020-01-13 14:36:14.531413322 +0100
 Birth: -

您可以看到文件在午夜之后被访问,这意味着备份脚本将其拉入备份。

为什么?该文件已在 6 个月前更改!

PS。我刚刚注意到访问时间有不同的时区。这不是很奇怪吗??

upgrade backup tar zfs
  • 1 个回答
  • 281 Views
Martin Hope
Rychu
Asked: 2020-04-27 05:04:10 +0800 CST

从 18.04 升级到 20.04 后 rsyslog 停止创建 pid 文件

  • 1

从 18.04 LTS 升级到 20.04 LTS 后,rsyslog 停止将其 PID 写入/(var/)run/rsyslogd.pid文件。

configuration systemd rsyslog
  • 1 个回答
  • 1283 Views
Martin Hope
Rychu
Asked: 2020-04-25 04:14:36 +0800 CST

将安装在 ZFS 上的 ROOT 分区的 Ubuntu 18.04 升级到 20.04 是否安全?

  • 2

在安装我的 Ubuntu 18.04 LTS 时,我按照这个 OpenZFS 指南https://github.com/openzfs/zfs/wiki/Ubuntu-18.04-Root-on-ZFS在 ZFS 上安装 root。一切顺利,我的服务器已经运行这个设置一年多了(或者可能两年:))。在此期间,Ubuntu 设法在 ZFS 上添加了对 root 的支持。现在,当 20.04 LTS 发布时,我想知道升级对我来说安全吗?我的 ZFS 根目录是否与新 Ubuntu 支持的根目录兼容?

upgrade compatibility partitioning zfs 20.04
  • 1 个回答
  • 535 Views
Martin Hope
Rychu
Asked: 2019-07-14 05:58:41 +0800 CST

在 Asrock J5005-ITX 上使用 nct6796d 进行风扇控制。无法加载 nct6775 模块

  • 0

我正在尝试控制连接到我的 Asrock J5005-ITX 主板的风扇。我已经确定它包含负责该问题的 Nuvoton NCT6796D 芯片组。我被困在我想sensors-detect检测它的地方。从这个linux 驱动程序文件中,我了解到我需要加载nct6775模块。不幸的是,有些事情是不对的:

userName@Server:/$ sudo modprobe nct6775
userName@Server:/$ sudo sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# Board: ASRock J5005-ITX
# Kernel: 4.18.0-25-generic x86_64
# Processor: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz (6/122/1)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): y
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found unknown chip with ID 0xd423
    (logical device B has address 0x290, could be sensors)
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): y
Probing for `IPMI BMC KCS' at 0xca0...                      No
Probing for `IPMI BMC SMIC' at 0xca8...                     No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): y
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Found unknown SMBus adapter 8086:31d4 at 0000:00:1f.1.
Sorry, no supported PCI bus adapters found.

Next adapter: i915 gmbus dpb (i2c-0)
Do you want to scan it? (yes/NO/selectively): y

Next adapter: i915 gmbus dpc (i2c-1)
Do you want to scan it? (yes/NO/selectively): y

Next adapter: i915 gmbus misc (i2c-2)
Do you want to scan it? (yes/NO/selectively): y


Now follows a summary of the probes I have just done.
Just press ENTER to continue: y

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)y
Successful!

Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.

Unloading cpuid... OK

未找到该模块。我究竟做错了什么?

drivers kernel fan sensors lm-sensors
  • 1 个回答
  • 1122 Views
Martin Hope
Rychu
Asked: 2019-03-21 12:47:58 +0800 CST

增量备份中的奇怪日志行为

  • 1

一段时间以来,我在增量备份中观察到日记日志的奇怪行为。例如,让我们以过去 7 天为例:

RychuSrvSystemBackup_2019-03-14_060001.tar.gz     570.26 MB     2019-03-14 06:00:08
RychuSrvSystemBackup_2019-03-15_060001.tar.gz     63.37 MB      2019-03-15 06:00:08
RychuSrvSystemBackup_2019-03-16_060001.tar.gz     572.26 MB     2019-03-16 06:00:08
RychuSrvSystemBackup_2019-03-17_060001.tar.gz     56.74 MB      2019-03-17 06:00:08
RychuSrvSystemBackup_2019-03-18_060002.tar.gz     575.14 MB     2019-03-18 06:00:08
RychuSrvSystemBackup_2019-03-19_060001.tar.gz     57.26 MB      2019-03-19 06:00:08
RychuSrvSystemBackup_2019-03-20_060001.tar.gz     577.64 MB     2019-03-20 06:00:08

如您所见,图案清晰可见。每第二个增量备份是前一个的 10 倍。

较大的大部分内容都被期刊占据: 日志文件占用 92% 的备份

但是,如果我运行sudo journalctl -b 0查看当前启动的日志,那么它并不长。肯定不是 4GB 长。您可以在下面看到当前期刊的 10 天包含 2 448 552 个字符,并且单独的天数差别不大:

rychu@RychuSRV:~$ date
Wed Mar 20 21:41:59 CET 2019
rychu@RychuSRV:~$ uptime
 21:42:03 up 10 days, 23 min,  1 user,  load average: 0.06, 0.03, 0.00
rychu@RychuSRV:~$ sudo journalctl -b 0 --all | wc
  23754  303844 2448552
rychu@RychuSRV:~$ sudo journalctl -b 0 --since "2019-03-15" --until "2019-03-16" | wc --bytes
227629
rychu@RychuSRV:~$ sudo journalctl -b 0 --since "2019-03-16" --until "2019-03-17" | wc --bytes
225997
rychu@RychuSRV:~$ sudo journalctl -b 0 --since "2019-03-17" --until "2019-03-18" | wc --bytes
219993
rychu@RychuSRV:~$ sudo journalctl -b 0 --since "2019-03-18" --until "2019-03-19" | wc --bytes
218366

谁能给我解释一下我在看什么?

server systemd-journald
  • 1 个回答
  • 140 Views
Martin Hope
Rychu
Asked: 2019-02-18 06:00:57 +0800 CST

apt 升级到 18.04.2 后仍然使用以前的 4.15 内核

  • 13

TL;博士

我无法强制我的 ubuntu 服务器从 18.04.1 升级到 18.04.2 后,将内核升级到相应的 4.18 版本。

历史背景

昨天我跑

sudo apt upgrade

并且在其中一个次要文件上发生了冲突(我认为是/etc/issue.net)。不幸的是,在解决该冲突期间,我不小心关闭了腻子……当我重新登录时,我锁定了apt数据库。我重新启动服务器并执行

sudo dpkg --configure -a

然后sudo apt upgrade就顺利了。重新启动服务器后,我在欢迎消息中看到我的系统已更新,但内核仍为 4.15 版本。

Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)

到目前为止我尝试过的

我尝试了所有可以在 Internet 上找到的解决方案,但没有一个有帮助:

rychu@RychuSRV:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 177 kB in 1s (161 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

rychu@RychuSRV:~$ sudo apt-get install linux-image-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-generic is already the newest version (4.15.0.45.47).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rychu@RychuSRV:~$ sudo apt-get install linux-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-generic is already the newest version (4.15.0.45.47).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rychu@RychuSRV:~$ uname -r && dpkg --get-selections linux
4.15.0-45-generic
linux-base                                      install
linux-firmware                                  install
linux-generic                                   install
linux-headers-4.15.0-45                         install
linux-headers-4.15.0-45-generic                 install
linux-headers-generic                           install
linux-image-4.15.0-23-generic                   deinstall
linux-image-4.15.0-29-generic                   deinstall
linux-image-4.15.0-30-generic                   deinstall
linux-image-4.15.0-32-generic                   deinstall
linux-image-4.15.0-33-generic                   deinstall
linux-image-4.15.0-34-generic                   deinstall
linux-image-4.15.0-36-generic                   deinstall
linux-image-4.15.0-38-generic                   deinstall
linux-image-4.15.0-39-generic                   deinstall
linux-image-4.15.0-42-generic                   deinstall
linux-image-4.15.0-43-generic                   install
linux-image-4.15.0-44-generic                   install
linux-image-4.15.0-45-generic                   install
linux-image-generic                             install
linux-modules-4.15.0-23-generic                 deinstall
linux-modules-4.15.0-29-generic                 deinstall
linux-modules-4.15.0-30-generic                 deinstall
linux-modules-4.15.0-32-generic                 deinstall
linux-modules-4.15.0-33-generic                 deinstall
linux-modules-4.15.0-34-generic                 deinstall
linux-modules-4.15.0-36-generic                 deinstall
linux-modules-4.15.0-38-generic                 deinstall
linux-modules-4.15.0-39-generic                 deinstall
linux-modules-4.15.0-42-generic                 deinstall
linux-modules-4.15.0-43-generic                 install
linux-modules-4.15.0-44-generic                 install
linux-modules-4.15.0-45-generic                 install
linux-modules-extra-4.15.0-23-generic           deinstall
linux-modules-extra-4.15.0-29-generic           deinstall
linux-modules-extra-4.15.0-30-generic           deinstall
linux-modules-extra-4.15.0-32-generic           deinstall
linux-modules-extra-4.15.0-33-generic           deinstall
linux-modules-extra-4.15.0-34-generic           deinstall
linux-modules-extra-4.15.0-36-generic           deinstall
linux-modules-extra-4.15.0-38-generic           deinstall
linux-modules-extra-4.15.0-39-generic           deinstall
linux-modules-extra-4.15.0-42-generic           deinstall
linux-modules-extra-4.15.0-43-generic           install
linux-modules-extra-4.15.0-44-generic           install
linux-modules-extra-4.15.0-45-generic           install

rychu@RychuSRV:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Found linux image: /boot/vmlinuz-4.15.0-44-generic
Found initrd image: /boot/initrd.img-4.15.0-44-generic
Found linux image: /boot/vmlinuz-4.15.0-43-generic
Found initrd image: /boot/initrd.img-4.15.0-43-generic
Adding boot menu entry for EFI firmware configuration
done

rychu@RychuSRV:~$ sudo reboot

和...

Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)
rychu@RychuSRV:~$ uname -r
4.15.0-45-generic

我也试过

rychu@RychuSRV:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.

请帮忙。

server upgrade kernel
  • 3 个回答
  • 12339 Views
Martin Hope
Rychu
Asked: 2018-07-19 06:12:55 +0800 CST

测试 smartmontools 的 exec 命令

  • 1

TL;博士; 有没有办法以exec与测试邮件命令类似的方式测试 smartd 配置的命令?

详细说明: 我的用例是我使用monit来监控我的 Ubuntu Server 18.04。在我的 smartd.conf 中,我告诉 smartmontools:

/dev/sda -a -m root -M exec /usr/share/smartmontools/smartd-runner -M test
/dev/sdb -a -m root -M exec /usr/share/smartmontools/smartd-runner

在/etc/smartmontools/run.d/我有一个名为的脚本notify-monit.sh,当调用它时,会创建一个/etc/monit/reports包含 smartd 报告的文件。然后在/etc/monit/scripts我有另一个由monit调用的bash脚本作为程序检查,如果文件存在则返回1,如果文件不存在则返回0。然后 monit 检查退出代码并在它是 != 0 时发出警报。

这个场景有点复杂,所以我想从头到尾对其进行测试。我手动运行每个脚本,它们单独运行良好,但在 smartd 启动的真实案例场景中测试它们仍然会更安全。

根据我对 smartd 手册页的了解,我-M test只会尝试发送一封测试电子邮件,我在 syslog 中看到它确实做到了这一点。仅此而已。有什么方法可以测试整个exec链条吗?

server monitoring smart 18.04 monit
  • 1 个回答
  • 419 Views
Martin Hope
Rychu
Asked: 2018-06-17 04:50:58 +0800 CST

Netplan 忽略 .network 文件

  • 0

我安装了 Ubuntu 18.04(降级为服务器),但无法在我的以太网适配器上运行互联网。

抱歉没有粘贴文件内容,但我是从不同的 PC 上写的。我在下面附上所有重要内容(IMO)的屏幕截图。

设置为DHCP,*.yaml看起来不错。我没有显示的 IPv4 IP 。显示适配器有时处于状态,有时处于状态。状态总是。/etc/netplan*.network/run/systemd/networkip addrnetworkctln/adegradedSetupunmanaged

systemd-networkd以日志级别重新启动时,debug我可以看到它忽略了/run/systemd/network/*.network文件“因为它不是后缀为 .netdev 的常规文件”。

请看一下代表日志文件的屏幕截图: log

我不是高级 linux 用户,所以请在您的回复中进行解释:) 如果您需要更多信息来帮助,请告诉我。

networking 18.04 netplan
  • 2 个回答
  • 865 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