磁盘清理/打包压缩/opt hang住


du -sm * //显示文档下文件的大小

du -h --max-depth=1|more   //显示文件大小

du -h --max-depth=1 / | grep '[0-9]G\>'


find . \( -name '.err' -or -name '.log' \) -mtime +15  -exec ls -l {} \;

find . \( -name '*.err*' -or -name '*.log*' \) -mtime +10  -exec ls -l {} \;

find . \( -name '*.err*' -or -name '*.log*' \) -mtime +10  -exec rm -f {} \;


find . \( -name 'expdp*' \) -mtime +10  -exec rm -f {} \;

find . \( -name '*.dmp*' \) -mtime +10  -exec ls -l {} \;

find . \( -name 'expdp_*' \) -mtime +10  -exec rm -f {} \;


find . –type


Cleaning for Linux system
sed -i -e "s|ERROR MESSAGE STACK FOLLOWS|error message stack follows|g" /var/log/networker/msglog.log


Cleaning for AIX system

perl -p -i -e "s|ERROR MESSAGE STACK FOLLOWS|error message stack follows|g" /var/log/networker/msglog.log

 

删除domain和node下的access.log0*

/u01/app/weblogic/domain/lgtca1ows02/servers/AdminServer/logs

find . -name 'access.log0*' -mtime +3 -exec rm -f {} \;|more


find . -name '*.log*' -mtime +7 -exec ls -l {} \;

find . -name '*.log*' -mtime +15 -exec rm -f {} \;


find . -name '*.err*' -mtime +7 -exec ls -l {} \;

find . -name '*.err*' -mtime +15 -exec rm -f {} \;


find . -name '*.trc*' -mtime -1 -exec rm -f {} \;


find . \( -type d -a ! -name . -prune \) -o -name '*.trm*'  -exec ls -l {} \;


压缩不含.tar /.tmp/ cd的文件

for i in $(ls|grep -v tar | grep -v tmp | grep -v cd); do echo tar czf $i.tar.gz $i && echo rm -rf $i; done

 for i in $(ls|grep -v tar | grep -v tmp | grep -v cd); do tar czf $i.tar.gz $i &&  rm -rf $i; done


[ora10gas@prodb1oas02 ~]$ df

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/sda5              2030736    281992   1643924  15% /

/dev/sda6              1019208    157644    808956  17% /home

/dev/sda2              8123200   1213656   6490248  16% /usr

/dev/mapper/vgos-varlv

                       4980352    756824   3966328  17% /var

/dev/mapper/vgos-tmplv

                       2031440    185664   1740920  10% /tmp

/dev/mapper/vgos-optlv

                     101573920  42621364  53709676  45% /opt

/dev/sda1               194442     14694    169709   8% /boot

tmpfs                  4087564         0   4087564   0% /dev/shm



[ora10gas@prodb1oas02 ~]$ cd /opt

[ora10gas@prodb1oas02 opt]$ ls -altr

total 94536

drwxr-xr-x  2 root     root          4096 Jun  6  2013 VMtools

drwx------  2 root     root         16384 Jun  6  2013 lost+found

drwxrwxr-x  6 root     root          4096 Jun  6  2013 nsr

-rwxr-xr-x  1 root     root      76400708 Jun  7  2013 nete-wa-6qmr5-cr021-linux.bin

dr-xr-xr-x 16 mqm      mqm           4096 Jul 17  2013 mqm

drwxrwxr-x  6 mqm      mqm           4096 Jul 17  2013 mqjazz

drwxrwxrwx  3 root     root          4096 Jul 26  2013 src

drwxrwxr-x 13 ora10gas asinstall     4096 Nov 15  2013 appdata

drwxr-xr-x 24 root     root          4096 Nov 21  2013 ..

drwxrwxrwx  6 ora10gas asinstall     4096 Mar 31  2014 oracle

drwxrwxrwx  2 root     root          4096 Apr 15  2014 ear

drwxr-xr-x  3 root     root          4096 Aug  5 15:25 tivoli

drwxrwxrwx  2 root     root          4096 Dec  3 20:13 rfan

-rw-r--r--  1 root     root      10099547 Dec 24 16:03 appdata.tar

drwxrwxrwx 11 ora10gas asinstall     4096 Dec 24 16:10 applogs

drwxr-xr-x 15 root     root          4096 Dec 24 17:29 .

-rw-r--r--  1 root     root      10099547 Dec 24 17:29 appdata.20141224.oas02.tgz

drwxr-xr-x 10 landesk  landesk       4096 Jan  7 22:53 landesk


[ora10gas@prodb1oas02 opt]$ du -sh *

21M     appdata

9.7M    appdata.20141224.oas02.tgz

9.7M    appdata.tar

7.0G    applogs

4.0K    ear

du: cannot read directory `landesk/var/cbaroot/broker': Permission denied

40M     landesk

du: cannot read directory `lost+found': Permission denied

199M    mqjazz

586M    mqm

73M     nete-wa-6qmr5-cr021-linux.bin

16M     nsr

29G     oracle

4.0K    rfan

4.1G    src

du: cannot read directory `tivoli/cit/cache_data/__root': Permission denied

du: cannot read directory `tivoli/cit/install': Permission denied

9.9M    tivoli

47M     VMtools


[ora10gas@prodb1oas02 opt]$ cd oracle

[ora10gas@prodb1oas02 oracle]$ ls

agent12c  as10g01  ohs10g01  stage

[ora10gas@prodb1oas02 oracle]$ du -sh *

3.5G    agent12c

24G     as10g01

920M    ohs10g01

471M    stage


[ora10gas@prodb1oas02 oracle]$ cd as10g01 

[ora10gas@prodb1oas02 as10g01]$ du -sh *

3.6M    ant

20K     Apache

4.0K    asora.log

880K    assistants

676K    backup_restore

12M     BC4J

11M     bin

12K     bpel

16K     cfgtoollogs

616K    chgip

456K    clone

108K    config

3.4M    datadirect

8.0K    deconfig

596K    diagnostics

1.1M    dsa

140K    iaspt

100K    install

19M     inventory

21G     j2ee

1016K   javacache

1.1M    javavm

39M     jdbc

141M    jdk

104M    jdk_old

34M     jlib

64M     jre

1.7M    ldap

71M     lib

752K    mds

1.5M    network

32M     nls

1.2M    OPatch

2.5G    opmn

600K    oracore

4.0K    oraInst.loc

364K    ord

15M     oui

1.2M    owm

48M     perl

1.5M    plsql

240K    precomp

6.9M    rdbms

52K     relnotes

4.0K    root.sh

8.0K    root.sh.old

8.9M    rules

16K     slax

2.2M    sqlj

56K     sqlplus

12K     srvm

12K     sysman

10M     toplink

3.6M    uix

7.5M    webservices

156K    xdk

1.1M    xqs


/opt/oracle/as10g01

[ora10gas@prodb1oas02 as10g01]$ cd j2ee


/opt/oracle/as10g01/j2ee

[ora10gas@prodb1oas02 j2ee]$ ls

home         OC4J_FLUXC01   OC4J_PROD01   OC4J_PRODL02    utilities

OC4J_FLEX01  OC4J_FLUXL01   OC4J_PRODC01  OC4J_QUALITY01

OC4J_FLUX01  oc4j_opmn.xml  OC4J_PRODL01  temp


/opt/oracle/as10g01/j2ee

[ora10gas@prodb1oas02 j2ee]$ du -sh *

238M    home

543M    OC4J_FLEX01

380M    OC4J_FLUX01

1.3G    OC4J_FLUXC01

2.4G    OC4J_FLUXL01

4.0K    oc4j_opmn.xml

782M    OC4J_PROD01

1.3G    OC4J_PRODC01

6.6G    OC4J_PRODL01

6.6G    OC4J_PRODL02

755M    OC4J_QUALITY01

4.0K    temp

132K    utilities


/opt/oracle/as10g01/j2ee

[ora10gas@prodb1oas02 j2ee]$ cd OC4J_PRODL01


/opt/oracle/as10g01/j2ee/OC4J_PRODL01

[ora10gas@prodb1oas02 OC4J_PRODL01]$ ls

applib                   applications  config      log          temp

application-deployments  bak           connectors  persistence  tldcache


/opt/oracle/as10g01/j2ee/OC4J_PRODL01

[ora10gas@prodb1oas02 OC4J_PRODL01]$ du -sh *

4.0K    applib

1.4G    application-deployments

4.1G    applications

4.0K    bak

912K    config

656K    connectors

1.2G    log

3.3M    persistence

4.0K    temp

92K     tldcache


/opt/oracle/as10g01/j2ee/OC4J_PRODL01

[ora10gas@prodb1oas02 OC4J_PRODL01]$ cd applications


/opt/oracle/as10g01/j2ee/OC4J_PRODL01/applications

[ora10gas@prodb1oas02 applications]$ ls

adminprod      extprod      refprod        scoreldt      stockprod

adminprod.ear  extprod.ear  refprod.ear    scoreldt.ear  stockprod.ear

edbprod        order        rfidprod       scorepdp      supportprod

edbprod.ear    order.ear    rfidprod.ear   scorepdp.ear  supportprod.ear

epartners      pricing      scorecapa      start

epartners.ear  pricing.ear  scorecapa.ear  start.ear


/opt/oracle/as10g01/j2ee/OC4J_PRODL01/applications

[ora10gas@prodb1oas02 applications]$

archive

Transfer to CS-FLOW

Discussion:/opt/mqjazz/ on

Hello Flow team,

Can you please clean the folder /opt/mqjazz/ on prodb1bcx01?  It occupies most of the disk space.

Thanks.


/BCPROD54/config/log.propertities  ---整个文档

/batches-deploy/prod-batch-3.442.2/log.xml -->MaxFileSize  /MaxBackupIndex


it due to the batch console, creating multiples jar files in the tmp

Console BC_OFFER01N

/tmp is full on this server, it probably trigger the error you have

How did I find it :

df -h --> shown tmp was full

cd /tmp
du -sh ./* --> Shown that 3Go was taken by /tmp/_axis2

du –sk ./* |sort –nr (n:对于数值;r:倒叙)


cd /tmp/_axis2


All files are owned by user "bconsole"

lsof | grep bconsole | grep axis2

(Batch running 的时候才会显示)

Shown that is was BC_OFFER01N PID

 "axis2*.jar" - it's a library they are using

  

You need to match file creation with batch history

It's the only way

The batch was reactivated by them, whithout warning ....

It has now been deactivated, and I made a clear warning to them

  

 /opt --〉  所有的instance都在上面,所以满了就会起不了instance --〉 而且会导致配置文件清零,如果没有备份。

tar czvf  DgraphA1.2016_05_14_16.05_09_16.tar.gz  DgraphA1.2016_05_14.05_09_16 DgraphA1.2016_05_15.05_09_08 DgraphA1.2016_05_16.05_09_12

.tar.gz 和 .tgz

解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName

请使用浏览器的分享功能分享到微信等