Merge branch 'maxinfo' into develop

Conflicts:
	server/core/service.c
	server/core/session.c
	server/include/session.h
This commit is contained in:
Markus Makela
2015-03-04 11:22:39 +02:00
30 changed files with 3989 additions and 19 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;
@ -1797,6 +1799,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.
*/
@ -1951,3 +1955,9 @@ static int write_pid_file(char *home_dir) {
/* success */
return 0;
}
int
MaxScaleUptime()
{
return time(0) - MaxScaleStarted;
}