Conky的接口 [英] Conky interface

查看:135
本文介绍了Conky的接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调查的方式访问有关Linux服务器远程统计,那种信息 Conky的会显示。

I am investigating a way to access remotely statistics about a linux server, the kind of information that conky would display.

是否与Conky的连接并获取它显示的统计数据的方法吗?如果没有,你可以推荐一个很好的方式来获得这种统计? (C / CPP lib下,或者蟒蛇)?

Is there a way to interface with conky and obtain the statistics it displays? If not, can you recommend a good way to obtain this kind of statistics? (C/Cpp lib, or maybe python)?

推荐答案

您可以有到stdout Conky的写(在 out_to_console 选项)和重定向到一个文件。当然,你仍旧需要获得该文件的外部访问。

You could have conky write to stdout (the out_to_console option) and redirect that to a file. Of course you'd still need to gain external access to the file.

Conky的获取大部分来自其文件数据的的sysfs PROCFS 。你可以写,从那里收集你所需要的信息,并把它放在网页上,你可以远程读取程序(假设服务器运行一个Web服务器)。

Conky gets most of its data from the files in sysfs and procfs. You could write a program that gathers the information you need from there and puts it on a webpage that you can read remotely (assuming the server runs a webserver).

编辑:根据的sysfs 文件的文件格式是非常简单的;有每个文件只有一个浮点值(文字)。

According to this the file format in sysfs files is really simple; there is only one floating point value (as text) per file.

这篇关于Conky的接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆