Hiya,
I'm trying to read some values from my AMD GPU via aticonfig within a script started via a crontab.
Its running under the superuser's cron (i.e. "sudo crontab -e)
Code:
* * * * * /home/ian/monitor.sh
(I've also tried :
Code:
* * * * * DISPLAY=:0 /home/ian/monitor.sh
The file its running is a exec, owned by root :
Code:
4 -rwxrwxr-x 1 root root 2645 Mar 1 21:22 monitor.sh
And looks like this :
Code:
#!/bin/bash
# monitor.sh
temp=`DISPLAY=:0 /usr/bin/aticonfig --odgt`
echo "$temp" >> /tmp/temp
Every minute I get the following in the output file :
Code:
ERROR - X needs to be running to perform AMD Overdrive(TM) commands
But when I manually run the script, it works fine.
i.e.. running "sudo ./monitor.sh" appends this to the output file
Code:
Default Adapter - AMD Radeon R9 290 Series
Sensor 0: Temperature - 80.00 C
I can't see/find what I'm missing, can anyone help me on this?
Many thanks in advanced.
Bookmarks