diff options
Diffstat (limited to 'src/status.h')
-rw-r--r-- | src/status.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/status.h b/src/status.h new file mode 100644 index 0000000..05fe3d3 --- /dev/null +++ b/src/status.h @@ -0,0 +1,37 @@ +/** + * Cmon (c'mon) is a simple system resource monitor + * Copyright (C) 2022 Aaron Ball <nullspoon@oper.io> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ +#include <stdio.h> +#include <stdlib.h> + +struct status { + long memmax; + long memavg; + double loadmax; + double loadavg; + int nprocs; + unsigned long long nettx; + unsigned long long netrx; + long uptime; + long count; +}; + +struct status* status_init(); + +int status_write(struct status*); + +void status_free(struct status*); |