X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpu.c;h=dc44a50ff5f71b732ae69a4be9ba64401b09d7e7;hb=9c98fa31ef50a6ff849d36cac4f5297faa6f7909;hp=1f1284a1b046ba7d4582982e05749a790bb4d9e9;hpb=6597f3a6584704f92f824f3cf7bac3369102e8a0;p=collectd.git diff --git a/src/cpu.c b/src/cpu.c index 1f1284a1..dc44a50f 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -1,6 +1,8 @@ /** * collectd - src/cpu.c - * Copyright (C) 2005-2007 Florian octo Forster + * Copyright (C) 2005-2009 Florian octo Forster + * Copyright (C) 2008 Oleg King + * Copyright (C) 2009 Simon Kuhnle * * 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 @@ -17,6 +19,8 @@ * * Authors: * Florian octo Forster + * Oleg King + * Simon Kuhnle **/ #include "collectd.h" @@ -216,7 +220,7 @@ static void submit (int cpu_num, const char *type_instance, counter_t value) vl.values_len = 1; sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "cpu", sizeof (vl.plugin)); - ssnprintf (vl.plugin_instance, sizeof (vl.type_instance), + ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance), "%i", cpu_num); sstrncpy (vl.type, "cpu", sizeof (vl.type)); sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));