Conky interface

江枫思渺然 提交于 2019-12-11 07:23:13

问题


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

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)?


回答1:


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 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).

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



来源:https://stackoverflow.com/questions/15691761/conky-interface

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!