[命令] Linux 命令 uname (显示系统信息)

内容一:uname 命令的格式

# uname <option>

内容二:uname 命令的选项

1) -a 或者 –all,显示所有系统信息

(补充:如果系统处理器类型和系统硬件平台处于未知状态则不显示)

2) -s 或者 –kernel-name,显示系统内核
3) -n 或者 –nodename,显示系统节点名称
4) -r 或者 –kernel-release,显示系统内核发布版本
5) -m 或者 –machine,显示系统硬件名称
6) -p 或者 –processor,显示系统处理器类型
7) -i 或者 –hardware-platform,显示系统硬件平台
8) –help,显示帮助信息
9) –version,显示 uname 命令版本

[排错] 解决 Linux 普通用户执行 ping 命令时报错 “ping: socket: Address family not supported by protocol” 或者 “Error: ping: socket: Operation not permitted”

解决方法一:修改 net.ipv4.ping_group_range 参数

1.1 确认文件功能没有参数

# getcap /usr/bin/ping

(补充:确认没有输出结果)

1.2 修改 net.ipv4.ping_group_range 参数

# sysctl net.ipv4.ping_group_range="0 2147483647"

解决方法二:设置文件功能参数

2.1 设置文件功能参数

# setcap cap_net_raw+eip /usr/bin/ping

2.2 确认文件功能参数已经设置

# getcap /usr/bin/ping
/usr/bin/ping = cap_net_raw+eip

[排错] 解决 Red Hat Satellite 发布新版本 Content Views 时报错 “Unable to find content with the ID “……””

报错代码

Unable to find content with the ID "......"

分析

当 Content Views 里包含有问题的软件源时,发布新版本 Content View 时就会报此类错误

解决方法

步骤一:根据报错时出现的 ID 显示出问题的软件名称

# su - postgres -c "psql candlepin -c \"select uuid, content_id, contentUrl, label, type, vendor from cp2_content where content_id = '9210'\""

(补充:这里以显示 ID 9210 的软件名称为例)

步骤二:给服务器系统打一个快照

(步骤略)

步骤三:强制停止出问题的任务

Monitor –> Tasks –> Paused –> “select the task which publish a new Content View version” –> Cancel

(注意:操作前需要确保左上角的组织是否正确)

或者:

步骤三:将出问题的软件源从要布新版本的 Content Views 里删除

Content –> Content Views –> “select the Content View which whill publish a new version” –> Yum Content –> Repository –> “select the repository which is error” –> Remove Repositories

步骤四:重新发布新版本的 Content Views

(步骤略)