Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 4-Aug-16 2:40am
v2
Comments
Richard MacCutchan 4-Aug-16 7:22am    
You need to use remote shell or telnet to login to the linux system and run them.

1 solution

 
Share this answer
 
Comments
Armel_Djient 4-Aug-16 13:19pm    
thanks for ur reply. i found an article talking about Mono and it's seems to be close to what i want
praanjal J 10-Feb-17 1:34am    
I have the same query I need to run just df -h command and get the output stored as a string please help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900