In case you need to know this is monobjc http://www.monobjc.net/ (I'm specifically referencing that part that allows you to run on a remote mac)
As I said I am coding in C# in Visual Studio and I am using monobjc to run on the hosting mac computer, this was quite a chore to set up but it all works (save for direct debugging). I have tried using the PerfomanceCounter NextValue() Method to get the percentage of processor use but I am still getting 0% (even tried it in mono and used the thread.sleep method and nothing)
So this might be a tough one. I've written a timer event that goes off every three minutes and logs some usage stats into a log file. As of right now it is logging the total RAM taken up by the application so the logic for getting to the logging works correctly. Here is the code that does the logging part for a starting point.
string strUsage;
Process procST = Process.GetCurrentProcess();
double dlRamUsage = procST.WorkingSet64 * (9.53674316 * Math.Pow(10, -7));
strUsage ="Ram Usage: " + dlRamUsage + " MB"
Log(strUsage, asInfo); //Writes to the log file with an INFO tag
Now my question is, what alternate ways are there besides NextValue()? Can I get NextValue to work? What can I use to get the cpu usage (as a percentage) of my app? Is there something special about coding from a vm onto a mac that I need to be aware of?
Thanks!