Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
76ff3f6b
Commit
76ff3f6b
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
no-jira: threads counter for mrtg updated to work with newer release of tomcat
parent
e46f1ffb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/admin/sysinfo/MRTGStatsDispatcher.java
+13
-13
13 additions, 13 deletions
...main/java/org/olat/admin/sysinfo/MRTGStatsDispatcher.java
with
13 additions
and
13 deletions
src/main/java/org/olat/admin/sysinfo/MRTGStatsDispatcher.java
+
13
−
13
View file @
76ff3f6b
...
@@ -169,8 +169,8 @@ public class MRTGStatsDispatcher implements Dispatcher {
...
@@ -169,8 +169,8 @@ public class MRTGStatsDispatcher implements Dispatcher {
int
httpsCount
=
0
;
int
httpsCount
=
0
;
int
activeSessionCnt
=
0
;
int
activeSessionCnt
=
0
;
if
(
command
.
equals
(
"users"
))
{
// get user stats of (authenticated) usersessions
if
(
command
.
equals
(
"users"
))
{
// get user stats of (authenticated) usersessions
Set
userSessions
=
UserSession
.
getAuthenticatedUserSessions
();
Set
<
UserSession
>
userSessions
=
UserSession
.
getAuthenticatedUserSessions
();
for
(
Iterator
it_usess
=
userSessions
.
iterator
();
it_usess
.
hasNext
();)
{
for
(
Iterator
<
UserSession
>
it_usess
=
userSessions
.
iterator
();
it_usess
.
hasNext
();)
{
UserSession
usess
=
(
UserSession
)
it_usess
.
next
();
UserSession
usess
=
(
UserSession
)
it_usess
.
next
();
activeSessionCnt
++;
activeSessionCnt
++;
SessionInfo
sessInfo
=
usess
.
getSessionInfo
();
SessionInfo
sessInfo
=
usess
.
getSessionInfo
();
...
@@ -182,10 +182,10 @@ public class MRTGStatsDispatcher implements Dispatcher {
...
@@ -182,10 +182,10 @@ public class MRTGStatsDispatcher implements Dispatcher {
result
.
append
(
"\n0\n"
);
result
.
append
(
"\n0\n"
);
result
.
append
(
instanceId
);
result
.
append
(
instanceId
);
}
else
if
(
command
.
equals
(
"webdav"
))
{
// get webdav stats of (authenticated) usersessions
}
else
if
(
command
.
equals
(
"webdav"
))
{
// get webdav stats of (authenticated) usersessions
Set
userSessions
=
UserSession
.
getAuthenticatedUserSessions
();
Set
<
UserSession
>
userSessions
=
UserSession
.
getAuthenticatedUserSessions
();
int
webdavcount
=
0
;
int
webdavcount
=
0
;
int
securewebdavcount
=
0
;
int
securewebdavcount
=
0
;
for
(
Iterator
it_usess
=
userSessions
.
iterator
();
it_usess
.
hasNext
();)
{
for
(
Iterator
<
UserSession
>
it_usess
=
userSessions
.
iterator
();
it_usess
.
hasNext
();)
{
UserSession
usess
=
(
UserSession
)
it_usess
.
next
();
UserSession
usess
=
(
UserSession
)
it_usess
.
next
();
SessionInfo
sessInfo
=
usess
.
getSessionInfo
();
SessionInfo
sessInfo
=
usess
.
getSessionInfo
();
if
(
sessInfo
.
isWebDAV
())
{
if
(
sessInfo
.
isWebDAV
())
{
...
@@ -234,15 +234,15 @@ public class MRTGStatsDispatcher implements Dispatcher {
...
@@ -234,15 +234,15 @@ public class MRTGStatsDispatcher implements Dispatcher {
// Number of active threads
// Number of active threads
ThreadGroup
group
=
Thread
.
currentThread
().
getThreadGroup
();
ThreadGroup
group
=
Thread
.
currentThread
().
getThreadGroup
();
Thread
[]
threads
=
new
Thread
[
group
.
activeCount
()
];
Thread
[]
threads
=
new
Thread
[
group
.
activeCount
()
];
group
.
enumerate
(
threads
,
false
);
group
.
enumerate
(
threads
,
false
);
int
counter
=
0
;
int
counter
=
0
;
for
(
Thread
t
:
threads
)
{
for
(
Thread
t
:
threads
)
{
if
(
t
==
null
)
continue
;
if
(
t
==
null
)
continue
;
// http-8080-Processor and TP-Processor
// http-8080-Processor and TP-Processor
not precise, but good enough
// not precise, but good enouth
if
(
t
.
getName
().
startsWith
(
"http-"
)
||
t
.
getName
().
startsWith
(
"ajp-"
)
if
(
t
.
getName
().
indexOf
(
"-Processor"
)
!=
-
1
)
{
||
t
.
getName
().
indexOf
(
"-Processor"
)
>
0
)
{
counter
++;
counter
++;
}
}
}
}
result
.
append
(
counter
).
append
(
"\n"
);
result
.
append
(
counter
).
append
(
"\n"
);
result
.
append
(
"0\n"
);
result
.
append
(
"0\n"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment