diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-06-08 12:25:59 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-06-08 14:08:21 +0300 |
commit | 54047990e41304bbdc88739ec7771e1b551a854d (patch) | |
tree | c8c7093230615b772ad072b45eeda0411758d886 /src | |
parent | e1671fa83120afe14f3ed69dcafaa3fac64253ef (diff) | |
download | mysqlstat-54047990e41304bbdc88739ec7771e1b551a854d.tar.gz mysqlstat-54047990e41304bbdc88739ec7771e1b551a854d.tar.bz2 |
Add documentation
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/mysqlstat.c | 41 | ||||
-rw-r--r-- | src/mysqlstat.h | 2 | ||||
-rw-r--r-- | src/mysqlstat.mib2c | 2 | ||||
-rw-r--r-- | src/mysqlstat_mib.mib2c | 2 |
5 files changed, 8 insertions, 43 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index c5810f9..c17447f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ -# This file is part of Mysqlstat -*- autoconf -*- -# Copyright (C) 2014-2016 Sergey Poznyakoff +# This file is part of Mysqlstat -*- automake -*- +# Copyright (C) 2016 Sergey Poznyakoff # # Mysqlstat is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/mysqlstat.c b/src/mysqlstat.c index 2d32137..f599193 100644 --- a/src/mysqlstat.c +++ b/src/mysqlstat.c @@ -1,5 +1,5 @@ /* This file is part of Mysqlstat - * Copyright (C) 2014-2016 Sergey Poznyakoff + * Copyright (C) 2016 Sergey Poznyakoff * * Mysqlstat is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with Mysqlstat. If not, see <http://www.gnu.org/licenses/>. */ - #include <mysqlstat.h> #include <mysql/mysql.h> #undef NDEBUG @@ -133,7 +132,7 @@ get_process_list(struct process_list **p) plist.res = NULL; plist.total = plist.active = plist.slaves = 0; } - DEBUGMSGTL(("mysqlstat", "Getting process list\n")); + DEBUGMSGTL(("mysqlstat:sql", "Getting process list\n")); conn = mysqlstat_connect(); if (!conn) @@ -304,7 +303,7 @@ replSlaveStatusTable_load(netsnmp_cache *cache, void *vmagic) if (!conn) return SNMP_ERR_NOSUCHNAME; - DEBUGMSGTL(("mysqlstat", "Getting slave status\n")); + DEBUGMSGTL(("mysqlstat:sql", "Getting slave status\n")); if (mysql_query(&conn->mysql, "SHOW SLAVE STATUS")) { snmp_log(LOG_ERR, "can't get slave status: %s\n", mysql_error(&conn->mysql)); @@ -469,40 +468,6 @@ process_slave_count(void) } -#if 0 -unsigned replSlaveTable_timeout = CACHE_TIMEOUT; - -static void -replSlaveTable_entry_free(struct replSlaveTable_entry *ent) -{ -} - -int -replSlaveTable_load(netsnmp_cache *cache, void *vmagic) -{ -} - -void -replSlaveTable_free(netsnmp_cache *cache, void *vmagic) -{ - netsnmp_tdata *table = (netsnmp_tdata *) vmagic; - netsnmp_tdata_row *row; - - DEBUGMSGTL(("mysqlstat", "freeing table\n")); - while ((row = netsnmp_tdata_row_first(table))) { - struct replSlaveTable_entry *entry = row->data; - free(ent->replSlaveHost); - free(ent->replSlaveUser); - free(ent->replSlaveCommand); - free(ent->replSlaveState); - free(ent->replSlaveInfo); - SNMP_FREE(ent); - netsnmp_tdata_remove_and_delete_row(table, row); - } -} -#endif - - diff --git a/src/mysqlstat.h b/src/mysqlstat.h index f4bf137..cc10749 100644 --- a/src/mysqlstat.h +++ b/src/mysqlstat.h @@ -1,5 +1,5 @@ /* This file is part of Mysqlstat -*- autoconf -*- - * Copyright (C) 2014-2016 Sergey Poznyakoff + * Copyright (C) 2016 Sergey Poznyakoff * * Mysqlstat is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/mysqlstat.mib2c b/src/mysqlstat.mib2c index 0b2bd50..c38ffc9 100644 --- a/src/mysqlstat.mib2c +++ b/src/mysqlstat.mib2c @@ -1,5 +1,5 @@ # This file is part of Mysqlstat -*- autoconf -*- -# Copyright (C) 2014-2016 Sergey Poznyakoff +# Copyright (C) 2016 Sergey Poznyakoff # # Mysqlstat is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/mysqlstat_mib.mib2c b/src/mysqlstat_mib.mib2c index 510d9bf..45f8885 100644 --- a/src/mysqlstat_mib.mib2c +++ b/src/mysqlstat_mib.mib2c @@ -1,5 +1,5 @@ # This file is part of Mysqlstat -*- c -*- -# Copyright (C) 2014-2016 Sergey Poznyakoff +# Copyright (C) 2016 Sergey Poznyakoff # # Mysqlstat is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by |