Last active
August 29, 2015 14:20
-
-
Save tian2992/6cc24014c7ac8b522360 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Proyecto 1 – Sistemas Operativos 2 - 2015S1 | |
* Facultad de Ingenieria, Universidad de San Carlos De Guatemala | |
*/ | |
enum StatType{ | |
CPU_ACTIVE, // Porcentaje CPU en uso. | |
CPU_SYSTEM, // Porcentaje CPU operaciones de sistema. | |
CPU_IOWAIT, // Porcentaje CPU en espera IO. | |
CPU_USERSPACE, // Porcentaje CPU en uso por aplicaciones de usuario. | |
MEM_ACTIVE, // Memoria activa, en MBs. | |
MEM_PASSIVE, // Memoria inactiva, en MBs. | |
MEM_AVAILABLE, // Memoria disponible. | |
MEM_FREE // Memoria libre. | |
} | |
struct StatStruct { | |
1: StatType type, | |
2: double value, | |
3: i64 timestamp, // UNIX epoch en entero de 64 bit. | |
4: optional string comment | |
} | |
service StatService { | |
oneway void sendInfo(1: StatStruct stat), // Enviar valores individuales. | |
// Enviar valores de forma agrupada. | |
oneway void sendInfoBatch(1: map<StatType, double> statBatch, 2: i64 timestamp) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment