Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Build artifacts
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
check_snmp_*
*.o
*.so
*.a

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# OS files
.DS_Store
Thumbs.db
14 changes: 7 additions & 7 deletions src/check_snmp_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ int checkLoad(netsnmp_session *ss)

if (style == WINDOWS) {
if (vars->type == ASN_INTEGER) {
/* Allocation de 10 en 10 */
/* Allocate in chunks of 10 */
if (cpunbr == 0) {
load = malloc(10 * sizeof(int));
} else if ((cpunbr % 10) == 0) {
Expand All @@ -376,20 +376,20 @@ int checkLoad(netsnmp_session *ss)
}
}

/* Test si ce n'est pas une exception */
/* Test if it's not an exception */

if ((vars->type != SNMP_ENDOFMIBVIEW) &&
(vars->type != SNMP_NOSUCHOBJECT) && (vars->type != SNMP_NOSUCHINSTANCE)) {

/* Et l'on avance dans la MIB :) */
/* And we advance in the MIB :) */

memmove((char *)name, (char *)vars->name, vars->name_length * sizeof(oid));
name_length = vars->name_length;
}

else
/*
* une exception , donc stop
* an exception, so stop
*/
running = 0;
}
Expand All @@ -414,11 +414,11 @@ int checkLoad(netsnmp_session *ss)
}

/*
* check_and_print : utilise la structure process, cherche l'occupation memoire
* et affiche
* check_and_print : uses the process structure, searches for memory occupation
* and displays
*
* arguments : *storage : structure t_storage
* storage_length : taille de la structure (nb d'elements)
* storage_length : size of the structure (number of elements)
*/

int check_and_print(int cpunbr)
Expand Down