解决Nsight Systems错误

本文介绍了如何在Linux系统中调整NsightSystems使用的Perf功能的Paranoid级别,以收集CPU和线程调度数据。同时,针对NvidiaGPU的限制,提供了在modprobe.d中修改配置以允许管理员用户进行性能分析的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、错误1

解决办法

In order to collect CPU samples, Nsight Systems uses the linux perf functionality under the covers. This functionality is not available when Paranoid is set >2.
(from the documentation)
Requirements for x86_64, Power, and ARM SBSA Targets on Linux 31
Use of Linux Perf : To collect thread scheduling data and IP (instruction pointer) samples, the Perf paranoid level on the target system must be 2 or less. Use the following command to check:

cat /proc/sys/kernel/perf_event_paranoid

If the output is >2, then do the following to temporarily adjust the paranoid level (note that this has to be done after each reboot):

sudo sh -c 'echo 2 >/proc/sys/kernel/perf_event_paranoid'

To make the change permanent, use the following command:

sudo sh -c ‘echo kernel.perf_event_paranoid=2 > /etc/sysctl.d/local.conf’

如果无法修改,则直接将文件数值修改为2(原始值为4):

sudo nano /proc/sys/kernel/perf_event_paranoid

永久解决:

# 1. 创建文件
touch /etc/sysctl.d/local.conf
# 2. 编辑文件
sudo nano /etc/sysctl.d/local.conf
# 在local.conf添加一下命令:kernel.perf_event_paranoid = 2
# 3.添加完成后命令行执行:
sudo sysctl -p   #  加载/启用配置文件

问题2

解决办法

cd /etc/modprobe.d
sudo touch allowgpu.conf
# 文件内添加
options nvidia NVreg_RestrictProfilingToAdminUsers=0

# 重启
sudo reboot
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值