Addition of the MaxInfo filter and the generic MaxScale resultset

This commit is contained in:
Mark Riddoch
2015-02-18 17:25:13 +00:00
parent 4e5c4c0b6a
commit 8e941f7523
14 changed files with 2163 additions and 2 deletions

View File

@ -79,6 +79,8 @@
# define _GNU_SOURCE
#endif
time_t MaxScaleStarted;
extern char *program_invocation_name;
extern char *program_invocation_short_name;
@ -1796,6 +1798,8 @@ int main(int argc, char **argv)
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE,
"MaxScale started with %d server threads.",
config_threadcount())));
MaxScaleStarted = time(0);
/*<
* Serve clients.
*/
@ -1950,3 +1954,9 @@ static int write_pid_file(char *home_dir) {
/* success */
return 0;
}
int
MaxScaleUptime()
{
return time(0) - MaxScaleStarted;
}