Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:useful_commands [2020/08/29 08:47]
Stephane de Labrusse [Systemd]
howto:useful_commands [2020/11/05 09:29] (current)
Stephane de Labrusse [Network port]
Line 143: Line 143:
  
  
 +====Network port tricks ====
 +
 +* find which service use a specific port 
 +
 +<​file>​
 +fuser -vn tcp 53     #TCP
 +fuser -vn udp 53     #UDP
 +</​file>​
 +
 +* connect to a port with the command line
 +
 +<​file>​
 +nc -tv 127.0.0.1 53        # TCP
 +nc -uv 127.0.0.1 53        # UDP
 +</​file>​
 ====RPM'​s==== ====RPM'​s====
    
Line 605: Line 620:
 grep -E '​(Cannot validate the message now|SelfCheck|Database correctly reloaded|/​var/​run/​clamd@rspamd/​clamav)'​ /​var/​log/​maillog grep -E '​(Cannot validate the message now|SelfCheck|Database correctly reloaded|/​var/​run/​clamd@rspamd/​clamav)'​ /​var/​log/​maillog
 </​file>​ </​file>​
 +===== Redis =====
 ==== Flush cache data in redis ==== ==== Flush cache data in redis ====
  
Line 612: Line 627:
 </​file>​ </​file>​
  
 +==== Delete all the keys of the currently selected DB in redis ====
 +
 +https://​redis.io/​commands/​flushdb
 +
 +<​file>​
 +redis-cli -s /​var/​run/​redis-rspamd/​rspamd FLUSHDB
 +</​file>​
 ==== check bayes in redis ==== ==== check bayes in redis ====
  
Line 671: Line 693:
 (error) ERR wrong number of arguments for '​del'​ command (error) ERR wrong number of arguments for '​del'​ command
 ...the key pattern was not found and thus no data is available to delete. ...the key pattern was not found and thus no data is available to delete.
 +==== redis & oletools ====
 +
 +* To flush the oletools verdicts cache run the following command
 +
 +<​file>​
 +redis-cli -s /​var/​run/​redis-rspamd/​rspamd --raw KEYS rs_oletools_* | xargs -- redis-cli -s /​var/​run/​redis-rspamd/​rspamd DEL
 +</​file>​
 +
 +* To check how much seconds before a cache entry is being expunged from the cache (first match only)
 +
 +<​file>​
 +redis-cli -s /​var/​run/​redis-rspamd/​rspamd --raw KEYS rs_oletools_* | xargs -L 
 +</​file>​
  
 ===== Shorewall ===== ===== Shorewall =====
Line 693: Line 728:
  
 ===== Systemd ===== ===== Systemd =====
 +
 +==== RedHat documentation====
 +
 +https://​access.redhat.com/​documentation/​en-us/​red_hat_enterprise_linux/​7/​html/​system_administrators_guide/​chap-managing_services_with_systemd
  
 ==== Check customized services==== ==== Check customized services====
Line 1089: Line 1128:
 </​file>​ </​file>​
  
 +===== Reinstall ​ all required packages ​ =====
 +
 +<​file>​
 +yum install @nethserver-iso
 +</​file>​
 =====Server-manager===== =====Server-manager=====
 ==== Allow a user to the server-manager==== ==== Allow a user to the server-manager====