Tuesday, 17 July 2007

LifeSaver of the Week – 4


UNIX command for the PS DBA – find
In several of my previous projects, we used to get 4-5 tickets per week because of space related issues. Finally we implemented automated scripts to take care of this issue. The PS_HOME and psreports are the two main directories which have to be monitored for space growth. Below I explain the relevant examples of the UNIX command “find” that you can use to build your shell script. of Peoplesof
find $PS_HOME -name ‘*.AET’
The above command will recursively find all files with .AET extension residing in the PS_HOME directory.
find $PS_HOME -name ‘*.AET’ -mtime +1
The above command will recursively find all files with .AET extension and older than 1day in the PS_HOME directory.
find $PS_HOME -name ‘*.AET’ -mtime +1 -exec gzip {} ;
The above command will recursively find all files with .AET extension, older than 1day and will gzip the file in the PS_HOME directory.
find $PS_HOME -name ‘*.AET’ -mtime +1 -exec rm {} ;
The above command will recursively find all files with .AET extension, older than 1day and will remove the file in the PS_HOME directory.
find $PS_HOME -name ‘*.AET’ -size +10000000c -exec gzip {} ;
The above command will recursively find all files with .AET extension, greater than 10MB in sizeand will gzip the file in the PS_HOME directory.
You can replace AET with trc or out or log as appropriate
To add more variety to your thoughts on Operational Data, you can read it More about Peoplesoft 

0 comments:

Post a Comment