Merge branch 'maxinfo' into develop
Conflicts: server/core/service.c server/core/session.c server/include/session.h
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user