Commit graph

40 commits

Author SHA1 Message Date
Miklos Vajna
5391c09fba tools: make members private in Map
Change-Id: I9f23d5095e387888e43c0a0d2e6ed041ac5aed68
2019-01-10 09:11:55 +01:00
Miklos Vajna
8244726d39 MonitorConnectRecord: make members private
Change-Id: I485ed48bca0e5c2c0be15f44f553fc48651c59c9
2019-01-09 08:45:53 +01:00
Miklos Vajna
8ad281e12f wsd: avoid unnecessary value parameter 2018-07-09 09:11:20 +02:00
Jérémie Lesage
f084ea53f6 Ensure all sessions have a sessionId and are subscribed.
Simplify constructors, and factor out subscription code.

Change-Id: I4f3ed1eb06abec193d6db1f7c78815ffe1e1b5aa
2018-06-29 18:10:03 +01:00
Michael Meeks
7475120c81 If a monitor is dis-connected, try to re-connect it.
Change-Id: I04f254acfe823f07e7fb11b277e661c09e146ebd
2018-05-18 17:35:19 +01:00
Michael Meeks
b483f477dd Allow a 'monitor' to be connected to remotely if configured.
So far monitors have the access an permissions of an
authenticated admin.

Change-Id: I59dfa8a646a60584a5c113ee0521e9afba4f6b76
2018-05-18 15:16:39 +02:00
Michael Meeks
ce06a9ae37 Allow the Admin console to be disabled in the configuration.
Change-Id: Iacde8e891f42e9ef9399ebbebbd2b2978188d4c4
2018-04-17 20:47:17 +01:00
Miklos Vajna
e5c7c62713 'static const int' needs an explicit definition in C++11
core.git equivalent situation is e.g. SwXMLTableContext::MAX_WIDTH.

Change-Id: Id6f4201e875a7453ab2363161ea9560ae6e40384
2018-02-26 16:34:01 +01:00
Ashod Nakashian
88619a323f wsd: reduce memory load only when the footprint changes
Update the network interval when updating the memory interval,
since we currently don't support changing the network interval.
Also make the default memory and network interval twice
that of the cpu interval explicitly.

Reduce logging noise a bit without losing information.

And some const-correctness and other cleanups.

Change-Id: I313fb2882675f560091e5113dbdcbdef269828e2
Reviewed-on: https://gerrit.libreoffice.org/49571
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 22:16:50 +01:00
Miklos Vajna
3a427d6249 wsd: static next to const int is not necessary
cost int is already compile-time.
2018-01-15 12:09:44 +01:00
Ashod Nakashian
59398af621 wsd: simpler and more efficient OOM killing
Change-Id: I118abdffba4e7ab57fe6a29a3a9fc420d871bdc0
Reviewed-on: https://gerrit.libreoffice.org/47738
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-11 08:12:09 +01:00
Ashod Nakashian
0d7e153643 wsd: limit how frequently we collect admin stats
These stats aren't free and here is little point
in either being hyper accurate in the timing nor
to allow admins to set nonsensical values (such
as a few milliseconds of interval).

We cap the interval to a sensible 50ms and reduce
some of the logging as well.

Change-Id: I66b4be99cf27d135ca267cb497a7a7d07ff437b6
Reviewed-on: https://gerrit.libreoffice.org/47737
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-11 08:08:30 +01:00
Pranav Kant
65e3f7c7df admin: expose total available memory to admin clients
Take into reckoning the memproportion config value for total available
memory to us.

Change-Id: Ib93c88d746268f3e9f566beed7df77357d530eba
2017-08-29 12:12:08 +05:30
Pranav Kant
a9522f38aa wsd: Notify forkit conditionally about rlimits
No need to notify the forkit very early when loolwsd is initializing and
forkit pipes are not set. Forkit is notified of rlimits anyway
explicitly in the URL when it is initialized; no need to try to
initialize it again.

Change-Id: I9fde13e42f6e6393da7cf245ed979538d715319a
2017-08-21 20:06:11 +05:30
Pranav Kant
fde57adbbf Introduce hard mode when we are OOM
Start killing documents when memory usage goes above threshold.

Also make it possible to close documents from admin instance.
In DocumentBroker::closeDocument, just set the _stop flag and wake
up the polling thread which will terminate the children, instead of
manually terminating the children.

Change-Id: Ie70e05b3fb6ea816a87b6dcfaed92cdddb94aa90
2017-07-07 21:14:53 +05:30
Aditya Dewan
bc7fa9a812 admin: convert document list to drop down
Change-Id: I23635599b008fb0bfa694b4e73cb8f18f49c8ab7
Reviewed-on: https://gerrit.libreoffice.org/39170
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-07-06 09:18:09 +02:00
Aditya Dewan
681138ab54 tdf#106451 admin: graph to monitor network activity
Change-Id: Id71ef4e2a9d16e72f4df442fbf646a39213b61d5
Reviewed-on: https://gerrit.libreoffice.org/38621
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-06-16 09:55:01 +02:00
Ashod Nakashian
459249b177 wsd: apply rlimits set from Admin Console to ForKit
Change-Id: I425c28ce08c5ecd659c4fe8eaa1a7ed3634e7f18
Reviewed-on: https://gerrit.libreoffice.org/38678
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-06-12 06:20:13 +02:00
Ashod Nakashian
9e11cd7db7 Support setting rlimits from Admin Console
Change-Id: Ia0d45948998d7a5612a1828a90ad20908d07639e
Reviewed-on: https://gerrit.libreoffice.org/38677
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-06-12 06:19:53 +02:00
Aditya Dewan
9502741590 tdf#107278 admin console: adding graph to track CPU load
Change-Id: Idb07fe4139dd639a49ce1545cc15895f74876b06
Reviewed-on: https://gerrit.libreoffice.org/38425
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-06-08 12:58:12 +02:00
Michael Meeks
eeaf436d53 Admin: show cumulative bandwidth sent / recv'd over all time.
Change-Id: I3f9f398d1de19d54e0aa4c51bc44c597019dc839
2017-06-03 22:53:57 +01:00
Aditya Dewan
9db39ce741 tdf#107752 admin console: indicating whether a document is modified.
Change-Id: I6055a601c1dd3b5e9700ef75d7c07d7e0b13d663
2017-05-23 19:00:53 +05:30
Aditya Dewan
41ed318de8 tdf#106449 admin:adding user list for each document
Change-Id: Ia5c382f469a80464d0435e1e2e4de3daaba8a690
Reviewed-on: https://gerrit.libreoffice.org/36275
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-04-19 08:17:11 +02:00
Michael Meeks
0806986c8c Admin model locking - major cleanup.
Do everything in the Admin Model in the AdminPoll thread.
Everything else can push work there safely through callbacks.
2017-04-03 20:42:31 +01:00
Michael Meeks
8749f4f2e3 Cleanup unit test hooks. 2017-03-16 18:32:12 +00:00
Michael Meeks
e7ebe0fdaa remove obsolete Poco headers, and Poco SSL pieces. 2017-03-16 18:03:23 +00:00
Michael Meeks
a6de441ed0 rename AdminRequestHandler to AdminSocketHandler. 2017-03-16 17:32:38 +00:00
Michael Meeks
d19b6eb351 Move memstats & cpustats into the main polling thread.
We can calculate the timeout ourselves easily and add it to the
polling loop simplifying life.

Also ensure we never send messages to a non-authenticated thread.
2017-03-15 17:24:44 +00:00
Michael Meeks
0089723f69 Admin: review error handling on auth. failure. 2017-03-15 16:25:29 +00:00
Michael Meeks
909b5f8ac3 Admin: should be its own socket-poll goodness. 2017-03-15 16:13:13 +00:00
Michael Meeks
e1f576bdb3 Switch to using websocket here. 2017-03-15 15:12:52 +00:00
Michael Meeks
d9980e3392 Adjust initial AdminRequestHandler entry point. 2017-03-15 14:40:24 +00:00
Jan Holesovsky
cb3ccfe32d Fix crash on exit in the Admin console.
Change-Id: I5f90a12eb95f59d2b52a52e59526488b94975387
2017-02-08 21:39:10 +01:00
Michael Meeks
9ec0466c57 Admin - measure dirty memory of kits, and RSS of forkit.
Gives a more accurate real memory consumption for each process.
2017-02-07 18:55:32 +00:00
Ashod Nakashian
d7a9a76ddb wsd: report PSS of kit processes
Each Kit process now reports its own PSS,
which is much more accurate as they share
a significant ratio of their pages with
one another.

Admin tracks the PSS values of the Kits
and reports to the console.

Change-Id: Ifa66d17749c224f0dc211db80c44f7c913f2d6c4
Reviewed-on: https://gerrit.libreoffice.org/33864
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:12:31 +00:00
Ashod Nakashian
4eed11e2be wsd: Admin logging updated
Change-Id: I7d7e0f98f10ae3ef10ca15cf6ad510a3d7bab00e
Reviewed-on: https://gerrit.libreoffice.org/33859
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:06:06 +00:00
Ashod Nakashian
292400eeed wsd: reuse the timer-based memory stats for admin requests
Change-Id: I3778458043174fb5489617d022445205daf91532
Reviewed-on: https://gerrit.libreoffice.org/33673
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:10:13 +00:00
Tor Lillqvist
11ae90cfcb No Hungarian notation please
Change-Id: Ia624de45a792db7e39f2245aaea7d940b30b0db2
2017-01-13 14:52:08 +02:00
Tor Lillqvist
e221388c79 Add an 'Idle time' column to the Admin console
Use a new protocol message, 'resetidle' to inform Admin clients
whenever a user has done anything in a document view. This is a
message that Admin clients need to subscribe to.

Also add the current idle time for each document to the 'documents'
message.

To reduce protocol chatter, the idle time is updated at most once per
10 s.

Change-Id: I418e82b05048a3628f21dcd240ccd974b3a01356
Reviewed-on: https://gerrit.libreoffice.org/31653
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-08 08:39:11 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Renamed from loolwsd/Admin.hpp (Browse further)