mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
multicpu1sec-c: implement the "fetch" cmd
This commit is contained in:
parent
9ac74f8d9b
commit
c86e4ab2fd
1 changed files with 9 additions and 1 deletions
|
@ -126,8 +126,16 @@ int acquire() {
|
|||
|
||||
int fetch() {
|
||||
printf("fetch()\n");
|
||||
FILE* cache_file = fopen(cache_filename, "r");
|
||||
|
||||
return 0;
|
||||
/* cat the cache_file to stdout */
|
||||
char buffer[1024];
|
||||
while (fgets(buffer, 1024, cache_file)) {
|
||||
printf("%s", buffer);
|
||||
}
|
||||
|
||||
ftruncate(fileno(cache_file), 0);
|
||||
fclose(cache_file);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue