Source
zbx_preprocess_item_value(items[i].itemid, items[i].host.hostid, items[i].value_type, items[i].flags, NULL,
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** 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 2 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, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
static int trap_fd = -1;
static off_t trap_lastsize;
static ino_t trap_ino = 0;
static char *buffer = NULL;
static int offset = 0;
static int force = 0;
extern unsigned char process_type, program_type;
extern int server_num, process_num;
static void DBget_lastsize(void)
{
DB_RESULT result;
DB_ROW row;
DBbegin();
result = DBselect("select snmp_lastsize from globalvars");
if (NULL == (row = DBfetch(result)))
{
DBexecute("insert into globalvars (globalvarid,snmp_lastsize) values (1,0)");
trap_lastsize = 0;
}
else
ZBX_STR2UINT64(trap_lastsize, row[0]);
DBfree_result(result);
DBcommit();
}
static void DBupdate_lastsize(void)