记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
Oracle在10g中引入了闪回区(flash recovery area)的概念,用以简化和完善备份,但是闪回区同样需要精心规划和设置,否则一样会遇到问题,从Oracle10gR2开始,Oracle还提供了一个新的视图V$FLASH_RECOVERY_AREA_USAGE,用以监控闪回区空间的耗用情况。本文简要介绍Oracle闪回区的警报和空间维护机制。每次RMAN在闪回区(flash recovery area)创建文件时,会同时更新可删除文件列表。当闪回区存在空间压力时,Oracle会自动从闪回区中删除废弃文件,当没有更多空间可以释放时,Oracle会给出空间压力警报。当空间使用达到100%,数据库将会因为无法归档等原因挂起。闪回区的大小由:db_recovery_file_dest_size 参数指定。路径由: db_recovery_file_dest 参赛指定。 SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ----------------------------...
应用部署到weblogic下(Tomcat下无问题),filter执行时报错: java.lang.IllegalStateException: Cannot resize buffer - 299 bytes have already been written (Servlet 2.3, sec. 5.1)at weblogic.servlet.internal.ServletResponseImpl.setBufferSize(ServletResponseImpl.java:346)at weblogic.servlet.jsp.PageContextImpl.initialize(PageContextImpl.java:74)at weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:110)at weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:40)at jsp_servlet.__index._jspService(__index.java:65)原因:调用了response.sendRedirect()之后,再调用了filterChain.doFilter(request, response)解决:修改代码,确保 sendRedirect 之后 return 或 doFilter 之前无 sendRedirect。Jetty下,post 1个表单数据时报错: java.lang.IllegalStateException: Form too large210799>200000原因: Jetty对form post data的大小有限制,默认为200000bytes解决: 修改Jetty的默认限制值。1. Jetty: 默认限制为200000bytes(约200KB).修改默认限制值的方法如下:参考:http:/...
Linux时间戳和标准时间的互转在LINUX系统中,有许多场合都使用时间戳的方式表示时间,即从1970年1月1日起至当前的天数或秒数。如/etc/shadow里的密码更改日期和失效日期,还有代理服务器的访问日志对访问时间的记录等等。Unix时间戳(Unix timestamp),或称Unix时间(Unix time)、POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。Unix时间戳不仅被使用在Unix系统、类Unix系统中(比如Linux系统),也在许多其他操作系统中被广泛采用。php中获取时间戳的方法是:time();Date();Linux中获取时间戳的方法是:date +%sLinux中将时间戳转换为日期: date -d "@<timestamp>" 下面介绍几种时间戳格式和标准时间格式转换的方法:1、分别以标准格式和时间戳来显示当前时间[root@365linux ~]# date 2010年 08月 10日 星期二 03:39:21 CST [root@365linux ~]# date +%s 12813827752、显示指定时间的时间戳[root@365linux ~]# date -d "2010-07-20 10:25:30" +%s 1279592730 3...
下载Nginx到官网下载源码文件,地址:http://nginx.org/en/download.html,选择最新版本。本人下载的地址为:http://nginx.org/download/nginx-1.10.2.tar.gz,可用wget命令下载,也可以在windows系统上下载好再传到linux上。卸载httpd如果系统默认安装了httpd服务,卸载之。不卸载也没关系,这里只是方便默认80端口的处理。yum -y remove httpd解压tar -xzvf nginx-xxxxxx.tar.gz安装编译器和依赖库yum install gcc gcc-c++ zlib-devel pcre-devel openssl-devel openssl-libs openssl -y如果已经安装,就不必了安装前配置cd命令转到解压后的目录下。./configure --prefix=/usr/local/nginx这样安装时系统就会把Nginx安装到/usr/local/nginx目录下。编译make安装make install安装完成,接下来配置环境变量以后就不用使用绝对路径来操作Nginx了:vim /etc/profile.d/http.sh加入以下内容:export PATH=/usr/local/nginx/sbin:$PATH生效配置:source !$启动Nginxnginxnginx -s 后跟stop、reload来关闭和重载nginx,直接运行nginx则启动服务。 如果启动时提示端口被占用,则需要找出被占用的进程,或者更改/usr/local/nginx/conf/nginx.conf文件里的侦听端口。访问Nginx在...
内网Linux服务器巡检报告上传到FTP指定目录,通过smtp邮件发送139邮箱方法。水平有限,供参考,可以使用。具体服务器环境:20台服务器Centos6系统,全部位于防火墙后的内网环境中。其中一台主机A可以上外网。其它主机只能内网访问。具体方案:可上网的主机A,配置好smtp邮件客户端,并配置好vsftp功能。每台主机通过脚本收集巡检报告,然后通过定时任务,使用ftp将报告上传到A主机的ftp目录里面。最后将所有主机的报告打包发送到指定邮箱中。具体配置:A主机,配置vsftp功能,这里就不说了。指定FTP目录为:/home/ftp ,并配置好ftp账号与密码。然后给A主机配置好巡检报告脚本,可以根据自己情况修改检查项目,本例具体内容如下:[root@cw ~] #:vi /home/check/report.shreport_ip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}'`report_time=`date`report_crond=`/etc/init.d/crond status`report_ntp=`cat /etc/crontab |grep ntpdate`report_cpu=`uptime`report_Mem=`free -g`report_Disk=`df -h`report_phy_disk=`/opt/MegaRAID/storcli/storcli64 /c0 show|grep DRIVE`report_Listen=`netstat -lntup |grep java`r...
ALERT LOGWarning: VKTM detected a time drift.Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.CauseThis problem is due to the Bug 11837095 - "TIME DRIFT DETECTED" APPEARS INTERMITTENTLY IN ALERT LOG"SolutionTime drift" error is a " message which can be ignored, to remove the "Warning: VKTM detected set event 10795 or Apply patch 11837095SQL> alter system set event="10795 trace name context forever, level 2" scope=spfile;
Centos6配置SMTP发送邮件与附件方法注:需要先开通相关的邮件账号的smtp 功能,这样,才可以使用客户端软件发邮件。安装客户端软件。[root@cw ~] #:yum install mailx[root@cw ~] #:wget http://ftp5.gwdg.de/pub/opensuse/repositories/home:/billcavalieri:/QEMU/RedHat_RHEL-6/x86_64/sharutils-4.7-6.3.x86_64.rpm[root@cw ~] #:rpm -ivh sharutils-4.7-6.3.x86_64.rpm配置mail.rc文件,增加smtp账号信息:[root@cw ~] #:vi /etc/mail.rcset sendcharsets=iso-8859-1,utf-8set from=yy@139.comset smtp=smtp.139.com:25set smtp-auth-user=yy@139.comset smtp-auth-password=yyyyyyyset smtp-auth=login具体说明:from: 对方收到邮件时显示的发件人smtp: 指定第三方发送邮件的smtp服务器地址smtp-auth: SMTP的认证方式。默认是LOGIN,也可改为CRAM-MD5或PLAIN方式smtp-auth-user: 第三方发邮件的用户名smtp-auth-password: 用户名对应密码然后测试发邮件与附件,mreport="/home/ftp/report.txt"echo "邮件正文内容" | mailx -v -s "邮件主题" -a $mreport 15871@139.com其中$mreport 是附件文件。
oracle 11g ORA-01422实际返回的行数超出请求的行数insert into te_user (PSN_ID, PSN_ACCOUNT, PSN_PWD, PSN_NAME, PSN_DESC, PSN_LEVEL, HISTORY_PWD1, HISTORY_PWD2, HISTORY_PWD3, TEMP_PWD, BILL_NUM, ISVALUE, SIM, ISMSG_LOGIN, VALU_ETIME, ISMSG, TEMP_PWD_TIME, HISTORY_PWD4, BOTTOMLEFTX, BOTTOMLEFTY, TOPRIGHTX, TOPRIGHTY, STARTTIME, UPDATETIME, SECURITY_FLAG) values ('527be121a32e1', '15908000000', '72IuaAS8Wj, null, null, '1', 'vInaLBzHJ, null, null, null, '9003000000', null, '15908000000', null, 1487590404, null, null, null, 411288728, 110098230, 411455622, 110234034, 1487217447, null, 1) 第 1 行出现错误:ORA-01422: 实际返回的行数超出请求的行数ORA-06512: 在 "CM.AFTER_INSERTUSER_GROUP", line 10ORA-04088: 触发器 'CMAFTER_INSERTUSER_GROUP' 执行过程中出错查看对应触发器,脚本内容如下:CREATE OR REPLACE TRIGGER after_insertuser_group after insert on te_user for each rowdeclare v_group_id VARCHAR2(50);...
Linux too many open file与Resource temporarily unavailable解决方法Linux普通用户对打开文件最大数与最大用户进程数,有限制。[ct@hbyjsdb ~]$ ulimit -acore file size (blocks, -c) 0data seg size (kbytes, -d) unlimitedscheduling priority (-e) 0file size (blocks, -f) unlimitedpending signals (-i) 30439max locked memory (kbytes, -l) 64max memory size (kbytes, -m) unlimitedopen files (-n) 2048pipe size &nbs...
Question: I'm getting the "ORA-07445: exception encountered: core dump" error message and I cannot understand the meaning of the core dump file. How do you resolve the ORA-07445 error? The trace file notes:Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x0, PC: [0x1024ef000, opidsa()+480]*** 2015-03-29 16:15:22.349ksedmp: internal or fatal errorORA-07445: exception encountered: core dump [opidsa()+480] [SIGSEGV] [Address not mapped to object] [0x000000000] [] []Current SQL statement for this session:Select /*+ CHOOSE */ object_name ObjectName, object_type ObjectType from user_objects where object_name = :OBJNAME order by 2 Answer: The ORA-07445 is a very generic error, OS dependent, and almost always requires logging a service request (SR) with Oracle Technical support on MOSC. See Note 153788.1 titled "Troubleshoot an ORA-600 or ORA-7445 Error Using the Error Lookup Tool" to find the...
最新评论