[Mono-list] Getting CPU, Disk, RAM information using P/Invoke or other technique in C# using Mono with Linux

Chris Howie cdhowie at gmail.com
Thu Apr 3 13:20:07 EDT 2008

On Sun, Mar 30, 2008 at 8:05 AM, Petit Eric <surfzoid at gmail.com> wrote:
>  Damed, mono list email is never in first position here is my reponse
>  where only  JP Trosclaire had :
>  "
>  In the "bigest lines"
>  System.threading.thread.process.start("lshw>~/tmp/info.txt") or
>  "lshw",">~/tmp/info.txt" ;
>  String AllInfo = System.IO.ReadAllText("lshw>~/tmp/info.txt")
>  "

You'd be better served creating a Process object and opening its
standard output and reading directly from that.  No temporary files,
more efficient, etc.

Chris Howie

More information about the Mono-list mailing list