Commit 71fe7b66 authored by David Auer's avatar David Auer
Browse files

Add Client Debug Helper

parent 456e52aa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -225,6 +225,9 @@ add_subdirectory(src/daemon)
# Client library
add_subdirectory(src/client)

# Client library debug helper
add_subdirectory(src/client_debug_helper)

option(GKFS_BUILD_TESTS "Build GekkoFS self tests" OFF)

include(CMakeDependentOption)
+11 −0
Original line number Diff line number Diff line
set(CDH_SRC
    client_debug_helper.cpp
    )
set(CDH_HEADERS
    )

add_executable(client_debug_helper ${CDH_SRC} ${CDH_HEADERS})

install(TARGETS client_debug_helper
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    )
+13 −0
Original line number Diff line number Diff line
#include <iostream>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>

int main(int argc, const char *argv[])
{
    rlimit rlimits;
    int rv = getrlimit(RLIMIT_NOFILE, &rlimits);
    std::cout << "hello world! rv=" << rv << " RLIMIT_NOFILE{cur: "
              << rlimits.rlim_cur << ", max: " << rlimits.rlim_max << "}"
              << std::endl << std::flush;
}
 No newline at end of file