logical disk monitor completed.

This commit is contained in:
Zhen Tang 2013-07-07 19:15:55 +08:00
parent acfa2ea624
commit 0ff245fc2c
2 changed files with 87 additions and 45 deletions

View File

@ -47,133 +47,175 @@ JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDi
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getFreeMegabytes
(JNIEnv *, jobject, jstring)
(JNIEnv * environment, jobject object, jstring instanceName)
{
return -1;
return LogicalDisk::GetFreeMegabytes(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str());
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getCurrentDiskQueueLength
(JNIEnv *, jobject, jstring)
(JNIEnv * environment, jobject object, jstring instanceName)
{
return -1;
return LogicalDisk::GetCurrentDiskQueueLength(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str());
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskTimePercent
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskTimePercent(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskQueueLength
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskQueueLength(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskReadTimePercent
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskReadTimePercent(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskReadQueueLength
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskReadQueueLength(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskWriteTimePercent
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskWriteTimePercent(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskWriteQueueLength
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskWriteQueueLength(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskTransferTimeInSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskTransferTimeInSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskReadTimeInSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskReadTimeInSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskWriteTimeInSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskWriteTimeInSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskTransfersPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskTransfersPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskReadsPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskReadsPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskWritesPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskWritesPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskBytesPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskBytesPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskReadBytesPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskReadBytesPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getDiskWriteBytesPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetDiskWriteBytesPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskBytesPerTransfer
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskBytesPerTransfer(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskBytesPerRead
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskBytesPerRead(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getAverageDiskBytesPerWrite
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetAverageDiskBytesPerWrite(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getIdleTimePercent
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetIdleTimePercent(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}
JNIEXPORT jdouble JNICALL Java_org_bench4q_monitor_performance_windows_LogicalDiskMonitor_getSplitIOPerSecond
(JNIEnv *, jobject, jstring, jint)
(JNIEnv * environment, jobject object, jstring instanceName, jint idleTime)
{
return -1;
return LogicalDisk::GetSplitIOPerSecond(
Common::StringToWideString(string(environment->GetStringUTFChars(instanceName,false))).c_str()
,idleTime);
}

View File

@ -57,7 +57,7 @@ public class Main {
for (String elem : counterList) {
System.out.println(elem);
}
System.out.println(logicalDiskMonitor.getFreeSpacePercent("_Total"));
System.out.println(logicalDiskMonitor.getFreeMegabytes("_Total"));
MonitorServer monitorServer = new MonitorServer(5555);
monitorServer.start();
}