Difference between revisions of "Talk:Useful Commands"

From SME Server
Jump to navigationJump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Useful Commands
+
--[[User:Stephdl|Stephdl]] ([[User talk:Stephdl|talk]]) 13:12, 26 January 2014 (MST) Hi daniel, i do not understand why you have removed the chapter on the log file audits, is it for security reason ?
 +
I have copied here because i use it often when i work on the bugteam side :)
  
is a bit vauge, could we do something different
+
==Log==
 +
===Quick Parse of Log===
 +
a quick parse of your log, but you should read the entire log
 +
less  /var/log/messages| grep -iE "uninitialized|WARNING|ERROR"
 +
===Deep parse Log to find errors===
 +
When you want to test the SME Product it can be useful to see what it occurs
 +
This CL can help you, but you should read the entire log
 +
less  /var/log/messages| grep -iE "useless|uninitialized|warn|fail|error|disable|unable|exit"
 +
of course this is for the /var/log/messages
  
eg make a new category: DBcommands ??
+
===Parse all Logs to find errors===
 +
Parse all logs and write (under /root) the output to a text file named with the date of day. For example log012214:
  
then add new pages db_php, db_apache etc
+
find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "useless|warn|fail|error|disable|remov|unable|exit"' \; > "log$(date +'%m%d%y')" 2>&1
 +
then:
 +
cd /root
 +
less log012214
  
 +
==Configure <b><u>PHP UploadDir</u></B> Restriction per ibay==
 +
--[[User:Stephdl|Stephdl]] ([[User talk:Stephdl|talk]]) 02:42, 27 April 2014 (MDT) moved here for considerations see [[bugzilla:7011]]
 +
{{note box|need test if it doesn't work see [[Uploadtmpdir]]}}
 +
db accounts setprop IBAYNAME  PHPUploadDir DIR1:DIR2:DIRn
 +
signal-event ibay-modify IBAYNAME
  
-Sounds good to me, but please expand the explanations a bit.
+
<b>Example</b>
<br>Otherwise this page make sense only for those who already know the commands...
 
  
== Duplicate content/necessity of this page ==
+
db accounts setprop Primary PHPUploadDir /home/e-smith/files/ibays/Primary/tmp
 
+
signal-event ibay-modify Primary
Is this page really neccesarry? A lot of this can be taken from the FAQ as well, for instance the PHPBaseDir setting which is already listed on [[PHP]] and included in [[SME_Server:Documentation:FAQ]].
 
More on the database system and how to configure settings can be taken from the [[SME_Server:Documentation:Developers_Manual#II._SME_Server_internals]].
 
IMHO it is far better to provide links to these pages, include the content there or point user to existing data then to setup a second page where we duplicate instructions. <small>—&nbsp;[[User:Cactus|Cactus]] ([[User talk:Cactus|talk]]&nbsp;|&nbsp;[[Special:Contributions/Cactus|contribs]])&nbsp;</small> 17:48, 10 October 2009 (UTC)
 

Latest revision as of 09:42, 27 April 2014

--Stephdl (talk) 13:12, 26 January 2014 (MST) Hi daniel, i do not understand why you have removed the chapter on the log file audits, is it for security reason ? I have copied here because i use it often when i work on the bugteam side :)

Log

Quick Parse of Log

a quick parse of your log, but you should read the entire log

less  /var/log/messages| grep -iE "uninitialized|WARNING|ERROR"

Deep parse Log to find errors

When you want to test the SME Product it can be useful to see what it occurs This CL can help you, but you should read the entire log

less  /var/log/messages| grep -iE "useless|uninitialized|warn|fail|error|disable|unable|exit"

of course this is for the /var/log/messages

Parse all Logs to find errors

Parse all logs and write (under /root) the output to a text file named with the date of day. For example log012214:

find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "useless|warn|fail|error|disable|remov|unable|exit"' \; > "log$(date +'%m%d%y')" 2>&1

then:

cd /root
less log012214

Configure PHP UploadDir Restriction per ibay

--Stephdl (talk) 02:42, 27 April 2014 (MDT) moved here for considerations see bugzilla:7011

Important.png Note:
need test if it doesn't work see Uploadtmpdir


db accounts setprop IBAYNAME  PHPUploadDir DIR1:DIR2:DIRn
signal-event ibay-modify IBAYNAME

Example

db accounts setprop Primary PHPUploadDir /home/e-smith/files/ibays/Primary/tmp
signal-event ibay-modify Primary