本文介绍了在C#visual studio中运行linux控制台命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我赢得了visual studio 2012和一个在linux上运行的服务器。



i必须从我的winform获得服务器的某些状态。

例如:在服务器上打开的Internet连接总数,打开的套接字数(tcp),每个套接字的连接数,内存使用情况以及所用服务器的磁盘空间。



在我的研究过程中,我找到了所有的linux命令来得到我想要的东西。但现在问题是我如何从我的winform运行这些linux命令并显示结果?



我尝试过:



hi everyone,i have winform visual studio 2012 and a server running in linux.

i have to get some status of the server from my winform.
for exemple: the total number of internet connections opened on server, the number of opened socket(tcp) opened, number of connections per socket, memory usage, and disk space of server used.

during my reseach, i found all the linux commands to get what i want. but now the problem is how i can from my winform run these linux commands and display the result ?

What I have tried:

free -m // to get all details about memory
df -h // disk space details
netstat -l |wc -l // total number of sockets opened
netstat  -at |wc -l //total number of opened tcp sockets opened
netstat -an |grep -w 80|wc -l //number of active connections on port 80

推荐答案


这篇关于在C#visual studio中运行linux控制台命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:21
查看更多