-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some posible new features? #21
Comments
- Is possible to set this program like a daemon ? and get the data with a sysfile or netservice.
Yes: run it in the background using the -d (dump) option, then process
the output as needed. Or for CGI use, dump with a limit of 1, so that
it exits after one line. Simple scripts for either.
For example, you could pass it to a graphing program that refreshes a
PNG image every second. Then your html page would also have
instructions to refresh once per second, and you'd have a web page
showing a realtime graph.
- Is possible to this program get the clock of the card? like aticonfig & amdoverdrive.
No, that info is not exposed via any channels it can access. I tried to
get such an interface back in 2012, but the radeon kernel devs weren't
interested.
|
thanks again, I will use your program to monitor within a Conky panel. |
Is posible with --dump option to write the file without adding more lines? |
Hello @DFOXpro I suggest you to take a look for inspiration and make a new one in order to have the latest advancement of the radeontop original repository (I do not maintain mine). I'll not work on this soon as I don't have radeon card any more (the motherboard were mine was soldered is dead). Maybe @clbr would be interested to modify his own code to add this possibility to his dump command as it seems I'm not the only one that was interested in? Hope it helps. |
A --rewind argument would be ok to add, though this is the first I hear #!/bin/sh |
The idea is to benefit from your daemon feature but not having a file unnecessary growing as the goal is to have it running at startup (until shutdown) but only to have the last information. Your daemon (at least what I remember from when I looked 2 years ago) is keeping all the data in the file, this is good to have if you want to see how this data have evolved in time, but not that much if you only wants to access the last data (in a memory point of view. I put the file in tmpfs to avoid disk writes, but having a file that don't stop growing is similar to a memory leak in the process). The main modification I made was to change Of course, there may be a more elegant way to pass the wanted data from radeontop to Conky, writing them in a file is still some kind of overhead. The thing is that reading data from a file is a basic Conky feature and do not need root access. |
Yes, you can do that with a simple script like the one I pasted above?
sudo radeontop -d- | myscript.sh
With the pipe, there is no unbound memory usage. Each line is passed to
the script as a unit, which then does whatever is needed with it.
I don't use conky, but I'm willing to add a conky example under a
contrib/ dir or similar, if a good one is sent to me.
|
I remember now why I didn't use something like you suggest, that was to avoid giving root rights to Conky as some peoples says it is not recommended (maybe it would worth to know how far theses recommendations are usefull?) However, if this permission issue is not considered as a thread, piping the commends would indeed be a simple solution. |
Why not just create a simple shell script wrapper (or use
or so. Teh unix way, and all that. |
For permissions, I would recommend setting radeontop setuid root (chown
root.root radeontop; chmod u+s radeontop), conky would not run as root
then.
|
May be a better workaround, @DFOXpro can you test it and report if the result satisfy you? |
Any plans for SIGWINCH support? (run-time terminal resizing) |
On Thu, 14 Jan 2016 15:23:33 -0800
Patches welcome. |
I am currently using this as a daemon. I made a script like the one you posted. Problem is that 2 new lines are created every time it dumps new information, so i get 1 empty line and nothing gets written to the file. Of course you go around this with just an 'if' but i think it would be preferable to not have any empty lines between dumps |
I don't get any empty line? If you look at the output, "radeontop -d -", there is exactly one line per. |
Oh, scratch that, I see it now. Fixed. |
Thank you for this program, this become the solution for amdoverdrive-data in radeon opensource ;)
The text was updated successfully, but these errors were encountered: