-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 05 Aug 2003 11:06 pm, Timothy Parez wrote: > Hi, > > In .NET/Win2k I would use performance counters to > > a.. Check the bandwith of the network > b.. Check the bytes/sec upload > c.. Check the bytes/sec download > d.. Check the pakkets/sec upload > e.. Check the pakkets/sec download > I would like to do the same thing but have it working on linux. > I don't assume performance counters are available? > So how would I do this ? > > Thnx > Timothy
This may be tricky under Mono because of the way performance counters are provided by Windows. They are really just code that writes constantly to the registry as far as I could tell. I had a few goes using them with C++ and the ATL but in the end it was soooo much trouble I just got something to output an XML file every 10 seconds instead. Slack, I know, but it solved the problem :-) I guess instead of using the registry these could be moved to the /proc filesytem and the support libraries written to handle it like this. Windows required you to also put either a COM interface on your service or use something like sockets to comunicate with a DLL you supplied to pass the counters along. Very messy. I'm sure Mono and Linux can do something a lot nicer than that :-) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iQIVAwUBPzCxd/r1e7bH1pzBAQJwdg/+LZA0xIsfDMy/sIKKJEBBDhAKnwXkqctw n2q+eek+BYuObkCKh+UHdbszNOAJyX7ZCPx4z43cVSdvNc0M31lrdgQWPKOy7Rs3 vBLuHSyyN4C2YVzc/AtOoDhT9ho6baEJCfimfHJvudcIMwl78OnrZiwwS7qEr/Vh bmmOci6Zq2VP8KKOh3ZBVOQ4zmf8QSe8tvwy0yTE5ad0Gd2dUC18f5Pn32cI3f10 9/cJwPduaZV4/eOnbwa7pd4HTpcslSQBNOj0h0z1qMl2CafaODEyUr3X585k7/Uy 0cNH2jm0qgCRYlnwbaT9/fKL3sTXwoM3yzvRZegRb8kx1aN0mNOWrMUJ//cf9uw3 cZ6jd57zbzNq8fpTkH1fLqavtX6tLSZcSkdjLtllHAFGOKfcop9sZIOD36zwihpA Dyhy1nfiIieeo9c/+vAoa7hcEDzFxZ3r/WYQv7U9sod8G9lJcPtVHCDFxbW3PZfS Ial6cwgthR3+IUtvq2hZ7py55LWe4krIFXry7WsW8wTKtVpiSesBQK1P/Fec/0kn yTt7/5dqIeAUKabd8acGeaT3/E5jT3UsVcD9YtatMOChSLlgqLIsAkK9mOqAqFKQ UgVSKgkUyKDzYSbuc0o/AgXsp56yjEYCWBL8RDdYHeuK9PCaEiu+16O3LpNW42IT iSu0Gfa4BtQ= =Chqb -----END PGP SIGNATURE----- _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
