标签为 "Linux" 的存档

Oracle执行sqlplus无响应

新安装的系统上安装Oracle 10.2.0.1.0
OS :Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Oracle:10.2.0.1.0

重新安装解决问题。

ps:网上找到的答案,对我没有用,保留:
SQL*Plus With Instant Client 10.2.0.1 Hangs, When System Uptime Is More Than 248 Days
metalink上的给出的答案是

Applies to: SQL*Plus – Version: 10.2.0.1.0
Linux x86
SymptomsTrying to invoke SQL*Plus hangs when machine uptime reaches 248 days.

Database connection is not relevant as the ‘sqlplus’ executable itself hangs with or without connection information. It hangs regardless of what parameters are passed in. For example:

sqlplus -V

However, the hang does not reproduce with Instant Client version 10.1.0.4

Generating a stack trace using gdb debugger shows:

#0 0x0048a0dd in times () from /lib/tls/libc.so.6
#1 0×01884599 in sltrgatime64 () from ./libclntsh.so.10.1
#2 0x0137d70f in kghinp () from ./libclntsh.so.10.1
#3 0x00f86b47 in kpuinit0 () from ./libclntsh.so.10.1
#4 0x00f85e7a in kpuenvcr () from ./libclntsh.so.10.1
#5 0x01051b5e in OCIEnvCreate () from ./libclntsh.so.10.1
#6 0x0099787e in afidrv () from ./libsqlplus.so
#7 0x009702b9 in safimTerminate () from ./libsqlplus.so
#8 0x0098c246 in afidrv () from ./libsqlplus.so
#9 0x080486f6 in main ()

Running STRACE tool shows:

$ strace /oracle/home/bin/sqlplus -V 2>&1 |less
……
old_mmap(NULL, 385024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0×41794000
gettimeofday({1122996561, 411035}, NULL) = 0
access(“/usr/local/UD/conf/sqlnet.ora”, F_OK) = -1 ENOENT (No such file or directory)
access(“/usr/local/UD/lib/oracle/network/admin/sqlnet.ora”, F_OK) = -1 ENOENT (No such file or directory)
access(“/usr/local/UD/conf/sqlnet.ora”, F_OK) = -1 ENOENT (No such file or directory)
access(“/usr/local/UD/lib/oracle/network/admin/sqlnet.ora”, F_OK) = -1 ENOENT (No such file or directory)
fcntl64(-1218313656, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405

It is looping on the times() function.

In addition to sqlplus, it has been reported that the netca and dbca tools also hang.

ChangesNew installation of Instant Client 10.2.0.1.0 on Linux platform. CauseThis is a known, unpublished bug.

Bug 4612267 OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS

SolutionSelect one of the following two solutions:

1) Apply one-off patch available for 10.2.0.1.
a. Download one-off patch off Metalink:
Patch 4612267
Description OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS
Product CORE
Release Oracle 10.2.0.1

b. To apply patch on Instant Client install, please follow instructions documented in the OCI manual.
You can find this in:

http://www.oracle.com/pls/db102/db102.show_toc?which=main&partno=b14250&maxlevel=2&section=&expand=3216

under “Patching Instant Client Shared Libraries on Linux or UNIX”.

2) Wait for Patchset 10.2.0.2 to be available.
According to Bug 4612267, this bug is fixed in version 11, and backported to 10.2.0.2 patchset.
This patchset is estimated to be available mid-Dec 2005; but this is subject to change.

References
——————————————————————————–

Help us improve our service. Please email us your comments for this document. .

Solaris 中检测防火墙是否开通UDP端口连接

目的:想检测两台机器之间UDP端口是否被防火墙限制
使用工具: ping 和 snoop
系统: Solaris 10

# ping -U -s 10.254.249.17
PING 10.254.249.17: 56 data bytes
92 bytes from 10.254.249.17: udp_port=33434. time=26.1 ms
92 bytes from 10.254.249.17: udp_port=33435. time=26.0 ms
92 bytes from 10.254.249.17: udp_port=33436. time=26.0 ms
92 bytes from 10.254.249.17: udp_port=33437. time=26.1 ms
92 bytes from 10.254.249.17: udp_port=33438. time=25.9 ms
92 bytes from 10.254.249.17: udp_port=33439. time=26.1 ms

# snoop |grep UDP |grep 10.254.249.17
Using device /dev/eri (promiscuous mode)
hqnms -> 10.254.249.17 UDP D=33434 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33434 unreachable)
hqnms -> 10.254.249.17 UDP D=33435 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33435 unreachable)
hqnms -> 10.254.249.17 UDP D=33436 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33436 unreachable)
hqnms -> 10.254.249.17 UDP D=33437 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33437 unreachable)
hqnms -> 10.254.249.17 UDP D=33438 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33438 unreachable)
hqnms -> 10.254.249.17 UDP D=33439 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33439 unreachable)

Snoop 使用手册:

http://bbs.chinaunix.net/viewthread.php?tid=191238

Linux下抓包工具
Tcpdump 使用手册:

http://linux.chinaunix.net/bbs/thread-1047913-1-1.html

今日看的关于Linux一些文章

今日看的文章 关于Linux,来自 http://www.ibm.com/developerworks/cn/linux

1、“懒惰”Linux:“懒惰”集群管理员的 11 个秘诀

这些秘诀是:

1. 不要开发已有的东西。
2. 使用开放源码软件。
3. 将所有东西自动化。
4. 在设计时就考虑到可伸缩性 —— 从一开始就要计划偷懒。
5. 在设计时就考虑到硬件的可管理性。
6. 使用出色的集群管理软件 —— 工欲善其事,必先利其器。
7. 使用开放源码的监视解决方案。
8. 用队列系统控制用户。
9. 检验付出所得到的回报 —— 执行基准测试!
10. 管理集群管理员交流。
11. 不断寻找更懒惰的办法。

是吧, 没有最懒,只有更懒!

更详细见点击这里

2、对话 UNIX: 新改进的 Vim 编辑器
Vim是什么?
Vim,即改进的 Vi,是由 Bram Moolenaar 在 1991 年编写的 vi 的扩展版本。该版本最初是为 Amiga 计算机设计的,但 1992 年时在 UNIX 中迅速传播开来。与 vi 一样,Vim 基于命令模式和插入模式,它是一个文本用户界面(TUI)

Vi 与 Vim 之间的差异?

您在用哪样呢?可以在Windows中使用哦

下载地址:http://www.vim.org/download.php,

更详细见点击这里

3、Linux 上的云计算

云计算和存储将物理资源(例如处理器和存储)转换成 Internet 上可伸缩、可共享的资源(“作为服务” 的计算和存储)。虽然虚拟化不是一个新概念,但是通过服务器虚拟化实现的物理系统共享,的确能使资源的可伸缩性大得多,效率也高得多。云计算使用户可以访问大规模计算和存储资源,而且他们不必知道那些资源的位置及其是如何配置的

云计算,是趋势么?

更详细见点击这里

Linux 使用的几个技巧

摘录了两个我常用的,详细的去IBM“懒惰” Linux 管理员的 10 个关键技巧 查看吧,

技巧 1:卸载无响应的 DVD 驱动器
# eject
将得到以下消息:
umount: /media/cdrom: device is busy
在释放该设备之前,让我们找出谁在使用它。
# fuser /media/cdrom
进程正在运行,无法弹出磁盘其实是我们的错误。
现在,如果您是根用户,可以随意终止进程:
# fuser -k /media/cdrom
现在终于可以卸载驱动器了:
# eject

技巧 2:恢复出现问题的屏幕
# cat /bin/cat
终端就想垃圾一样。输入的所有内容非常零乱。那么该怎么做呢?
输入 reset。
# reset
现在屏幕恢复正常了。

可以从精通命令行的人那里学习很多技巧。最好的学习方式是:

* 与其他人一起工作。共享屏幕会话并观察其他人是如何工作的 —— 您会发现新的做事方法。可能需要谦虚一点,让其他人引导,不过通常可以学到很多东西。
* 阅读手册页。认真阅读手册页,即使是熟知的命令,也能获得更深的见解。例如,您以前可能根本不知道可以使用 awk 进行网络编程。
* 解决问题。作为系统管理员,总是要解决问题,不管是您还是其他人引起的问题。这就是经验,经验可以使您更优秀、更高效。

我希望至少有一个技巧能帮助您学习到您不知道的知识。像这样的基本技巧可以使您更高效,并且能增长经验,但最重要的是,技巧可以让您有更多的空闲时间去做自己感兴趣的事情,比如玩电子游戏。最好的管理员比较悠闲,因为他们不喜欢工作。他们能找到完成任务的最快方法,并且能快速完成任务,从而保持休闲的生活。

视频: Compiz Fusion 新插件 Stackswitch

来自:
http://linuxtoy.org/archives/compiz-fusion-new-plugin-stackswitch.html

Stackswitch 是由 onestone 为 Compiz Fusion 所开发的另一个窗口切换插件。该插件允许用户通过移位和缩放来更加容易的切换在桌面上打开的所有窗口。观看下面的视频,你将清楚地了解 Stackswitch 的表现及优势。

视频: Compiz Fusion 新插件 Stackswitch

如果你对此插件感兴趣,那么可以通过 git 来获取其源代码:

git clone git://anongit.compiz-fusion.org/fusion/plugins/stackswitch