Skip to content

Commit

Permalink
发布博客,时间:2024/10/11 17:04:35
Browse files Browse the repository at this point in the history
  • Loading branch information
whp98 committed Oct 11, 2024
1 parent b632bb0 commit 4fd8070
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docs/AI相关/LLM-API参数解读.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# LLM-API参数解读

大语言模型API参数解读

## Temperature 温度
较高的温度将使输出更加随机和多样化。

## Top P
较低的 top-p 值会减少多样性并关注更有可能的代币。

## Top k

Lower top-k 还将采样集中在每个步骤的最高概率标记上。

1 change: 1 addition & 0 deletions docs/AI相关/index.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# AI相关
- [LLM-API参数解读](./LLM-API参数解读.md)
- [Ollama安装和使用](./ollama安装和使用.md)
1 change: 1 addition & 0 deletions docs/Linux系统/ubuntu桌面/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ubuntu桌面
- [ubuntu24.04断网排查和修复](./ubuntu断网排查.md)
- [ubuntu安装nvidia 4060ti驱动](./ubuntu安装nvidia驱动.md)
- [Ubuntu24.04大内存和多服务优化](./Ubuntu24.04大内存和多服务优化.md)
- [Ubuntu24.04剪辑软件kdenlive](./ubuntu24.04剪辑软件.md)
Expand Down
106 changes: 106 additions & 0 deletions docs/Linux系统/ubuntu桌面/ubuntu断网排查.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# ubuntu24.04断网排查和修复

故障描述:

有线网卡图标找不到,无法上网,并且为wifi无法连接。

## 排查思路

### 1.查看网卡硬件信息

```shell
lspci | grep Ethernet
```

```shell
lshw -c network
```

如果能看到网卡信息,说明驱动正常。

### 2.NetworkManager 日志分析
先监控日志
```shell
sudo journalctl -u NetworkManager -f
```
之后重启服务
```shell
sudo systemctl restart NetworkManager
```
分析期间的日志信息如下:

```text
10月 11 15:18:14 没有 NetworkManager[45923]: <info> [1728631094.5378] settings: Loaded settings plugin: keyfile (internal)
10月 11 15:18:14 mypc NetworkManager[45923]: <info> [1728631094.5378] ifupdown: management mode: unmanaged
10月 11 15:18:14 mypc NetworkManager[45923]: <info> [1728631094.5378] ifupdown: interfaces file /etc/network/interfaces doesn't exist
10月 11 15:18:14 mypc NetworkManager[45968]: /etc/netplan/90-NM-957ea871-bac8-4e88-bd7a-cd135541f3fc.yaml:10:19: Error in network definition: Invalid MAC address 'stable-ssid', must be XX:XX:XX:XX:XX:XX, XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX or one of 'permanent', 'random', 'stable', 'preserve'.
10月 11 15:18:14 mypc NetworkManager[45968]: macaddress: "stable-ssid"
10月 11 15:18:14 mypc NetworkManager[45968]: ^
10月 11 15:18:15 mypc NetworkManager[45923]: <info> [1728631095.2760] dhcp: init: Using DHCP client 'internal'
10月 11 15:18:15 mypc NetworkManager[45923]: <info> [1728631095.2762] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
10月 11 15:18:15 mypc NetworkManager[45923]: <info> [1728631095.2766] device (br-0ad233ffab7c): carrier: link connected
```
这个应该是bug

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2084234

日志分析:查看日志中是否有错误信息,或者提示信息。

这里看到了 "Invalid MAC address 'stable-ssid'"

这个错误信息表明了在配置文件中定义的 MAC 地址设置不正确。

这里是因为"stable-ssid"这个设置不再有效,可以手工修改配置文件,或者使用"随机"或者"稳定"等设置。
```shell
sudo nano /etc/netplan/90-NM-957ea871-bac8-4e88-bd7a-cd135541f3fc.yaml
```

修改完成之后重启网络服务即可使用wifi。

重启网络服务
```shell
sudo systemctl restart NetworkManager
```

到这里wifi正常了,有线还是没有操作的地方。

### 3.排查NetworkManager管理状态

```shell
nmcli device status
```

输出显示有线网卡未托管。

查看排除文件

```shell
sudo cat /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
```
输出:

```shell
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma
```

10-globally-managed-devices.conf 排除了*保留了wifi和gsm等设备,缺少了以太网。

解决办法:
```shell
sudo vim /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
```
修改成下面
```text
[keyfile]
unmanaged-devices=*,except:type:ethernet,except:type:wifi,except:type:gsm,except:type:cdma
```

重启网络服务

```shell
sudo systemctl restart NetworkManager
```

至此有线网卡状态已恢复。

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 目录
- [AI相关](./AI相关/)
- [后端开发](./后端开发/)
- [生活记录](./生活记录/)
- [社会认知](./社会认知/)
Expand All @@ -8,7 +9,6 @@
- [前端开发](./前端开发/)
- [开发工具技巧](./开发工具技巧/)
- [Python语言](./Python语言/)
- [AI相关](./AI相关/)
- [Linux系统](./Linux系统/)
- [Git版本管理](./Git版本管理/)
- [安卓开发](./安卓开发/)
Expand Down

0 comments on commit 4fd8070

Please sign in to comment.