From dd24bc16c5d72842e0f40b35fa097c3fbb9a7f06 Mon Sep 17 00:00:00 2001 From: epoberezkin Date: Tue, 12 Nov 2024 10:38:38 +0000 Subject: [PATCH] deploy: 8af54539f66b94d554ee90d8995c5619f399e993 --- docs/server.html | 116 ++++++++++++++++++++++++++++++++++++++++-- docs/xftp-server.html | 76 ++++++++++++++++++++++++++- 2 files changed, 188 insertions(+), 4 deletions(-) diff --git a/docs/server.html b/docs/server.html index 404f226394..6030f643dd 100644 --- a/docs/server.html +++ b/docs/server.html @@ -892,7 +892,8 @@ window.addEventListener('scroll',changeHeaderBg);
  • Updating your SMP server
  • @@ -1818,12 +1819,121 @@ Nov 23 19:23:21 5588ab759e80 smp-server[30878]: Listening on port 5223 (TLS)... Nov 23 19:23:21 5588ab759e80 smp-server[30878]: not expiring inactive clients Nov 23 19:23:21 5588ab759e80 smp-server[30878]: creating new queues requires password -

    Monitoring

    +

    Control port

    +

    Enabling control port in the configuration allows administrator to see information about the smp-server in real-time. Additionally, it allows to delete queues for content moderation and see the debug info about the clients, sockets, etc. Enabling the control port requires setting the admin and user passwords.

    +
      +
    1. +

      Generate two passwords for each user:

      +
      tr -dc A-Za-z0-9 </dev/urandom | head -c 20; echo
      +
      +
    2. +
    3. +

      Open the configuration file:

      +
      vim /etc/opt/simplex/smp-server.ini
      +
      +
    4. +
    5. +

      Configure the control port and replace the passwords:

      +
      [AUTH]
      +control_port_admin_password: <your_randomly_generated_admin_password>
      +control_port_user_password: <your_randomly_generated_user_password>
      +
      +[TRANSPORT]
      +control_port: 5224
      +
      +
    6. +
    7. +

      Restart the server:

      +
      systemctl restart smp-server
      +
      +
    8. +
    +

    To access the control port, use:

    +
    nc 127.0.0.1 5224
    +
    +

    or:

    +
    telnet 127.0.0.1 5224
    +
    +

    Upon connecting, the control port should print:

    +
    SMP server control port
    +'help' for supported commands
    +
    +

    To authenticate, type the following and hit enter. Change the my_generated_password with the user or admin password from the configuration:

    +
    auth my_generated_password
    +
    +

    Here's the full list of commands, their descriptions and who can access them.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CommandDescriptionRequires admin role
    statsReal-time statistics. Fields described in Daily statistics-
    stats-rtsGHC/Haskell statistics. Can be enabled with +RTS -T -RTS option-
    clientsClients information. Useful for debugging.yes
    socketsGeneral sockets information.-
    socket-threadsThread infomation per socket. Useful for debugging.yes
    threadsThreads information. Useful for debugging.yes
    server-infoAggregated server infomation.-
    deleteDelete known queue. Useful for content moderation.-
    saveSave queues/messages from memory.yes
    helpHelp menu.-
    quitExit the control port.-
    +

    Daily statistics

    You can enable smp-server statistics for Grafana dashboard by setting value on in /etc/opt/simplex/smp-server.ini, under [STORE_LOG] section in log_stats: field.

    Logs will be stored as csv file in /var/opt/simplex/smp-server-stats.daily.log. Fields for the csv file are:

    fromTime,qCreated,qSecured,qDeleted,msgSent,msgRecv,dayMsgQueues,weekMsgQueues,monthMsgQueues,msgSentNtf,msgRecvNtf,dayCountNtf,weekCountNtf,monthCountNtf,qCount,msgCount,msgExpired,qDeletedNew,qDeletedSecured,pRelays_pRequests,pRelays_pSuccesses,pRelays_pErrorsConnect,pRelays_pErrorsCompat,pRelays_pErrorsOther,pRelaysOwn_pRequests,pRelaysOwn_pSuccesses,pRelaysOwn_pErrorsConnect,pRelaysOwn_pErrorsCompat,pRelaysOwn_pErrorsOther,pMsgFwds_pRequests,pMsgFwds_pSuccesses,pMsgFwds_pErrorsConnect,pMsgFwds_pErrorsCompat,pMsgFwds_pErrorsOther,pMsgFwdsOwn_pRequests,pMsgFwdsOwn_pSuccesses,pMsgFwdsOwn_pErrorsConnect,pMsgFwdsOwn_pErrorsCompat,pMsgFwdsOwn_pErrorsOther,pMsgFwdsRecv,qSub,qSubAuth,qSubDuplicate,qSubProhibited,msgSentAuth,msgSentQuota,msgSentLarge,msgNtfs,msgNtfNoSub,msgNtfLost,qSubNoMsg,msgRecvGet,msgGet,msgGetNoMsg,msgGetAuth,msgGetDuplicate,msgGetProhibited,psSubDaily,psSubWeekly,psSubMonthly,qCount2,ntfCreated,ntfDeleted,ntfSub,ntfSubAuth,ntfSubDuplicate,ntfCount,qDeletedAllB,qSubAllB,qSubEnd,qSubEndB,ntfDeletedB,ntfSubB,msgNtfsB,msgNtfExpired
     
    -

    Fields description

    +

    Fields description

    diff --git a/docs/xftp-server.html b/docs/xftp-server.html index 94503849a4..68409faf7c 100644 --- a/docs/xftp-server.html +++ b/docs/xftp-server.html @@ -1048,7 +1048,81 @@ Feb 27 19:21:11 localhost xftp-server[2350]: Uploading new files allowed. Feb 27 19:21:11 localhost xftp-server[2350]: Listening on port 443... Feb 27 19:21:11 localhost xftp-server[2350]: [INFO 2023-02-27 19:21:11 +0000 src/Simplex/FileTransfer/Server/Env.hs:85] Total / available storage: 64424509440 / 64424509440 -

    Monitoring

    +

    Control port

    +

    Enabling control port in the configuration allows administrator to see information about the smp-server in real-time. Additionally, it allows to delete file chunks for content moderation and see the debug info about the clients, sockets, etc. Enabling the control port requires setting the admin and user passwords.

    +
      +
    1. +

      Generate two passwords for each user:

      +
      tr -dc A-Za-z0-9 </dev/urandom | head -c 20; echo
      +
      +
    2. +
    3. +

      Open the configuration file:

      +
      vim /etc/opt/simplex-xftp/file-server.ini
      +
      +
    4. +
    5. +

      Configure the control port and replace the passwords:

      +
      [AUTH]
      +control_port_admin_password: <your_randomly_generated_admin_password>
      +control_port_user_password: <your_randomly_generated_user_password>
      +
      +[TRANSPORT]
      +control_port: 5224
      +
      +
    6. +
    7. +

      Restart the server:

      +
      systemctl restart xftp-server
      +
      +
    8. +
    +

    To access the control port, use:

    +
    nc 127.0.0.1 5224
    +
    +

    or:

    +
    telnet 127.0.0.1 5224
    +
    +

    Upon connecting, the control port should print:

    +
    XFTP server control port
    +'help' for supported commands
    +
    +

    To authenticate, type the following and hit enter. Change the my_generated_password with the user or admin password from the configuration:

    +
    auth my_generated_password
    +
    +

    Here's the full list of commands, their descriptions and who can access them.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CommandDescriptionRequires admin role
    stats-rtsGHC/Haskell statistics. Can be enabled with +RTS -T -RTS option-
    deleteDelete known file chunk. Useful for content moderation.-
    helpHelp menu.-
    quitExit the control port.-
    +

    Daily statistics

    You can enable xftp-server statistics for Grafana dashboard by setting value on in /etc/opt/simplex-xftp/file-server.ini, under [STORE_LOG] section in log_stats: field.

    Logs will be stored as csv file in /var/opt/simplex-xftp/file-server-stats.daily.log. Fields for the csv file are:

    fromTime,filesCreated,fileRecipients,filesUploaded,filesDeleted,dayCount,weekCount,monthCount,fileDownloads,fileDownloadAcks,filesCount,filesSize