понедельник, 10 октября 2016 г.
пятница, 9 сентября 2016 г.
filebeat vsftpd log to logstash
1. Install
yum install filebeat
OR
rpm -ihv filebeat-1.3.0-x86_64.rpm
2. Add service (optional)
chkconfig --add filebeat
3. Edit /etc/filebeat/filebeat.yml
- /var/log/vsftpd.log
input_type: log
include_lines: ["DOWNLOAD", "UPLOAD"]
document_type: vsftpd
logstash:
hosts: ["logstash.local.net:5044"]
4. Debug and check config
filebeat -d "*" -e -c /etc/filebeat/filebeat.yml
2016/09/09 06:51:15.252655 publish.go:109: DBG Publish: {
"@timestamp": "2016-09-09T06:51:10.766Z",
"beat": {
"hostname": "ftp",
"name": "ftp"
},
"count": 1,
"fields": null,
"input_type": "log",
"message": "Fri Sep 9 13:51:06 2016 [pid 8989] [user] OK DOWNLOAD: Client \"10.1.1.1\", \"/share/LIST.TXT\", 210 bytes, 64.31Kbyte/sec",
"offset": 35301580,
"source": "/var/log/vsftpd.log",
"type": "vsftpd"
}
2016/09/09 06:51:15.25
5. Start service
service filebeat start
понедельник, 25 апреля 2016 г.
./runInstaller: line 90: [: too many arguments
Issue
[oracle@oim Disk1]$ ./runInstaller
./runInstaller: line 90: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
./runInstaller: line 192: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/disk.label' for reading: No such file or directory
ERROR: This version of the installer requires a operating system. Please download the appropriate installer for your operating system, or contact Oracle Support.
Solution:
Don't use spaces in install folder(/home/oracle/soa 11.1.1.6)
[oracle@oim Disk1]$ ./runInstaller
./runInstaller: line 90: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
./runInstaller: line 192: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/disk.label' for reading: No such file or directory
ERROR: This version of the installer requires a operating system. Please download the appropriate installer for your operating system, or contact Oracle Support.
Solution:
Don't use spaces in install folder(/home/oracle/soa 11.1.1.6)
вторник, 1 марта 2016 г.
Oracle database .AUD files housekeeping method
Change directory to AUD location
[oracle@db adump]$ ls | wc -l
4125
[oracle@db adump]$ find . -mtime +30 -name "*.aud" | xargs tar -rf aud_archive.tar --remove-files
[oracle@db06 adump]$ ls | wc -l
2495
[oracle@db06 adump]$ ls -l aud_archive.tar
-rw-r--r-- 1 oracle oinstall 2508800 Мар 2 08:34 aud_archive.tar
[oracle@db adump]$ ls | wc -l
4125
[oracle@db adump]$ find . -mtime +30 -name "*.aud" | xargs tar -rf aud_archive.tar --remove-files
[oracle@db06 adump]$ ls | wc -l
2495
[oracle@db06 adump]$ ls -l aud_archive.tar
-rw-r--r-- 1 oracle oinstall 2508800 Мар 2 08:34 aud_archive.tar
воскресенье, 17 января 2016 г.
ORA-04029: error ORA-7445
ORA-04029: error ORA-7445 occurred when querying Table/View
Solution:
alter system flush shared_pool
Solution:
alter system flush shared_pool
четверг, 24 декабря 2015 г.
Print zombie processes
Print zombie processes
ps aux | awk '"[Zz]" ~ $8 { system(sprintf("ps -p %d", $2)); }'
ps aux | awk '"[Zz]" ~ $8 { system(sprintf("ps -p %d", $2)); }'
четверг, 19 ноября 2015 г.
Fix ASM diskgroup discovery string to ORCL:*
Issue
$ srvctl config asm
ASM home: /u01/app/oracle/product/11.2.0/grid_1
ASM listener: LISTENER
Spfile: +DATA/asm/asmparameterfile/registry.253.811613369
ASM diskgroup discovery string: /dev/oracleasm/disks/*
Solution
1. Install for OEL 6.x
wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el6.x86_64.rpm
rpm -ihv oracleasmlib-2.0.12-1.el6.x86_64.rpm
$ srvctl config asm
ASM home: /u01/app/oracle/product/11.2.0/grid_1
ASM listener: LISTENER
Spfile: +DATA/asm/asmparameterfile/registry.253.811613369
ASM diskgroup discovery string: /dev/oracleasm/disks/*
$ sqlplus "/as sysasm"
SQL> show parameter asm_diskstring;
asm_diskstring string /dev/oracleasm/disks/*
1. Install for OEL 6.x
wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el6.x86_64.rpm
rpm -ihv oracleasmlib-2.0.12-1.el6.x86_64.rpm
2. Check visibility from asm user (grid)
oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.12 (KABI_V2)]
Discovered disk: ORCL:DISK1 [2933593688 blocks (1501999968256 bytes), maxio 512, integrity none]
Discovered disk: ORCL:DISK2 [838858752 blocks (429495681024 bytes), maxio 512, integrity none]
Discovered disk: ORCL:DISK3 [2936005222 blocks (1503234673664 bytes), maxio 512, integrity none]
3. Set asm instance parameter for discover
sqlplus "/as sysasm"
ALTER SYSTEM SET asm_diskstring='ORCL:*' SCOPE=SPFILE;
4. Restart asm instance
srvctl stop asm -f
srvctl start asm
5. Check
srvctl config asm
ASM diskgroup discovery string: ORCL:*
Подписаться на:
Сообщения (Atom)