SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#2776 2012-08-22 18:37:02

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

celebrimbor wrote:

Seems I missed a party here!
@Sector11: Loved your chronographs as always, so did slipshot's. smile
and Sir Peachy, you really are a wizard! smile

Meanwhile, I managed one as well...still waiting for conky to have a wordwrap.. smile
abu0NUBd.jpg

Where did you get that background from?

Offline

Help fund CrunchBang, donate to the project!

#2777 2012-08-22 19:22:12

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

I can't believe how lost I am on this, but I am wanting to add some video driver info to my project.
I have tried a few methods from the web.. with no luck.

I have a NVidia card with the proprietary driver.
I just want to add..
Card name:
gpucore frequency:
gpucore usage:
gpucore temperature:

This is what I get for never adding this info before. lol

Offline

#2778 2012-08-22 19:29:12

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ Here is how I get that data, along with some other things you might want.
You can't get usage for most cards in linux though.

local gpu_freq = conky_parse("${nvidia gpufreq}")
local gpu_mem_freq = conky_parse("${nvidia memfreq}")
local sensors = io.popen("nvidia-smi -a")
local sensorData = sensors:read("*a")
sensors:close()
sensors = nil
sensorData = sensorData:gsub(",",""):gsub("\n",'","')
sensorData = assert(loadstring('return {"'..sensorData..'"}'))
sensorData = sensorData()
local gpu_model = (sensorData[9]:sub(35,52)):gsub("GeForce ","")
local gpu_mem_used = sensorData[42]:sub(35,43):gsub(" MB","")
local gpu_mem_total = sensorData[41]:sub(35,43):gsub(" MB","")
local gpu_mem_percent = string.format("%.2f", (tonumber(gpu_mem_used)/tonumber(gpu_mem_total))*100)
local gpu_temp = sensorData[83]:sub(35,40):gsub(" ","°")
local gpuFan_speed = sensorData[37]:sub(35,40):gsub(" ","")

you can only get the card name from nvidia-smi.
Install it with

sudo apt-get install nvidia-smi

What version of the nividia driver are you using?
If it is the one in stable or testing I need to change that a little bit because the format of "nvidia-smi -a" is different.

Last edited by arclance (2012-08-22 19:37:28)

Offline

#2779 2012-08-22 19:31:40

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

falldown wrote:

I can't believe how lost I am on this, but I am wanting to add some video driver info to my project.
I have tried a few methods from the web.. with no luck.

I have a NVidia card with the proprietary driver.
I just want to add..
Card name:
gpucore frequency:
gpucore usage:
gpucore temperature:

This is what I get for never adding this info before. lol

Easy:

nvidia
     threshold

     Nvidia graficcard support for the XNVCtrl library. Each option can be shortened to the least significant part. Temperatures are printed as float, all other values as integer.

    threshold - The thresholdtemperature at which the gpu slows down
    temp - Gives the gpu current temperature
    ambient - Gives current air temperature near GPU case
    gpufreq - Gives the current gpu frequency
    memfreq - Gives the current mem frequency
    imagequality - Which imagequality should be chosen by OpenGL applications

${nvidia temp}° ${nvidia gpufreq}MHz ${nvidia memFreq}MHz

usage is a no go sad

Online

#2780 2012-08-22 19:33:46

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ Yes usage is only supported for really high end cards through nvidia-smi.

Supported products: 

    Tesla:  S1070, S2050, C1060, C2050/70/75, M2050/70/75/90, X2070/90, Gemini
    Quadro: 4000, 5000, 6000, 7000, M2070-Q, 600, 2000, 3000M and 410
    Other:  All other products are unsupported

I missed that part of falldowns post.

Offline

#2781 2012-08-22 19:40:36

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

arclance wrote:
sudo apt-get install nvidia-smi

The NVIDIA System Management Interface "nvidia-smi" program provides
system state and diagnostic information for the NVIDIA Tesla Visual
Computing Systems.

maybe in my next life.

Online

#2782 2012-08-22 19:46:36

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ Yea I wish I could get one, most of them cost more than my whole computer.
You can get some useful info out of nvidia-smi with most cards, just not very much.

card model
gpu temp
gpu fan speed
gpu memory total
gpu memory used
gpu memory free

I can calculate the percent memory used from that.

The only other thing I want to know is usage but it does not work.

This is what "nvidia-smi -a" outputs for me.

==============NVSMI LOG==============

Timestamp                       : Wed Aug 22 15:35:01 2012
Driver Version                  : 304.37

Attached GPUs                   : 1
GPU 0000:01:00.0
    Product Name                : GeForce GTX 560 Ti
    Display Mode                : N/A
    Persistence Mode            : Disabled
    Driver Model
        Current                 : N/A
        Pending                 : N/A
    Serial Number               : N/A
    GPU UUID                    : GPU-dc4dbd57-4b73-915c-0b47-ec60e30ab98c
    VBIOS Version               : 70.24.21.00.00
    Inforom Version
        Image Version           : N/A
        OEM Object              : N/A
        ECC Object              : N/A
        Power Management Object : N/A
    PCI
        Bus                     : 0x01
        Device                  : 0x00
        Domain                  : 0x0000
        Device Id               : 0x120010DE
        Bus Id                  : 0000:01:00.0
        Sub System Id           : 0x23841462
        GPU Link Info
            PCIe Generation
                Max             : N/A
                Current         : N/A
            Link Width
                Max             : N/A
                Current         : N/A
    Fan Speed                   : 44 %
    Performance State           : N/A
    Clocks Throttle Reasons     : N/A
    Memory Usage
        Total                   : 2047 MB
        Used                    : 308 MB
        Free                    : 1739 MB
    Compute Mode                : Default
    Utilization
        Gpu                     : N/A
        Memory                  : N/A
    Ecc Mode
        Current                 : N/A
        Pending                 : N/A
    ECC Errors
        Volatile
            Single Bit            
                Device Memory   : N/A
                Register File   : N/A
                L1 Cache        : N/A
                L2 Cache        : N/A
                Texture Memory  : N/A
                Total           : N/A
            Double Bit            
                Device Memory   : N/A
                Register File   : N/A
                L1 Cache        : N/A
                L2 Cache        : N/A
                Texture Memory  : N/A
                Total           : N/A
        Aggregate
            Single Bit            
                Device Memory   : N/A
                Register File   : N/A
                L1 Cache        : N/A
                L2 Cache        : N/A
                Texture Memory  : N/A
                Total           : N/A
            Double Bit            
                Device Memory   : N/A
                Register File   : N/A
                L1 Cache        : N/A
                L2 Cache        : N/A
                Texture Memory  : N/A
                Total           : N/A
    Temperature
        Gpu                     : 45 C
    Power Readings
        Power Management        : N/A
        Power Draw              : N/A
        Power Limit             : N/A
        Default Power Limit     : N/A
        Min Power Limit         : N/A
        Max Power Limit         : N/A
    Clocks
        Graphics                : N/A
        SM                      : N/A
        Memory                  : N/A
    Applications Clocks
        Graphics                : N/A
        Memory                  : N/A
    Max Clocks
        Graphics                : N/A
        SM                      : N/A
        Memory                  : N/A
    Compute Processes           : N/A

Look at all those "N/A"s.

Offline

#2783 2012-08-22 19:52:31

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

Sector11 wrote:
${nvidia temp}° ${nvidia gpufreq}MHz ${nvidia memFreq}MHz

This prints out..

{nvidia}

for every object. yikes

I have an older GeForce 8400M GT  I believe.

Last edited by falldown (2012-08-22 19:55:13)

Offline

#2784 2012-08-22 19:55:15

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ Do you have "libxnvctrl0" installed, the ${nvidia} option depends on it.
It worked with my 8600 GT before I switched it out for a different card I had that did not run as hot.

Offline

#2785 2012-08-22 19:56:04

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

arclance wrote:

^ Yea I wish I could get one, most of them cost more than my whole computer.
You can get some useful info out of nvidia-smi with most cards, just not very much.

card model
gpu temp
gpu fan speed
gpu memory total
gpu memory used
gpu memory free

I can calculate the percent memory used from that.

The only other thing I want to know is usage but it does not work.

This is what "nvidia-smi -a" outputs for me.

==============NVSMI LOG==============

Timestamp                       : Wed Aug 22 15:35:01 2012
Driver Version                  : 304.37

Attached GPUs                   : 1
GPU 0000:01:00.0
    Product Name                : GeForce GTX 560 Ti
    GPU UUID                    : GPU-dc4dbd57-4b73-915c-0b47-ec60e30ab98c
    VBIOS Version               : 70.24.21.00.00

    PCI
        Bus                     : 0x01
        Device                  : 0x00
        Domain                  : 0x0000
        Device Id               : 0x120010DE
        Bus Id                  : 0000:01:00.0
        Sub System Id           : 0x23841462

    Fan Speed                   : 44 %

    Memory Usage
        Total                   : 2047 MB
        Used                    : 308 MB
        Free                    : 1739 MB

    Temperature
        Gpu                     : 45 C

Look at all those "N/A"s.

{snipped all the N/A's}

${nvidia temp}° ${nvidia gpufreq}MHz ${nvidia memFreq}MHz

looks better/easier all the time.  big_smile

Last edited by Sector11 (2012-08-22 19:56:41)

Online

#2786 2012-08-22 19:58:08

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ Temperature is the only value that overlaps between ${nvidia} and nvidia-smi.
I just get it from nvidia-smi since I want the other data it has as well.

Offline

#2787 2012-08-22 20:07:34

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

arclance wrote:

^ Do you have "libxnvctrl0" installed, the ${nvidia} option depends on it.
It worked with my 8600 GT before I switched it out for a different card I had that did not run as hot.

Any other libs needed?
still no luck.

unknown variable nvidia

Last edited by falldown (2012-08-22 20:10:33)

Offline

#2788 2012-08-22 20:11:54

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

I should be able to grab this info.
It's all displayed in nvidia-settings.

I can't do my HoloDeck without it.. big_smile

Last edited by falldown (2012-08-22 20:13:34)

Offline

#2789 2012-08-22 20:12:35

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

What conky package do you have installed?
I think you need conky-all to use the nvidia variable.

Offline

#2790 2012-08-22 20:14:36

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

falldown wrote:

I should be able to grab this info.
It's all displayed in nvidia-settings.

I can't do my HoloDeck without it.. big_smile

Nvidia ${execi 30 nvclock -i | grep 'Card:' | cut -c16-29}${alignr} Temp: ${execi 30 nvidia-settings -q gpucoretemp |grep '):' | awk '{print $4}'}C
Temp: ${execi 30 nvidia-settings -q gpucoretemp |grep '):' | awk '{print $4}'}C

Terminal:

nvidia-settings -q all>nvidia-settings.txt

Attribute 'GPUCoreTemp' (sector11:0.0): 43.
    'GPUCoreTemp' is an integer attribute.
    'GPUCoreTemp' is a read-only attribute.
    'GPUCoreTemp' can use the following target types: X Screen, GPU.

Then read it it in style cuz it's HUGE!!!!!!!!!!!!!!!

From an old conky: 2007

GPU:
Clock: ${execi 3600 nvidia-settings -q GPU3DClockFreqs|grep A|cut -c41-43}MHz
Temp: ${execi 1 nvidia-settings -q gpucoretemp |grep ')'|cut -c37-38}°C
GL: ${exec nvidia-settings -g|grep "OpenGL version string:"|cut -c26-0}

Hope some of this helps.

Last edited by Sector11 (2012-08-22 20:20:49)

Online

#2791 2012-08-22 20:17:12

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

arclance wrote:

What conky package do you have installed?
I think you need conky-all to use the nvidia variable.

Jeez.. I could have sworn that I had conky-all.
<--dufus!!

All is well in the world again.
Gracias!!

Offline

#2792 2012-08-22 20:20:43

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

Peachy must be writing a new script.. he has been quiet today. big_smile

Offline

#2793 2012-08-22 20:23:42

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

falldown wrote:
arclance wrote:

What conky package do you have installed?
I think you need conky-all to use the nvidia variable.

Jeez.. I could have sworn that I had conky-all.
<--dufus!!

All is well in the world again.
Gracias!!

lol lol lol
I'm not alone!!!
lol lol lol

Soooooooooooooooooooooo ..........

${nvidia temp}° ${nvidia gpufreq}MHz ${nvidia memFreq}MHz

does it work?

Online

#2794 2012-08-22 20:24:52

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 12,797
Website

Re: The New Monster Conky Thread

falldown wrote:

Peachy must be writing a new script.. he has been quiet today. big_smile

Yea, when he gets creative .... he's like a ghost!  big_smile

Online

#2795 2012-08-22 20:27:13

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

Sector11 wrote:

lol lol lol
I'm not alone!!!
lol lol lol

Soooooooooooooooooooooo ..........

${nvidia temp}° ${nvidia gpufreq}MHz ${nvidia memFreq}MHz

does it work?

It does indeed!
Thank you. big_smile

Offline

#2796 2012-08-22 20:32:36

vlahonick
Banned
From: Universe
Registered: 2011-12-03
Posts: 347

Re: The New Monster Conky Thread

@Sector11

thanks will try it and i am certain it works smile


"I do not fear computers. I fear the lack of them."
Isaac Asimov

Offline

#2797 2012-08-22 20:59:02

celebrimbor
#! Member
From: /India/Gujarat
Registered: 2012-04-07
Posts: 57

Re: The New Monster Conky Thread

@arclance: Many thanks for the script but pardon my ignorance, I don't know how to call that script in conky. sad
I use

${rss http://news.google.com/?output=rss 3 item_titles 7 }

to fetch rss feeds in my conky.
and for the wallpaper, I had just googled for ring of power and found it here and then added some glow and applied lomo effect... smile

@Sector11 wrote
Thanks.    party?  What party?  I didn't get an invite?

Liar liar! tongue
And thanks for suggesting fold option! smile I tried

${execi 30 ${rss http://news.google.com/?output=rss 3 item_titles 7 } | fold -w50}

but I receive

sh: 1: Bad substitution

sad


The real problem is not whether machines think but whether men do.

Offline

#2798 2012-08-22 21:04:11

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

^ I like your version of that background better could you post a link to it.

I can make a script that handles that for you give me a few minutes to write it.

You can't use fold like that because conky does not send the result of

${rss http://news.google.com/?output=rss 3 item_titles 7 }

to bash so you are actually running.

${rss http://news.google.com/?output=rss 3 item_titles 7 } | fold -w50

with bash (the same as in a terminal).
You get that error because you have special characters and lots of spaces in that line.

Last edited by arclance (2012-08-22 21:04:23)

Offline

#2799 2012-08-22 21:24:36

celebrimbor
#! Member
From: /India/Gujarat
Registered: 2012-04-07
Posts: 57

Re: The New Monster Conky Thread

Ok.. and thanks again for the advice! smile
And here's the link to my wallpaper...here's another one in blue.. smile


The real problem is not whether machines think but whether men do.

Offline

Help fund CrunchBang, donate to the project!

#2800 2012-08-22 21:29:36

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 920

Re: The New Monster Conky Thread

Okay here is a function you can call from .conkyrc to wordwrap rss data.

--# wordwrap by arclance | 2012-08-22
--# wraps a line "longLine" to the charachter length defined by "wrapLength"
--# returns a list containg each wraped line in order
function wordwrap(longLine, wrapLength)
    local wrapedLines = {}
    local lineStart = 1
    local lineEnd = 1
    if #longLine <= wrapLength then --# return list containing input line if it is shorter than the wrap length
        return {longLine}
    end --# if #longLine <= wrapLength then
    for i = 1, math.ceil(#longLine/wrapLength) do
        if i ~= 1 then
            lineStart = lineStart + wrapLength
            if lineStart >= #longLine then
                break --# no more to wrap break out of loop
            end --# if lineStart >= #longLine then
        end --# if i ~= 1 then
        lineEnd = lineEnd + wrapLength
        if lineEnd >= #longLine then --# 
            wrapedLines[i] = longLine:sub(lineStart,#longLine)
            break --# done wrapping break out of loop
        else 
            wrapedLines[i] = longLine:sub(lineStart,lineEnd)
        end --# if lineEnd >= #longLine then
    end --# for i = 1, (math.mod(#longLine/wrapLength) + 1)
    return wrapedLines
end --# function wordwrap(longLine, wrapLength)

function conky_rss_wrap(uri, interval_in_minutes, action, wrapLength, num_par, spaces_in_front) --# num_par and spaces_in_front are optional
    local rssCommand = "${rss "..uri.." "..interval_in_minutes
    if num_par ~= nil then
        rssCommand = rssCommand.." "..num_par
    end --# if num_par ~= nil then
    if spaces_in_front ~= nil then
        rssCommand = rssCommand.." "..spaces_in_front
    end --# if spaces_in_front ~= nil then
    local rssText = conky_parse((rssCommand.."}"))
    local wrapedText = wordwrap(rssText, tonumber(wrapLength))
    local output = ""
    for i = 1, #wrapedText do
        if i ~= 1 then
            output = output.."/n"..wrapedText[i].."\n"
        else
            output = wrapedText[i]
        end --# if i ~= 1 then
    end --# for i = 1, #wrapedText do
    return output
end --# function rss_wrap()

I don't have ${rss} compiled in my conky so I could not test if my call to that works.

Here is how to use the script.
1. Save the lua code in a text file named "wraprss.lua"
2. Add this line to your .conky rcc above the TEXT line.

lua_load <path to>/wraprss.lua

replacing <path to> with the path to the wraprss.lua file you saved earlier.
3. Add this line to your text section where you want the rss output.

${lua_parse rss_wrap http://news.google.com/?output=rss 3 item_titles 50 7}

I might not have the lua_parse line right (since I can't test it here) let me know if it give you any problems)

Last edited by arclance (2012-08-22 21:35:52)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo