[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - kit/Kit.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jul 31 20:53:37 UTC 2017


 kit/Kit.cpp |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

New commits:
commit d7481d8087f87374e5075723aa4615ed89ec11fd
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Jun 11 11:47:23 2017 -0400

    wsd: log the relevant rlimits at Kit startup
    
    Change-Id: I6ada56d9bda80301ab55de2c831452b21aa362c1
    Reviewed-on: https://gerrit.libreoffice.org/38674
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit 42969b732c312215a2955f3b85139a9e7e2fab19)
    Reviewed-on: https://gerrit.libreoffice.org/38759
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 0358e7f9..e6c56b5e 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -19,6 +19,8 @@
 #include <sys/capability.h>
 #include <unistd.h>
 #include <utime.h>
+#include <sys/time.h>
+#include <sys/resource.h>
 
 #include <atomic>
 #include <cassert>
@@ -1764,6 +1766,27 @@ void lokit_main(const std::string& childRoot,
             std::_Exit(Application::EXIT_SOFTWARE);
         }
 
+        rlimit rlim = { 0, 0 };
+        if (getrlimit(RLIMIT_AS, &rlim) == 0)
+            LOG_INF("RLIMIT_AS is " << rlim.rlim_max << " bytes.");
+        else
+            LOG_SYS("Failed to get RLIMIT_AS.");
+
+        if (getrlimit(RLIMIT_DATA, &rlim) == 0)
+            LOG_INF("RLIMIT_DATA is " << rlim.rlim_max << " bytes.");
+        else
+            LOG_SYS("Failed to get RLIMIT_DATA.");
+
+        if (getrlimit(RLIMIT_STACK, &rlim) == 0)
+            LOG_INF("RLIMIT_STACK is " << rlim.rlim_max << " bytes.");
+        else
+            LOG_SYS("Failed to get RLIMIT_STACK.");
+
+        if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
+            LOG_INF("RLIMIT_NOFILE is " << rlim.rlim_max << " bytes.");
+        else
+            LOG_SYS("Failed to get RLIMIT_NOFILE.");
+
         assert(loKit);
         LOG_INF("Process is ready.");
 


More information about the Libreoffice-commits mailing list