NWN server CPU monitor
#1
Posté 23 février 2011 - 09:46
I recently made a big cleanup and I would like to see exact results in long term run. Any tips?
#2
Posté 23 février 2011 - 10:19
http://nwn.virusman....plugins/system/
EDIT: Bwhaha Baaelos and I had the same idea apparently.
Modifié par Calvinthesneak, 23 février 2011 - 10:26 .
#3
Posté 23 février 2011 - 10:20
Alternatively, you can use windows, to set cpu monitor on your application etc.
thing to note though, is that CPU Monitors are not always accurate.
the way the CPU Monitor class from the System.Diagnostics framework/namespace of C# works, is that it measures a value for the cpu NOW, and then waits 1 second or so, and then measures it again, and its only when it measures the cpu usage over a duration, that it returns it.
Some irrelevent information, but anyhow...
#4
Posté 23 février 2011 - 10:36
/* Get a listing of the files in sDir, separated by "\\n". */
string DirList (string sDir);
/* Get the entire contents of the file sFile. */
string FileReadAll (string sFile);
/* Copy the file sFrom to sTo. Returns >0 on success. */
int FileCopy (string sFrom, string sTo);
/* Delete the file sFile. Returns >0 on success. */
int FileDelete (string sFile);
/* Link the file sFrom to sTo. Returns >0 on success. */
int FileLink (string sFrom, string sTo);
/* Rename the file sFrom to sTo. Returns >0 on success. */
int FileRename (string sFrom, string sTo);
/* Symlink the file sFrom to sTo. Returns >0 on success. */
int FileSymlink (string sFrom, string sTo);
/* Get the CPU usage values for the current process. */
struct CPUUsage GetProcessCPUUsage ();
/* Get an estimate of memory used by the current process in bytes. */
int GetProcessMemoryUsage ();
/* Get the current system time in seconds since the epoch. */
int GetSystemTime ();
/* Get the current process TMI limit. The nwserver default is 131071. */
int GetTMILimit ();
/* Set the current process TMI limit, with a minimum of 16k and a maximum of 8M. */
void SetTMILimit (int nLimit);
/* Shut down the current process. If nForce is specified, the process will be
* force-killed in that number of seconds, in case it hangs during shutdown. */
void ShutdownServer (int nForce=0);
#5
Posté 23 février 2011 - 10:47
Im on windows. Well not accurate, but is there better way?Baaleos wrote...
I think there is a nwnx plugin called nwnx_system or something or other, that can measure cpu usage.
Alternatively, you can use windows, to set cpu monitor on your application etc.
thing to note though, is that CPU Monitors are not always accurate
#6
Posté 23 février 2011 - 01:02
But note - Monitoring cpu usage, consumes a little cpu usage.
Its like Running software through a debugger, watching the code, affects the code.





Retour en haut







