简体   繁体   中英

Google cloud platform: permission denied when using gpu monitoring

I found no question regarding this issue. I'm trying to add a gpu monitoring to my vm instance, following the instructions here: https://cloud.google.com/compute/docs/gpus/monitor-gpus . Yet when I tried to enable the gpu agent, I got this error: /lib/systemd/system/gpu_utilization_agent.service: Permission denied.
Anyone has encountered this issue before or know how to resolve? What is really denying my access to what?

It seems that you run these steps in cloud shell , it needs to run these steps on your VM s.

You can try following this article created by Medium on "Enabling custom GPU metrics in Stackdriver for Google Cloud Platform" which might be a good place to look over for more details and Adding or removing GPUs document .

I got same problem and had solved.

You may check the permission of /lib/systemd/system/

$ ls -ld /lib/systemd/system/
drwxr-xr-x 22 root root 36864 Nov  6 09:49 /lib/systemd/system/

So you need write permission temporarily. Because you are going to write /lib/systemd/system/gpu_utilization_agent.service

sudo chmod 777 /lib/systemd/system

After writing gpu_utilization_agent.service, you can change back the permission.

sudo chmod 755 /lib/systemd/system

And you may need sudo to run systemctl.

sudo systemctl daemon-reload
sudo systemctl --no-reload --now enable /lib/systemd/system/gpu_utilization_agent.service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM