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);
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.
Generate two passwords for each user:
+tr -dc A-Za-z0-9 </dev/urandom | head -c 20; echo
+
+Open the configuration file:
+vim /etc/opt/simplex/smp-server.ini
+
+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
+
+Restart the server:
+systemctl restart smp-server
+
+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.
+| Command | +Description | +Requires admin role |
+
|---|---|---|
stats |
+Real-time statistics. Fields described in Daily statistics | +- | +
stats-rts |
+GHC/Haskell statistics. Can be enabled with +RTS -T -RTS option |
+- | +
clients |
+Clients information. Useful for debugging. | +yes | +
sockets |
+General sockets information. | +- | +
socket-threads |
+Thread infomation per socket. Useful for debugging. | +yes | +
threads |
+Threads information. Useful for debugging. | +yes | +
server-info |
+Aggregated server infomation. | +- | +
delete |
+Delete known queue. Useful for content moderation. | +- | +
save |
+Save queues/messages from memory. | +yes | +
help |
+Help menu. | +- | +
quit |
+Exit the control port. | +- | +
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
| Command | +Description | +Requires admin role |
+
|---|---|---|
stats-rts |
+GHC/Haskell statistics. Can be enabled with +RTS -T -RTS option |
+- | +
delete |
+Delete known file chunk. Useful for content moderation. | +- | +
help |
+Help menu. | +- | +
quit |
+Exit the control port. | +- | +
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