获取服务器信息 [英] Get server information

查看:72
本文介绍了获取服务器信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我们有几台Windows服务器,我想使用c#或Python脚本获取Windows服务器的信息。我想要获得的信息是磁盘空间(我们在Windows资源管理器中看到的图像)和服务器服务的错误日志。如果有人可以给我任何线索,那就太好了。我们正在寻找一个可以提供这些信息的脚本。我想在本地计算机上以文本文件格式和磁盘空间将错误日志保存为.jpeg图像。

请让我知道哪种语言最适合这种Python脚本或c#。



谢谢,

Gb1114

Hi,

We have a couple of windows servers and I want to get the information of the windows servers using either c# or Python script. The information I want to get is the disk space (image like the one we see in windows explorer) and the error logs of the services of the server. If any one can give me any leads on this, it would be great. We are looking to develop a script which can give us this information. I want to save the error logs in a text file format and the disk space as a .jpeg image, on the local machine.
Please also let me know which language would be best for this Python scripting or c#.

Thanks,
Gb1114

推荐答案

你好



如何计算可用磁盘空间?



系统信息类



读取事件日志条目



你可以创建一个简单的控制台应用程序并将其安装在服务器上或

创建 Windows服务并将日志保存在特定的文件夹或路径中。



[更新:]

要获得磁盘信息的可视化图表,请查看:磁盘大小浏览器
或:系统监视器的实施
Hello

how to calculate free disk space?

SystemInformation Class

Reading Event Log Entries

And you can create a Simple Console Application and Install it on the servers or
Create Windows Service and save the logs in a specific folder or path.

[Updated:]
For having a visual chart of disk information, look at this: Disk Size Explorer
Or: An Implementation of System Monitor


这篇关于获取服务器信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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